1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 17318 17319 17320 17321 17322 17323 17324 17325 17326 17327 17328 17329 17330 17331 17332 17333 17334 17335 17336 17337 17338 17339 17340 17341 17342 17343 17344 17345 17346 17347 17348 17349 17350 17351 17352 17353 17354 17355 17356 17357 17358 17359 17360 17361 17362 17363 17364 17365 17366 17367 17368 17369 17370 17371 17372 17373 17374 17375 17376 17377 17378 17379 17380 17381 17382 17383 17384 17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 17401 17402 17403 17404 17405 17406 17407 17408 17409 17410 17411 17412 17413 17414 17415 17416 17417 17418 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 17433 17434 17435 17436 17437 17438 17439 17440 17441 17442 17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488 17489 17490 17491 17492 17493 17494 17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 17568 17569 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 19229 19230 19231 19232 19233 19234 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 19287 19288 19289 19290 19291 19292 19293 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316 19317 19318 19319 19320 19321 19322 19323 19324 19325 19326 19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 19351 19352 19353 19354 19355 19356 19357 19358 19359 19360 19361 19362 19363 19364 19365 19366 19367 19368 19369 19370 19371 19372 19373 19374 19375 19376 19377 19378 19379 19380 19381 19382 19383 19384 19385 19386 19387 19388 19389 19390 19391 19392 19393 19394 19395 19396 19397 19398 19399 19400 19401 19402 19403 19404 19405 19406 19407 19408 19409 19410 19411 19412 19413 19414 19415 19416 19417 19418 19419 19420 19421 19422 19423 19424 19425 19426 19427 19428 19429 19430 19431 19432 19433 19434 19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 19454 19455 19456 19457 19458 19459 19460 19461 19462 19463 19464 19465 19466 19467 19468 19469 19470 19471 19472 19473 19474 19475 19476 19477 19478 19479 19480 19481 19482 19483 19484 19485 19486 19487 19488 19489 19490 19491 19492 19493 19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646 19647 19648 19649 19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 19747 19748 19749 19750 19751 19752 19753 19754 19755 19756 19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 19877 19878 19879 19880 19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 19897 19898 19899 19900 19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 19917 19918 19919 19920 19921 19922 19923 19924 19925 19926 19927 19928 19929 19930 19931 19932 19933 19934 19935 19936 19937 19938 19939 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 20084 20085 20086 20087 20088 20089 20090 20091 20092 20093 20094 20095 20096 20097 20098 20099 20100 20101 20102 20103 20104 20105 20106 20107 20108 20109 20110 20111 20112 20113 20114 20115 20116 20117 20118 20119 20120 20121 20122 20123 20124 20125 20126 20127 20128 20129 20130 20131 20132 20133 20134 20135 20136 20137 20138 20139 20140 20141 20142 20143 20144 20145 20146 20147 20148 20149 20150 20151 20152 20153 20154 20155 20156 20157 20158 20159 20160 20161 20162 20163 20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 20212 20213 20214 20215 20216 20217 20218 20219 20220 20221 20222 20223 20224 20225 20226 20227 20228 20229 20230 20231 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 20279 20280 20281 20282 20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 20361 20362 20363 20364 20365 20366 20367 20368 20369 20370 20371 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 20408 20409 20410 20411 20412 20413 20414 20415 20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458 20459 20460 20461 20462 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 20473 20474 20475 20476 20477 20478 20479 20480 20481 20482 20483 20484 20485 20486 20487 20488 20489 20490 20491 20492 20493 20494 20495 20496 20497 20498 20499 20500 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20516 20517 20518 20519 20520 20521 20522 20523 20524 20525 20526 20527 20528 20529 20530 20531 20532 20533 20534 20535 20536 20537 20538 20539 20540 20541 20542 20543 20544 20545 20546 20547 20548 20549 20550 20551 20552 20553 20554 20555 20556 20557 20558 20559 20560 20561 20562 20563 20564 20565 20566 20567 20568 20569 20570 20571 20572 20573 20574 20575 20576 20577 20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 20616 20617 20618 20619 20620 20621 20622 20623 20624 20625 20626 20627 20628 20629 20630 20631 20632 20633 20634 20635 20636 20637 20638 20639 20640 20641 20642 20643 20644 20645 20646 20647 20648 20649 20650 20651 20652 20653 20654 20655 20656 20657 20658 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 20674 20675 20676 20677 20678 20679 20680 20681 20682 20683 20684 20685 20686 20687 20688 20689 20690 20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 20731 20732 20733 20734 20735 20736 20737 20738 20739 20740 20741 20742 20743 20744 20745 20746 20747 20748 20749 20750 20751 20752 20753 20754 20755 20756 20757 20758 20759 20760 20761 20762 20763 20764 20765 20766 20767 20768 20769 20770 20771 20772 20773 20774 20775 20776 20777 20778 20779 20780 20781 20782 20783 20784 20785 20786 20787 20788 20789 20790 20791 20792 20793 20794 20795 20796 20797 20798 20799 20800 20801 20802 20803 20804 20805 20806 20807 20808 20809 20810 20811 20812 20813 20814 20815 20816 20817 20818 20819 20820 20821 20822 20823 20824 20825 20826 20827 20828 20829 20830 20831 20832 20833 20834 20835 20836 20837 20838 20839 20840 20841 20842 20843 20844 20845 20846 20847 20848 20849 20850 20851 20852 20853 20854 20855 20856 20857 20858 20859 20860 20861 20862 20863 20864 20865 20866 20867 20868 20869 20870 20871 20872 20873 20874 20875 20876 20877 20878 20879 20880 20881 20882 20883 20884 20885 20886 20887 20888 20889 20890 20891 20892 20893 20894 20895 20896 20897 20898 20899 20900 20901 20902 20903 20904 20905 20906 20907 20908 20909 20910 20911 20912 20913 20914 20915 20916 20917 20918 20919 20920 20921 20922 20923 20924 20925 20926 20927 20928 20929 20930 20931 20932 20933 20934 20935 20936 20937 20938 20939 20940 20941 20942 20943 20944 20945 20946 20947 20948 20949 20950 20951 20952 20953 20954 20955 20956 20957 20958 20959 20960 20961 20962 20963 20964 20965 20966 20967 20968 20969 20970 20971 20972 20973 20974 20975 20976 20977 20978 20979 20980 20981 20982 20983 20984 20985 20986 20987 20988 20989 20990 20991 20992 20993 20994 20995 20996 20997 20998 20999 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21011 21012 21013 21014 21015 21016 21017 21018 21019 21020 21021 21022 21023 21024 21025 21026 21027 21028 21029 21030 21031 21032 21033 21034 21035 21036 21037 21038 21039 21040 21041 21042 21043 21044 21045 21046 21047 21048 21049 21050 21051 21052 21053 21054 21055 21056 21057 21058 21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 21073 21074 21075 21076 21077 21078 21079 21080 21081 21082 21083 21084 21085 21086 21087 21088 21089 21090 21091 21092 21093 21094 21095 21096 21097 21098 21099 21100 21101 21102 21103 21104 21105 21106 21107 21108 21109 21110 21111 21112 21113 21114 21115 21116 21117 21118 21119 21120 21121 21122 21123 21124 21125 21126 21127 21128 21129 21130 21131 21132 21133 21134 21135 21136 21137 21138 21139 21140 21141 21142 21143 21144 21145 21146 21147 21148 21149 21150 21151 21152 21153 21154 21155 21156 21157 21158 21159 21160 21161 21162 21163 21164 21165 21166 21167 21168 21169 21170 21171 21172 21173 21174 21175 21176 21177 21178 21179 21180 21181 21182 21183 21184 21185 21186 21187 21188 21189 21190 21191 21192 21193 21194 21195 21196 21197 21198 21199 21200 21201 21202 21203 21204 21205 21206 21207 21208 21209 21210 21211 21212 21213 21214 21215 21216 21217 21218 21219 21220 21221 21222 21223 21224 21225 21226 21227 21228 21229 21230 21231 21232 21233 21234 21235 21236 21237 21238 21239 21240 21241 21242 21243 21244 21245 21246 21247 21248 21249 21250 21251 21252 21253 21254 21255 21256 21257 21258 21259 21260 21261 21262 21263 21264 21265 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 21311 21312 21313 21314 21315 21316 21317 21318 21319 21320 21321 21322 21323 21324 21325 21326 21327 21328 21329 21330 21331 21332 21333 21334 21335 21336 21337 21338 21339 21340 21341 21342 21343 21344 21345 21346 21347 21348 21349 21350 21351 21352 21353 21354 21355 21356 21357 21358 21359 21360 21361 21362 21363 21364 21365 21366 21367 21368 21369 21370 21371 21372 21373 21374 21375 21376 21377 21378 21379 21380 21381 21382 21383 21384 21385 21386 21387 21388 21389 21390 21391 21392 21393 21394 21395 21396 21397 21398 21399 21400 21401 21402 21403 21404 21405 21406 21407 21408 21409 21410 21411 21412 21413 21414 21415 21416 21417 21418 21419 21420 21421 21422 21423 21424 21425 21426 21427 21428 21429 21430 21431 21432 21433 21434 21435 21436 21437 21438 21439 21440 21441 21442 21443 21444 21445 21446 21447 21448 21449 21450 21451 21452 21453 21454 21455 21456 21457 21458 21459 21460 21461 21462 21463 21464 21465 21466 21467 21468 21469 21470 21471 21472 21473 21474 21475 21476 21477 21478 21479 21480 21481 21482 21483 21484 21485 21486 21487 21488 21489 21490 21491 21492 21493 21494 21495 21496 21497 21498 21499 21500 21501 21502 21503 21504 21505 21506 21507 21508 21509 21510 21511 21512 21513 21514 21515 21516 21517 21518 21519 21520 21521 21522 21523 21524 21525 21526 21527 21528 21529 21530 21531 21532 21533 21534 21535 21536 21537 21538 21539 21540 21541 21542 21543 21544 21545 21546 21547 21548 21549 21550 21551 21552 21553 21554 21555 21556 21557 21558 21559 21560 21561 21562 21563 21564 21565 21566 21567 21568 21569 21570 21571 21572 21573 21574 21575 21576 21577 21578 21579 21580 21581 21582 21583 21584 21585 21586 21587 21588 21589 21590 21591 21592 21593 21594 21595 21596 21597 21598 21599 21600 21601 21602 21603 21604 21605 21606 21607 21608 21609 21610 21611 21612 21613 21614 21615 21616 21617 21618 21619 21620 21621 21622 21623 21624 21625 21626 21627 21628 21629 21630 21631 21632 21633 21634 21635 21636 21637 21638 21639 21640 21641 21642 21643 21644 21645 21646 21647 21648 21649 21650 21651 21652 21653 21654 21655 21656 21657 21658 21659 21660 21661 21662 21663 21664 21665 21666 21667 21668 21669 21670 21671 21672 21673 21674 21675 21676 21677 21678 21679 21680 21681 21682 21683 21684 21685 21686 21687 21688 21689 21690 21691 21692 21693 21694 21695 21696 21697 21698 21699 21700 21701 21702 21703 21704 21705 21706 21707 21708 21709 21710 21711 21712 21713 21714 21715 21716 21717 21718 21719 21720 21721 21722 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 21739 21740 21741 21742 21743 21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 21756 21757 21758 21759 21760 21761 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 21777 21778 21779 21780 21781 21782 21783 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 21812 21813 21814 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 21836 21837 21838 21839 21840 21841 21842 21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 21858 21859 21860 21861 21862 21863 21864 21865 21866 21867 21868 21869 21870 21871 21872 21873 21874 21875 21876 21877 21878 21879 21880 21881 21882 21883 21884 21885 21886 21887 21888 21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901 21902 21903 21904 21905 21906 21907 21908 21909 21910 21911 21912 21913 21914 21915 21916 21917 21918 21919 21920 21921 21922 21923 21924 21925 21926 21927 21928 21929 21930 21931 21932 21933 21934 21935 21936 21937 21938 21939 21940 21941 21942 21943 21944 21945 21946 21947 21948 21949 21950 21951 21952 21953 21954 21955 21956 21957 21958 21959 21960 21961 21962 21963 21964 21965 21966 21967 21968 21969 21970 21971 21972 21973 21974 21975 21976 21977 21978 21979 21980 21981 21982 21983 21984 21985 21986 21987 21988 21989 21990 21991 21992 21993 21994 21995 21996 21997 21998 21999 22000 22001 22002 22003 22004 22005 22006 22007 22008 22009 22010 22011 22012 22013 22014 22015 22016 22017 22018 22019 22020 22021 22022 22023 22024 22025 22026 22027 22028 22029 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 22065 22066 22067 22068 22069 22070 22071 22072 22073 22074 22075 22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 22118 22119 22120 22121 22122 22123 22124 22125 22126 22127 22128 22129 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 22283 22284 22285 22286 22287 22288 22289 22290 22291 22292 22293 22294 22295 22296 22297 22298 22299 22300 22301 22302 22303 22304 22305 22306 22307 22308 22309 22310 22311 22312 22313 22314 22315 22316 22317 22318 22319 22320 22321 22322 22323 22324 22325 22326 22327 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 22338 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 22415 22416 22417 22418 22419 22420 22421 22422 22423 22424 22425 22426 22427 22428 22429 22430 22431 22432 22433 22434 22435 22436 22437 22438 22439 22440 22441 22442 22443 22444 22445 22446 22447 22448 22449 22450 22451 22452 22453 22454 22455 22456 22457 22458 22459 22460 22461 22462 22463 22464 22465 22466 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476 22477 22478 22479 22480 22481 22482 22483 22484 22485 22486 22487 22488 22489 22490 22491 22492 22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 22583 22584 22585 22586 22587 22588 22589 22590 22591 22592 22593 22594 22595 22596 22597 22598 22599 22600 22601 22602 22603 22604 22605 22606 22607 22608 22609 22610 22611 22612 22613 22614 22615 22616 22617 22618 22619 22620 22621 22622 22623 22624 22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703
|
2016-11-24 Dodji Seketeli <dodji@redhat.com>
Avoid using size_t to get DWARF data
* src/abg-dwarf-reader.cc (die_size_in_bits, die_location_expr):
Take uint64_t rather than size_t and adjust.
(expr_result::const_value_): Make this be int64_t rather than
ssize_t.
(expr_result::expr_result): Take int64_t rather than ssize_t.
(expr_result::const_value): Return int64_t rather than ssize_t.
(expr_result::{operator(), operator=, operator+=}): Make these
operators return or take int64_t.
too.
(op_pushes_constant_value, op_manipulates_stack)
(op_is_arith_logic, op_is_control_flow)
(eval_last_constant_dwarf_sub_expr, die_member_offset)
(die_virtual_function_index): Take
uint64_t rather than size_t, or int64_t rather than ssize_t.
(finish_member_function_reading, build_class_type_and_add_to_ir)
(build_union_type_and_add_to_ir): Adjust.
2016-11-24 Dodji Seketeli <dodji@redhat.com>
Fix a compiler warning issued by GCC 6.2.1
* src/abg-dwarf-reader.cc (find_import_unit_point_between_dies):
Parameter 5 of find_import_unit_point_between_dies is not of type
Dwarf_Off.
2016-11-24 Dodji Seketeli <dodji@redhat.com>
Fix offset type mismatch
* src/abg-dwarf-reader.cc (die_member_offset): The last two
parameters of die_unsigned_constant_attribute must be of type
uint64_t.
2016-11-24 Dodji Seketeli <dodji@redhat.com>
Fix indentation in abg-writer.cc
* src/abg-writer.cc (write_union_decl_opening_tag): Fix
indentation.
2016-11-23 Dodji Seketeli <dodji@redhat.com>
Support reading data member offset from DW_AT_bit_offset
* src/abg-dwarf-reader.cc (die_member_offset): Better comments.
Support reading the bit offset also from the DW_AT_bit_offset
attribute when it's present. Make sure this always returns a
value in bits.
(build_class_type_and_add_to_ir): No need to multiply (by 8) the
value returned by die_member_offset anymore because it's now in
bits directly.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
* tests/data/test-read-dwarf/test1.abi: Adjust.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Adjust.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
Adjust.
2016-11-23 Dodji Seketeli <dodji@redhat.com>
Update README and ChangeLog for 1.0.rc6
* ChangeLog: Update this automatically using "make
update-changelog".
* NEWS: update this by editing the output of 'git shortlog
libabigail-1.0.rc5..HEAD'.
2016-11-23 Dodji Seketeli <dodji@redhat.com>
Lexicographically sort union data members in change reports
* src/abg-comparison.cc (data_member_comp::operator()): Data
members with the same offset are sorted lexicographically, by
taking their name into account.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
Adjust.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
Likewise.
2016-11-23 Dodji Seketeli <dodji@redhat.com>
Better diagnostics when wget is missing
* configure.ac: When wget is missing then make the disabling of
the building of the fedabipkgdiff tool show up in the
configuration summary and emit a notice.
2016-11-15 Dodji Seketeli <dodji@redhat.com>
Support union types
* include/abg-fwd.h (class_or_union, union_decl): Forward-declare
new types.
(is_class_or_union_type, is_union_type): Declare new functions.
* include/abg-ir.h (method_type::class_type_): Make this be of
class_or_union_wptr type.
(method_type::method_type): Make the class_type parameter be of
class_or_union_wptr type.
(method_type::{g,s}et_class_type): Take or return a
class_or_union_sptr.
(member_base, method_decl, member_function_template)
(member_class_template, member_base::hash)
(member_function_template::hash, member_class_template::hash):
Take these class types out of the class_decl scope.
(is_method_decl): Adjust.
(operator==, opertor!=): Adjust overloads for
member_function_template_sptr and member_class_template_sptr.
(class class_or_union): Declare new type.
(class class_decl): Make this class inherit class_or_union class.
(class_decl::{add_member_decl, insert_member_decl,
remove_member_decl, set_size_in_bits, get_size_in_bits,
get_alignment_in_bits, set_alignment_in_bits,
get_is_declaration_only, set_is_declaration_only,
set_definition_of_declaration, get_definition_of_declaration,
get_earlier_declaration, set_earlier_declaration,
insert_member_type, add_member_type, remove_member_type,
get_member_type, find_member_type, add_data_member,
get_data_members, find_data_member, get_non_static_data_members,
add_member_function, get_member_functions, find_member_function,
add_member_function_template, get_member_function_templates,
add_member_class_template, get_member_class_templates): Move these
to the parent class class_or_union.
(copy_member_function, equals): Add overloads for class_or_union.
(struct class_or_union::hash): Declare new type.
(class union_decl): Declare new type.
(equals, copy_member_function): New overloads for class union_decl
type.
(ir_node_visitor::visit): Add new overloads for union_decl* and
class_or_union*.
* src/abg-ir.cc (get_member_function_is_ctor)
(set_member_function_is_ctor, get_member_function_is_dtor)
(set_member_function_is_dtor, get_member_function_is_const)
(set_member_function_is_const, get_member_function_vtable_offset)
(set_member_function_vtable_offset)
(get_member_function_is_virtual, set_member_function_is_virtual)
(maybe_update_types_lookup_map, get_location)
(get_method_type_name, is_at_global_scope, is_at_class_scope):
Adjust.
(is_class_or_union_type, is_union_type): Define new functions.
(type_base::get_canonical_type_for, maybe_adjust_canonical_type)
(method_type::method_type, method_type::set_class_type)
(function_decl::get_pretty_representation)
(function_decl::get_first_non_implicit_parm)
(function_decl::clone): Adjust.
(equals): Adjust the overload for function_type.
(struct class_or_union::priv): Define new type.
(class::priv::{declaration_, definition_of_declaration_,
member_types_, data_members_, non_static_data_members_,
member_functions_, mem_fns_map_, member_function_templates_,
member_class_templates_, is_declaration_only_}): Move these data
member into class_or_union::priv.
(class_priv::{mark_as_being_compared, unmark_as_being_compared,
comparison_started}): Moved these member functions to
class_or_union::priv.
(class_or_union::{class_or_union, traverse, ~class_or_union,
add_member_decl, remove_member_decl, insert_member_type,
add_member_type, get_size_in_bits, remove_member_type,
get_alignment_in_bits, set_alignment_in_bits, set_size_in_bits,
get_is_declaration_only, set_is_declaration_only,
set_definition_of_declaration, get_definition_of_declaration,
get_earlier_declaration, set_earlier_declaration,
get_member_types, find_member_type, add_data_member,
get_data_member, find_data_member, add_member_function,
get_member_functions, find_member_function,
add_member_function_template, get_member_function_templates,
add_member_class_template, get_member_class_templates,
has_no_member, insert_member_decl, operator==}): Define new member
functions.
(class_decl::{add_member_decl, remove_member_decl,
insert_member_type, add_member_type, get_size_in_bits,
remove_member_type, get_alignment_in_bits, set_alignment_in_bits,
set_size_in_bits, get_is_declaration_only,
set_is_declaration_only, set_definition_of_declaration,
get_earlier_declaration, set_earlier_declaration,
get_member_types, find_member_type, add_data_member,
get_data_member, find_data_member, add_member_function,
get_member_functions, find_member_function,
add_member_function_template, get_member_function_templates,
add_member_class_template, get_member_class_templates): Move these
member functions into class_or_union.
(class_decl::{class_decl, get_definition_of_declaration,
insert_member_decl, add_member_function, has_no_base_nor_member}):
Adjust.
(equals, copy_member_function): Define new overloads for
class_or_union.
(equals): Adjust the overload for class_decl.
(method_decl::{method_decl, set_linkage_name, ~method_decl,
get_type, set_scope}): Remove from the class_decl scope.
(member_base::operator==, member_function_template::operator==):
Likewise.
(member_function_template::traverse)
(member_class_template::operator==)
(member_class_template::traverse): Likewise.
(operator==, operator!=): Adjust the overlod for
member_function_template_sptr.
(is_method_decl, fixup_virtual_member_function)
(set_member_is_static): Adjust.
(virtual_member_function_less_than::operator()): Likewise.
(union_decl::{union_decl, get_pretty_representation, operator==,
traverse}): Define new member functions.
(equals, copy_member_function): Define new overloads for
union_decl.
(hash_type_or_decl): Adjust.
(ir_node_visitor::visit_{begin, end}): Adjust. Add new overloads
for class_or_union* and union_decl*.
* include/abg-comparison.h (changed_member_function_sptr)
(string_member_function_sptr_map): Adjust these typedefs.
(class class_or_union_diff): Declare new type.
(class_diff): Adjust to make this inherit the new
class_or_union_diff type.
(class_diff::{get_priv, member_types_changes,
data_members_changes, inserted_data_members, deleted_data_members,
member_fn_tmpls_changes, member_fn_tmpls_changes,
member_class_tmpls_changes}): These member functions got moved
into -- and shared with -- class_or_union_diff class.
(class union_diff): Declare new type.
(typedef union_diff_sptr): New typedef.
(compute_diff): New overload for union_diff
(is_class_diff, is_union_diff): Declare new functions.
* src/abg-comparison.cc (is_class_diff, is_union_diff): Define new
functions.
(compute_diff_for_types): Support union_decl.
(represent): Adjust.
(represent_data_member): Do not show offset information for data
members of unions as all union data members are at offset 0.
(struct class_or_union_diff::priv): New type.
(class_or_union_diff::priv::{member_type_has_changed,
subtype_changed_dm, member_class_tmpl_has_changed,
get_deleted_non_static_data_members_number,
get_inserted_non_static_data_members_number,
count_filtered_subtype_changed_dm, count_filtered_changed_dm,
count_filtered_changed_mem_fns, count_filtered_inserted_mem_fns,
count_filtered_deleted_mem_fns}): Define new member functions.
(class_or_union_diff::{class_or_union_diff, finish_diff_type,
lookup_tables_empty, lookup_tables_empty,
ensure_lookup_tables_populated, allocate_priv_data, get_priv,
~class_or_union_diff, first_class_or_union, second_class_or_union,
member_types_changes, member_types_changes, data_members_changes,
inserted_data_members, deleted_data_members, member_fns_changes,
changed_member_fns, member_fns_changes, inserted_member_fns,
member_fn_tmpls_changes, member_fn_tmpls_changes,
member_class_tmpls_changes, member_class_tmpls_changes,
has_changes, has_local_changes, report, chain_into_hierarchy}):
Define new member functions.
(class_diff::priv::{member_types_changes_, data_members_changes,
member_fn_tmpls_changes_, member_class_tmpls_changes_,
deleted_member_types_, inserted_member_types_,
changed_member_types_, sorted_changed_member_types_,
deleted_data_members_, deleted_dm_by_offset_,
inserted_data_members_, inserted_dm_by_offset_,
subtype_changed_dm_, sorted_subtype_changed_dm_, changed_dm_,
sorted_changed_dm_, deleted_member_functions_,
inserted_member_functions_, changed_member_functions_,
sorted_changed_member_functions_, deleted_member_class_tmpls_,
inserted_member_class_tmpls_, changed_member_class_tmpls_,
sorted_changed_member_class_tmpls_}): Move these data members into
class_or_union_diff::priv.
(class_diff::{clear_lookup_tables, lookup_tables_empty,
ensure_lookup_tables_populate}): Adjust.
(class_diff::allocate_priv_data): Define new function.
(class_diff::priv::{count_filtered_changed_mem_fns,
count_filtered_inserted_mem_fns, count_filtered_deleted_mem_fns,
chain_into_hierarchy, class_diff}): Likewise.
(class_diff::{member_types_changes, data_members_changes,
inserted_data_members, deleted_data_members,
member_fn_tmpls_changes, member_fn_tmpls_changes,
member_class_tmpls_changes}): These are deleted as they got moved
to class_or_union_diff.
(class_diff::report): Adjust.
(union_diff::{clear_lookup_tables, lookup_tables_empty,
ensure_lookup_tables_populated, allocate_priv_data, union_diff,
finish_diff_type, first_union_decl, second_union_decl,
get_pretty_representation, report}): Define new functions.
(compute_diff): Define an overload for union_decl_sptr.
(function_decl_diff::report): Adjust.
(corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars):
Adjust.
(corpus_diff::report): Adjust.
* src/abg-hash.cc (member_base::hash::operator)
(member_function_template::hash::operator)
(member_class_template::hash::operator): Move these out of the
class_decl scope.
(class_or_union::hash::operator): Define new member function.
(class_decl::hash::operator): Adjust.
(type_base::dynamic_hash::operator): Support hashing of
union_decl. Adjust.
* src/abg-suppression.cc (type_suppression::suppresses_diff):
Adjust.
* src/abg-dwarf-reader.cc (typedef die_class_or_union_map_type):
Define new typedef.
(read_context::{die_wip_classes_map_,
alternate_die_wip_classes_map_, type_unit_die_wip_classes_map_):
Make these data member have type die_class_or_union_map_type.
(read_context::{lookup_type_from_die_offset, die_wip_classes_map,
is_wip_class_die_offset, resolve_declaration_only_classes}):
Adjust.
(finish_member_function_reading, build_class_type_and_add_to_ir)
(build_function_type, build_function_decl, build_reference_type)
(type_is_suppressed, build_function_decl)
(maybe_canonicalize_type, maybe_set_member_type_access_specifier):
Adjust.
(build_union_type_and_add_to_ir): Define new static function.
(build_ir_node_from_die): Support DW_TAG_union_type DIE tag.
* src/abg-reader.cc (handle_element_node): Handle union_decl.
(build_function_decl, build_function_decl_if_not_suppressed):
Adjust.
(build_union_decl_if_not_suppressed, build_union_decl)
(handle_union_decl): Define new functions.
(build_class_decl): Adjust.
* src/abg-writer.cc (record_decl_only_type_as_emitted): Adjust.
(write_decl): Adjust. Support writting union_decl type.
p (write_class_decl_opening_tag, write_class_decl): Adjust. Call
the new write_class_or_union_is_declaration_only.
(write_union_decl_opening_tag, write_union_decl): Define new
static functions.
(write_member_tpe): Support writting union decl.
* tests/test-diff-dwarf.cc (in_out_specs): Add new tests for this
union type support.
* tests/data/test-diff-dwarf/libtest37-union-v0.so: New test input.
* tests/data/test-diff-dwarf/libtest37-union-v1.so: Likewise.
* tests/data/test-diff-dwarf/libtest38-union-v0.so: Likewise.
* tests/data/test-diff-dwarf/libtest38-union-v1.so: Likewise.
* tests/data/test-diff-dwarf/libtest39-union-v0.so: Likewise.
* tests/data/test-diff-dwarf/libtest39-union-v1.so: Likewise.
* tests/data/test-diff-dwarf/test37-union-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test38-union-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test39-union-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test37-union-v0.cc: Source code for
new test input.
* tests/data/test-diff-dwarf/test37-union-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test38-union-v0.cc: Likewise.
* tests/data/test-diff-dwarf/test38-union-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test39-union-v0.cc: Likewise.
* tests/data/test-diff-dwarf/test39-union-v1.cc: Likewise.
* tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
Update test reference.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
Likewise.
* tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi:
Likewise.
2016-11-10 Dodji Seketeli <dodji@redhat.com>
Support empty properties in INI files
* include/abg-ini.h (simple_property::simple_property): Add a new
constructor for empty values.
(simple_property::has_empty_value): Declare new member function.
* src/abg-ini.cc (simple_property::{simple_property,
has_empty_value}): Define new member functions.
(read_context::read_property): Support reading a property with no
value.
(write_property_value, write_property): Support writting a
property with empty value.
2016-11-10 Dodji Seketeli <dodji@redhat.com>
Rename config::property_vector into config::properties_type
* include/abg-ini.h (config::properties_type): Rename the typedef
config::property_vector into this.
(config::section::{section, get_properties, set_properties}):
Adjust.
* src/abg-ini.cc (config::section::priv::properties_): Adjust the
name of its type.
(config::section::{section, get_properties, set_properties,
find_property}): Adjust.
(write_section): Adjust.
* src/abg-suppression.cc (read_function_suppression): Adjust.
2016-11-09 Dodji Seketeli <dodji@redhat.com>
Apply harmless and harmful filters in one pass
* include/abg-comp-filter.h (class harmless_harmful_filter):
Decalre new class.
(typedef harmless_harmful_filter_sptr): Declare new typedef.
(class harmless_filter, class harmful_filter): Remove these class
declarations.
(typedef harmful_filter_sptr, harmless_filter_sptr): Remove these
typedefs.
* src/abg-comp-filter.cc (categorize_harmless_diff_node)
(categorize_harmful_diff_node): Define new static functions.
({harmless, harmful}_filter::{visit, visit_end}): Remove these
member functions.
(harmless_harmful_filter::{visit, visit_end}): Define new member
functions.
* src/abg-comparison.cc (diff_context::diff_context): Register the
new harmless_harmful_filter, and remove the premier
harmless_filter and harmful_filter.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the
commit. # On branch kabidiff-dedup # Changes to be committed: #
(use "git reset HEAD <file>..." to unstage) # # modified:
include/abg-comp-filter.h # modified: src/abg-comp-filter.cc #
modified: src/abg-comparison.cc # # Untracked files: # (use "git
add <file>..." to include in what will be committed) # # diff.txt
# prtests/ # tests/data/test-read-dwarf/libtest23.so.abi.conflict
2016-11-08 Dodji Seketeli <dodji@redhat.com>
Avoid stripping typedefs too much
* src/abg-ir.cc (types_are_compatible)
(is_compatible_with_class_type): Do not strip typedefs. Just get
their leaf types.
2016-11-08 Dodji Seketeli <dodji@redhat.com>
Misc style cleanups in abg-ir.cc
* src/abg-ir.cc (equals): In overloads for function_type and
class_decl, avoid returning a constant when we can return a
variable like in the rest of the code.
2016-11-01 Dodji Seketeli <dodji@redhat.com>
Factorize out string representation of array_type_def::subrange_type
* src/abg-ir.cc (array_type_def::subrange_type::{as_string,
vector_as_string}): Define methods.
(array_type_def::get_subrange_representation): Use the new
vector_as_string method.
2016-11-01 Dodji Seketeli <dodji@redhat.com>
Factorize out parsing of integral types
* src/abg-ir-priv.h: New file.
* src/Makefile.am: Add abg-ir-priv.h to the build system.
* src/abg-ir.cc: Include the new abg-ir-priv.h header file.
(class_integral_type): Move this type
declaration to the new abg-ir-priv.h header.
(integral_type::modifiers_type): Make this non-static.
(parse_integral_type): This new overload is a factorized out of
...
(integral_type::integral_type): ... here.
2016-10-31 Dodji Seketeli <dodji@redhat.com>
Misc style fixes in abg-ir.cc
* src/abg-ir.cc (get_function_type_name,
get_pretty_representation): Misc style fixes.
2016-10-31 Dodji Seketeli <dodji@redhat.com>
Consider a method_decl as always being a member decl
* src/abg-ir.cc (is_member_decl): Consider a method decl as always
being a member decl.
(is_member_function): Use is_member_decl.
2016-10-31 Dodji Seketeli <dodji@redhat.com>
Cleanup void and variadic parameter type interfaces
* include/abg-ir.h (environment::{get_void_type,
get_variadic_parameter_type}): Renamed get_void_type_decl and
get_variadic_parameter_type_decl to these.
(environment::is_void_type): Remove the overload that takes a bare
pointer.
(environment::is_variadic_parameter_type): Declare new member
function.
* src/abg-ir.cc (environment::void_type_): Renamed the data member
void_type_decl_ into this.
(environment::variadic_marker_type_): Renamed the data member
variadic_marker_type_decl_ into this.
(environment::{get_void_type, get_variadic_parameter_type}):
Renamed get_void_type_decl and get_variadic_parameter_type_decl to
these.
(environment::is_void_type): Take a smart pointer now.
(environment::is_variadic_parameter_type): Define new member
function.
(synthesize_function_type_from_translation_unit): Adjust.
(function_decl::parameter::get_pretty_representation): Likewise.
* src/abg-comparison.cc (is_diff_of_variadic_parameter_type):
Adjust.
* src/abg-dwarf-reader.cc (build_function_type)
(build_ir_node_for_void_type): Likewise.
* src/abg-reader.cc (build_function_parameter)
(build_function_decl, build_function_type): Likewise.
2016-10-31 Dodji Seketeli <dodji@redhat.com>
Cleanup some entry points in abg-fwd.h
* include/abg-fwd.h (add_decl_to_scope): Pass the scope smart
pointer by reference.
(is_member_type): pass the type smart pointer by reference.
(is_function_decl, is_pointer_type, is_reference_type)
(is_qualified_type, is_function_type, is_method_type)
(is_array_type): Take a type_or_decl base pointer, rather than
either a decl_base or type_base pointer.
* include/abg-ir.h (translation_unit::set_corpus): Take a pointer
to non-const corpus.
(translation_unit::get_corpus): Add a non-const overload.
(type_or_decl_base::get_corpus): Likewise.
(type_or_decl_base::set_translation_unit): Take a pointer to
non-corpus translation_unit.
(type_or_decl_base::get_translation_unit): Add a non-const
overload.
(scope_decl::{add_member_decl, insert_member_decl}): Pass the
member smart pointer by reference.
(scope_decl::remove_member_decl): Take a non-const smart pointer.
(class_decl::add_member_decl): Pass the decl smart pointer by
reference.
(is_method_decl): Take pointer or reference to type_or_decl_base
rather than function_decl.
* src/abg-ir.cc (translation_unit::priv::corpus): Make this a
pointer to non-const corpus.
(translation_unit::set_corpus): Take a pointer to non-const
corpus.
(translation_unit::get_corpus): Add a non-const overload.
(translation_unit::get_global_scope): Adjust.
(translation_unit::bind_function_type_life_time): Adjust.
(type_or_decl_base::translation_unit): Make this a pointer to
non-const translation_unit.
(type_or_decl_base::get_corpus): Likewise.
(type_or_decl_base::set_translation_unit): Take a pointer to
non-corpus translation_unit.
(type_or_decl_base::get_translation_unit): Add a non-const
overload.
(is_member_type): pass the type smart pointer by reference.
(scope_decl::{add_member_decl, insert_member_decl}): Take a
reference to the member decl smart pointer. Adjust.
(class_decl::add_member_decl): Likewise.
(scope_decl::remove_member_decl): Take a non-const smart pointer.
(add_decl_to_scope): Pass the scope smart pointer by reference.
(is_decl, is_function_decl, is_pointer_type, is_reference_type)
(is_qualified_type, is_function_type, is_method_type)
(is_method_decl, is_array_type): Take a type_or_decl base pointer,
rather than either a decl_base or type_base pointer.
2016-10-31 Dodji Seketeli <dodji@redhat.com>
Fix abigail::ir::get_type_scope()
* src/abg-ir.cc (get_type_scope): Do not always return nil.
2016-10-27 Dodji Seketeli <dodji@redhat.com>
Bug 20740 Broken check for dwarf_getalt in configure.ac
* configure.ac: Add missing spaces around the "=" of a conditional
expression.
2016-10-11 Dodji Seketeli <dodji@redhat.com>
Canonicalize function types when reading from DWARF
* src/abg-dwarf-reader.cc (build_function_decl): Canonicalize
function types.
2016-10-11 Dodji Seketeli <dodji@redhat.com>
Misc cleanups here and there
* src/abg-dwarf-reader.cc (canonicalize_types_scheduled): Fix
identation.
* src/abg-reader.cc (build_class_decl): Use class_decl_sptr rather
than shared_ptr<class_decl>.
* src/abg-writer.cc (write_class_is_declaration_only)
(write_is_struct, write_decl, write_decl_in_scope)
(write_type_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_array_type_def, write_enum_type_decl, write_typedef_decl)
(write_elf_symbol, write_var_decl, write_function_decl)
(write_member_type_opening_tag, write_member_type)
(write_class_decl_opening_tag, write_class_decl): Cleanup
parameters to use the right typedef, rather than the long
shared_ptr<*> form. Pass the shared pointers by reference as
well.
2016-10-10 Dodji Seketeli <dodji@redhat.com>
Cleanup namespace importing in abg-interned-str.h
* include/abg-interned-str.h: Inject std::tr1::shared_ptr,
std::string and std::ostream inside the abigail namespace.
(interned_string::{interned_string, raw, operator==, operator!=,
operator<): Adjust.
(operator==, operator!=, operator<<, operator+): Adjust.
2016-10-07 Dodji Seketeli <dodji@redhat.com>
Cleanup functions to detect infinite comparison of class_decl
* src/abg-ir.cc (class_decl::priv::unmark_as_being_compared): In
the overload that takes a pointer to class_decl, re-use the
overload that takes a reference.
(class_decl::priv::comparison_started): Do not crash if the klass
pointer is nil.
(equals): In the overload for class_decl&, undef the RESULT macro
when it's not used anymore.
2016-10-07 Dodji Seketeli <dodji@redhat.com>
Cleanup class_decl inifite comparison detection
* src/abg-ir.cc (environment::priv::classes_being_compared_): Make
this use the new interned_string_set_type type.
(class_decl::priv::{mark_as_being_compared, comparison_started}):
Adjust.
2016-10-10 Dodji Seketeli <dodji@redhat.com>
Apply ODR-based type comparison optimization to function types
* src/abg-ir.cc (type_eligible_for_odr_based_comparison):
Factorize this out of type_base::get_canonical_type_for. Also,
add function types to the set of types to use the ODR-based
comparison optimization on.
(type_base::get_canonical_type_for): Use the new
type_eligible_for_odr_based_comparison function.
2016-10-07 Dodji Seketeli <dodji@redhat.com>
Prevent infinite loops while comparing two function_type
* include/abg-ir.h (class environment): Make class function_type
be a friend of this class.
(class function_type): Make the equality function for
function_types be a friend of this class.
* src/abg-ir.cc (environment::priv::fn_types_being_compared_): New
data member.
(function_type::priv::{mark_as_being_compared,
unmark_as_being_compared, comparison_started}): Define new member
functions.
(equals): In the overload for function_types, if any of the the
function_type being compared is already being compared, return
early saying that the two function_types are equal. This avoids
2016-10-06 Dodji Seketeli <dodji@redhat.com>
Define a new interned_string_set_type typedef
* include/abg-interned-str.h (interned_string_set_type): Define a new
typedef for unordered_set<interned_string>.
2016-09-23 Dodji Seketeli <dodji@redhat.com>
Update reference output of runtestreaddwarf
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
2016-09-21 Matthias Klose <doko@debian.org>
Fix typo in abipkgdiff
* tools/abipkgdiff.cc (extract_deb): Fix typo.
2016-09-12 Dodji Seketeli <dodji@redhat.com>
Better handle fedabipkgdiff dependencies detection
* configure.ac: It's only when --enable-fedabipkgdiff is provided
that a missing dependency of the fedabipkgdiff program results in
a fatal error. Otherwise, building fedabipkgdiff is just
disabled.
2016-09-16 Dodji Seketeli <dodji@redhat.com>
Add default suppression specifications for C++ binaries
* default.abignore: Add suppressions for non-libstdc++ and
non-boost C++ libraries.
2016-09-20 Dodji Seketeli <dodji@redhat.com>
Add default suppression specification for webkitgtk
* default.abignore: New suppression specifications for webkitgtk.
2016-09-19 Dodji Seketeli <dodji@redhat.com>
Drop suppressed ABI artifacts from the IR
* doc/manuals/abidw.rst: Document the new --suppressions and
--headers-dir options off the abidw tool.
* doc/manuals/abilint.rst: Document the new --suppressions and
--headers-dir options on the abilint tool.
* doc/manuals/libabigail-concepts.rst: Document the new "drop" and
"name_not_regexp" properties on suppression directives.
* include/abg-corpus.h (corpus::corpus): Add a default argument to
the path parameter.
* src/abg-suppression-priv.h: New private header file.
* src/Makefile.am: Add the new abg-suppression-priv.h file to
source distribution.
* include/abg-suppression.h ({suppression_base, type_suppression,
function_suppression, variable_suppression}::priv): Make these
public.
(suppression_base::{g,s}et_drops_artifact_from_ir): Declare new
member functions.
(type_suppression::{suppressed_type}): Likewise.
(suppression_base::{names,sonames}_of_binaries_match): Remove
member functions.
(function_suppression::{get_name, set_name, get_name_regex_str,
set_name_regex_str}): Renamed get_function_name,
set_function_name, get_function_name_regex_str,
set_function_name_regex_str into these.
({variable,function}_suppression::{g,s}et_name_not_regex_str):
Declare new member functions.
* src/abg-suppression.cc: Include the new abg-suppression-priv.h
private header.
(class suppression_base::priv, class type_suppression::priv, class
function_suppression::parameter_spec::priv, class
function_suppression::priv, class variable_suppression::priv):
Move these types to that new private header.
(suppression_base::{g,s}et_drops_artifact_from_ir)
(function_suppression::{g,s}et_name_not_regex_str)
(variable_suppression::{g,s}et_name_not_regex_str): New member
functions.
(sonames_of_binaries_match): New static function, taken from
suppression_base::sonames_of_binaries_match.
(names_of_binaries_match): New static function, taken from
suppression_base::names_of_binaries_match.
(suppression_matches_type_no_name): New static function.
(type_suppression::suppresses_type): Adjust
(function_suppression::suppresses_function)
(variable_suppression::suppresses_variable): Adjust. Evaluate the
new "name_not_regexp" property.
(suppression_matches_type_name)
(suppression_matches_type_location)
(suppression_matches_type_name_or_location)
(suppression_matches_function_name)
(suppression_matches_function_sym_name)
(suppression_matches_variable_name)
(suppression_matches_variable_sym_name, suppression_matches_type):
New functions.
(read_type_suppression): Support the new "drop_artifacts" and
"drop" properties.
(read_function_suppression, read_variable_suppression): Support
the new "drop_artifacts", "drop", and "name_not_regexp"
properties.
(function_suppression::{g,s}et_name): Renamed
{g,s}et_function_name into these.
(function_suppression::set_name_not_regex_str): Renamed
{g,s}et_name_regex_str into this.
(function_suppression::suppresses_function_symbol): Adjust.
* include/abg-dwarf-reader.h (add_read_context_suppressions):
Declare new function.
* src/abg-dwarf-reader.cc: Use the new private
abg-suppression-priv.h header file.
(read_context::supprs_): New data member.
(read_context::get_suppressions): New member function.
(read_context::get_die_source): Make this const.
(read_context::tu_die_imported_unit_points_map): Add a const
overload.
(read_context::cur_transl_unit): Renamed current_translation_unit
unit into this;
(read_context::cur_tu): Remove or rename into cur_transl_unit.
(get_scope_for_die, build_translation_unit_and_add_to_ir)
(build_enum_type, build_pointer_type_def, build_reference_type)
(build_function_type, build_array_type, build_function_decl):
Adjust.
(read_context::{suppression_can_match,
suppression_matches_function_sym_name,
suppression_matches_function_name,
suppression_matches_variable_sym_name,
suppression_matches_variable_name,
suppression_matches_type_name_or_location,
suppression_matches_type_name}): Add member functions.
(die_signed_constant_attribute): Remove this as dead code.
(die_location, die_loc_and_name)
(find_import_unit_point_between_dies)
(find_import_unit_point_before_die, get_parent_die): Make the
read_context& parameter be const and adjust as required.
(build_var_decl_if_not_suppressed, function_is_suppressed)
(variable_is_suppressed, type_is_suppressed): Define new static
functions.
(add_read_context_suppressions): Define new function.
(build_class_type_and_add_to_ir): Do not add suppressed static
data members to the IR.
(build_ir_node_from_die): Do not add suppressed enum types, class
types, variables or functions to the IR. Adjust for the
read_context::cur_tu -> read_context::cur_transl_unit rename.
* include/abg-reader.h (read_context_sptr): Declare new type.
(create_native_xml_read_context, read_corpus_from_input)
(add_read_context_suppressions): Declare new functions.
* src/abg-reader.cc: Include the new private
abg-suppression-priv.h header file.
(read_context::m_exported_decls_builder): Renamed
m_exported_decls_builder_ into this.
(read_context::get_exported_decls_builder): Adjust.
(read_context::get_cur_scope): Make this const.
(read_location): Take a const read_context and adjust.
(read_corpus_from_input): Make this non-static.
(build_namespace_decl): Don't abort if trying to add an artifact
to the IR doesn't succeed. It might be suppressed now.
(read_context::{m_path, m_supprs}): New data members.
(read_context::{g,s}et_path): New member functions.
(read_context::{get_suppressions,
suppression_matches_function_name, suppression_can_match,
suppression_matches_function_name,
suppression_matches_function_sym_name,
suppression_matches_variable_name,
suppression_matches_variable_sym_name,
suppression_matches_type_name_or_location}): Likewise.
(add_read_context_suppressions, create_native_xml_read_context)
(read_corpus_from_native_xml): New functions.
(build_function_decl_if_not_suppressed, function_is_suppressed)
(type_is_suppressed, build_var_decl_if_not_suppressed)
(variable_is_suppressed, build_enum_type_decl_if_not_suppressed)
(build_class_decl_if_not_suppressed): New static functions.
(build_class_decl): Add member types that are being built early,
so that their sub-types can be evaluated for suppression. Do not
add suppressed static data members or suppressed member functions
to the IR.
(build_type): Do not add an enum type or a class type to the IR if
they are suppressed.
(handle_enum_type_decl): Do not add an enum type to the IR if its
suppressed.
(handle_var_decl): Likewise for a variable decl.
(handle_function_decl): Likewise for a function decl.
(handle_class_decl): Likewise for a class decl.
* src/abg-tools-utils.cc (handle_fts_entry): Drop suppressed ABI
from the IR.
* tools/abidiff.cc (display_usage): Fix help strings for
--headers-dirs{1,2}.
(set_suppressions): New static function.
(main): Adjust. Release the memory used by read_context early.
* tools/abidw.cc (options::{headers_dir, suppression_paths}):
(display_usage): New help strings for the new --header-dir and
--suppressions options.
(parse_command_line): Parse the new --header-dir and
--suppressions options.
(maybe_check_suppression_files, set_suppressions): New static
functions.
(main): Use the two new functions above. Free the memory used by
the read context before working with the corpus.
* tools/abilint.cc (options::suppression_paths):
(display_usage): New help strings for the new --header-dir and
--suppressions options.
(parse_command_line): Parse the new --header-dir and
--suppressions options.
(maybe_check_suppression_files, set_suppressions): New static
functions.
(main): Use the two new functions above. Free the memory used by
the read context before working with the corpus.
* tests/data/test-diff-suppr/test24-soname-suppr-{2,3].txt:
Adjust.
* tests/data/test-diff-suppr/test29-suppr-6.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-8.txt: Likewise.
* tests/data/test-diff-suppr/libtest31-v{0,1}.so: New test input.
* tests/data/test-diff-suppr/libtest31.suppr: Likewise
* tests/data/test-diff-suppr/libtest32-v{0,1}.so: Likewise.
* tests/data/test-diff-suppr/libtest32-0.suppr: Likewise.
* tests/data/test-diff-suppr/libtest33-v{0,1}.so: Likewise.
* tests/data/test-diff-suppr/test31-report-{0,1}.txt: Likewise.
* tests/data/test-diff-suppr/test31-v{0,1}.cc: Likewise.
* tests/data/test-diff-suppr/test32-report-{0,1}.txt: Likewise.
* tests/data/test-diff-suppr/test32-v{0,1}.c: Likewise.
* tests/data/test-diff-suppr/test33-suppr-1.txt: Likewise.
* tests/data/test-diff-suppr/test33-v{0,1}.cc: Likewise.
* tests/data/test-diff-suppr/test33-v{0,1}.h: Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns.so: Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
* tests/data/test-read-dwarf/test24-drop-fns-0.suppr: Likewise.
* tests/data/test-read-dwarf/test24-drop-fns.cc: Likewise.
* tests/data/test-read-write/test28-drop-std-fns.abignore:
Likewise.
* tests/data/test-read-write/test28-drop-std-vars.abignore:
Likewise.
* tests/data/test-read-write/test28-without-std-fns-ref.xml:
Likewise.
* tests/data/test-read-write/test28-without-std-fns.xml: Likewise.
* tests/data/test-read-write/test28-without-std-vars-ref.xml:
Likewise.
* tests/data/test-read-write/test28-without-std-vars.xml:
Likewise.
* tests/data/test-read-write/test28.xml: Likewise.
* tests/data/Makefile.am: Add the new test artifacts to source
distribution.
* tests/test-diff-suppr.cc (in_out_spec): Take the new test inputs
into account.
* tests/test-read-dwarf.cc (Inoutspec::in_suppr_spec_path): New
data member.
(in_out_spec): Adjust. The new test inputs into account.
(set_suppressions): New static function.
(handle_in_out_spec): Adjust.
* tests/test-read-write.cc (Inoutspec::{in_suppr_spec_path,
ref_out_path}): New data members.
(in_out_spec): Adjust. Take new test inputs into account.
(main): Adjust.
2016-09-19 Dodji Seketeli <dodji@redhat.com>
Pimplify the abigail::ir::scope_decl type
* include/abg-ir.h (scope_decl::{priv, priv_sptr}) Declare new types.
(scope_decl::priv_): New pimpl data member.
(scope_decl::{member_, member_scopes}): Move this as data member
of the new scope_decl::priv type in the abg-ir.cc file.
(scope_decl::{scope_decl, get_member_decls, get_member_scopes,
is_empty}): Make these inline member functions be out-of-line.
* src/abg-ir.cc (struct scope_decl::priv): Define new type.
(scope_decl::{scope_decl, get_member_decls, get_member_scopes,
is_empty}): Define these new member functions here. They were
inline in the include/abg-ir.h header files before.
(scope_decl::{add_member_decl, insert_member_decl,
remove_member_decl}): Adjust.
2016-09-19 Dodji Seketeli <dodji@redhat.com>
Add new helper functions
* include/abg-fwd.h (get_location, build_qualified_name): Declare
new functions.
* include/abg-ir.h (is_method_decl): Declare two new overloads of
this function.
* src/abg-ir.cc (get_location, build_qualified_name)
(is_method_decl): Define these functions declared above.
2016-09-19 Dodji Seketeli <dodji@redhat.com>
Do not emit empty namespaces in abixml
* include/abg-ir.h
(namespace_decl::is_empty_or_has_empty_sub_namespaces): Declare
new function ...
* src/abg-ir.cc
(namespace_decl::is_empty_or_has_empty_sub_namespaces): ... and
define it.
* src/abg-writer.cc (write_namespace_decl): Do not write empty
namespaces or namespaces containing empty namespaces.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
* tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
2016-09-21 Dodji Seketeli <dodji@redhat.com>
Fix misleading indentation issues
* tools/abipkgdiff.cc (compare): Likewise.
* tools/abisym.cc (main): Fix misleading indentation.
2016-08-30 Dodji Seketeli <dodji@redhat.com>
Bug 20534 - abipkgdiff wrongly displays the name of added binary files
* tools/abipkgdiff.cc (compare): Show the name of the added
binary, rather than its address.
2016-08-24 Dodji Seketeli <dodji@redhat.com>
Bug 20420 - Wrong ODR-based type comparison optimization on qualified type
* src/abg-ir.cc:
2016-08-23 Dodji Seketeli <dodji@redhat.com>
Don't walk diff trees indefinitely when applying suppressions
* src/abg-comparison.cc:
2016-07-27 Dodji Seketeli <dodji@redhat.com>
Control symbols exported from libabigail.so
* VISIBILITY: New documentation about this visiblity business.
* CONTRIBUTING: Update the "contributing guide" to refer to symbol
visibility issues.
* configure.ac: Define a variable VISIBILITY_FLAGS that is set to
the -fvisibility=hidden flag to pass to GCC, when its available.
* src/Makefile.am: Add VISIBILITY to source distribution. Also
add COMPILING and COMMIT-LOG-GUIDELINES that were missing.
* src/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
the library.
* tests/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
tests.
* tools/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
tools.
* src/abg-comp-filter.cc: Enclose inclusion of public headers in
ABG_BEGIN_EXPORT_DECLARATIONS and ABG_END_EXPORT_DECLARATIONS to
export the symbols of entities declared in there.
* src/abg-comparison.cc: Likewise.
* src/abg-config.cc: Likewise.
* src/abg-corpus.cc: Likewise.
* src/abg-diff-utils.cc: Likewise.
* src/abg-dwarf-reader.cc: Likewise.
* src/abg-hash.cc: Likewise.
* src/abg-ini.cc: Likewise.
* src/abg-ir.cc: Likewise.
* src/abg-libxml-utils.cc: Likewise.
* src/abg-libzip-utils.cc: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-suppression.cc: Likewise.
* src/abg-tools-utils.cc: Likewise.
* src/abg-traverse.cc: Likewise.
* src/abg-viz-common.cc: Likewise.
* src/abg-viz-dot.cc: Likewise.
* src/abg-viz-svg.cc: Likewise.
* src/abg-workers.cc: Likewise.
* src/abg-writer.cc: Likewise.
2016-07-26 Dodji Seketeli <dodji@redhat.com>
Support DW_TAG_type_unit
* src/abg-dwarf-reader.cc (TYPE_UNIT_DIE_SOURCE): New enumerator
in enum die_source.
(read_context::{type_unit_die_decl_map_, type_unit_die_type_map_,
type_unit_die_wip_classes_map_,
type_unit_die_wip_function_types_map_,
type_unit_types_to_canonicalize_,
type_units_tu_die_imported_unit_points_map_,
type_section_die_parent_map_}): New data members.
(read_context::{get_die_source, associate_die_to_decl,
lookup_decl_from_die_offset, die_type_map, clear_die_type_maps,
die_wip_classes_map, die_wip_function_types_map,
types_to_canonicalize, clear_types_to_canonicalize,
tu_die_imported_unit_points_map, die_parent_map}): Support
TYPE_UNIT_DIE_SOURCE.
(get_parent_die, get_scope_for_die): Likewise.
(read_context::{lookup_decl_from_type_unit_die_offset,
type_section_die_parent_map}): Define new member functions.
(read_context::build_die_parent_maps): Build a DIE -> parent map
for DIEs coming from the .debug_types section.
* tests/data/test-read-dwarf/libtest23.so: New test input.
* tests/data/test-read-dwarf/libtest23.so.abi: New reference output.
* tests/data/test-read-dwarf/test23-first-tu.cc: Source code of
the new binary above.
* tests/data/test-read-dwarf/test23-second-tu.cc: Likewise.
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-read-dwarf.cc (in_out_specs): Make this test harness
execute over the new test input and reference output.
2016-07-26 Dodji Seketeli <dodji@redhat.com>
Misc code cleanup
* src/abg-dwarf-reader.cc (build_function_decl): Use the more
readable is_class_type rather than a dynamic_cast.
2016-07-26 Dodji Seketeli <dodji@redhat.com>
Generalize DIE source concept in DWARF reader
* src/abg-dwarf-reader.cc (enum die_source): Define new enum.
(operator++): Define new prefix increment operator for the
die_source enum.
(imported_unit_point::imported_unit_from_alt_di): Remove this
data member.
(imported_unit_point::imported_unit_die_source):
New data member of type die_source.
(read_context::primary_die_parent_map_): Renamed
die_parent_map_ data member into this.
(read_context::clear_per_corpus_data): Use the new
clear_die_type_maps function, not die_type_map. Also use the
new clear_types_to_canonicalize overload that takes no
parameter.
(read_context::{get_die_source, clear_die_type_maps,
clear_types_to_canonicalize}): New member functions.
(build_ir_node_from_die, die_die_attribute, get_parent_die)
(get_scope_for_die, build_namespace_decl_and_add_to_ir)
(build_type_decl, build_enum_type)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type)
(build_function_type, build_array_type, build_typedef_type)
(build_var_decl, build_function_decl): Remove the boolean
parameter that was designating the source of the DIE. If
necessary, get the source of the DIE from inside the function
using the new read_context::get_die_source.
(read_debug_info_into_corpus): Adjust.
(maybe_canonicalize_type, find_import_unit_point_between_dies)
(maybe_canonicalize_type, read_context::{associate_die_to_decl,
lookup_decl_from_die_offset, die_type_map, associate_die_to_type,
lookup_type_from_die_offset, die_wip_classes_map,
die_wip_function_types_map, is_wip_class_die_offset,
is_wip_function_type_die_offset, types_to_canonicalize,
schedule_type_for_late_canonicalization,
canonicalize_types_scheduled, add_late_canonicalized_types_stats,
perform_late_type_canonicalizing}): Take a die_source as the
source of the DIE, not a boolean. Adjust the code of the function
accordingly.
(read_context::{tu_die_imported_unit_points_map}): Modified
this to make it take a die_source and return the appropriate
map depending on the source.
(read_context::build_die_parent_relations_under): Turn the
non-member static function build_die_parent_relations_under
into a member function.
(read_context::build_die_parent_maps): Turn the non-member
static function build_die_parent_maps into a member function.
Make this function build a DIE -> parent map also for type
DIEs that are in the .type_units section.
2016-07-25 Dodji Seketeli <dodji@redhat.com>
Cleanup is_class and is_compatible_with_class_type
* include/abg-fwd.h (is_class): Remove the overloads that take a
decl_base or a type_base. Add one that takes a type_or_decl_base.
(is_compatible_with_class_type): Make this take a reference to
smart pointer, not just the smart pointer.
* src/abg-ir.cc (is_class): Do the same as in the header file.
(is_compatible_with_class_type): Likewise.
2016-07-22 Dodji Seketeli <dodji@redhat.com>
Add ABG_ASSERT_NOT_REACHED macro
* include/abg-tools-utils.h (ABG_ASSERT_NOT_REACHED): New macro.
* src/abg-dwarf-reader.cc (stt_to_elf_symbol_type)
(stb_to_elf_symbol_binding, get_elf_class_size_in_bytes)
(build_ir_node_from_die): Use the new ABG_ASSERT_NOT_REACHED macro
in lieu of just calling abort().
2016-07-22 Dodji Seketeli <dodji@redhat.com>
Prepare support for symbol visibility control
* configure.ac: Detect compiler support for
__attribute__((visibility("hidden")) and define the
HAS_GCC_VISIBILITY_ATTRIBUTE macro accordingly. Update the
configuration report.
* src/abg-internal.h: New internal header file that defines macros
to be used in the source code to control declaration visibility.
* src/Makefile.am: Add abg-internal.h to source distribution. Add
src/ to the include search path.
2016-07-06 Chenxiong Qi <cqi@redhat.com>
Make fedabipkgdiff consistent with Libabigail's other tests
* configure.ac: Do not require Python dependencies itertools,
unittest and StringIO anymore as they are not used anymore.
Require new module tempfile now. Generate new executable script
tests/mockfedabipkgdiff from tests/mockfedabipkgdiff.in.
* doc/manuals/abipkgdiff.rst: Add doc for new option
--show-identical-binaries to abipkgdiff
* doc/manuals/fedabipkgdiff.rst: Add doc for new options
--show-identical-binaries to fedabipkgdiff.
* tools/abipkgdiff.cc (options::show_identical_binaries): New data
member.
(options::options): Initialize new data member.
(display_usage): Add a new help string for the new
--show-identical-binaries option.
(parse_command_line): Parse the newq --show-identical-binaries
command line switch.
(pthread_routine_compare): When the comparison of two binaries is
empty, if --show-identical-binaries was provided, then emit some
output saying the comparison did yield the empty set.
* tools/fedabipkgdiff (DEFAULT_ABIPKGDIFF): Store the default path
to abipkgdiff in this new global variable. Naming this default
path is useful because it can then be cleanly overloaded when
using mock.patch.
(build_path_to_abipkgdiff): Return the new DEFAULT_ABIPKGDIFF
global variable.
(cmd): Parse the new --show-identical-binaries command line
switch.
* tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt:
New reference output.
* tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt:
Likewise.
* tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt:
Likewise.
* tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt:
Likewise.
* tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt:
Likewise.
* tests/mockfedabipkgdiff.in: New uninstalled script template.
* tests/runtestfedabipkgdiff.py.in (counter)
(temp_file_or_dir_prefix, UtilsTest, RPMTest, LocalRPMTest)
(RunAbipkgdiffTest, GetPackageLatestBuildTest, DownloadRPMTest)
(BrewListRPMsTest, AssertionHelper, MockGlobalConfig)
(BUILT_ABIPKGDIFF, CompareABIFromCommandLineTest): Remove these
classes, global variables and functions.
(FEDABIPKGDIFF, TEST_SRC_DIR, TEST_BUILD_DIR, INPUT_DIR)
(OUTPUT_DIR, FEDABIPKGDIFF_TEST_SPECS): New global variables.
(ensure_output_dir_created, run_fedabipkgdiff_tests, main): New
functions.
* tests/test-diff-pkg.cc (in_out_specs): Add
tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt
to the set of reference outputs to consider.
* tests/Makefile.am: Add non-installed script mockfedabipkgdiff to
source distribution. Also added
tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt,
tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt,
tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt,
tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt
and
tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt
to source distribution.
2016-07-13 Dodji Seketeli <dodji@redhat.com>
Fix spurious type size change report for distinct_diff
* src/abg-comparison.cc (report_size_and_alignment_changes):
Report size change only when the sizes are different.
* tests/data/test-diff-filter/test33-report-0.txt: Adjust.
2016-07-13 Dodji Seketeli <dodji@redhat.com>
Bug 20199 - Consider integral type synonyms as being equal
* src/abg-ir.cc (class integral_type): New class declaration and
definition.
(operator|, operator&, operator&=): New non-member bitwise
operators for integral_type.
(parse_integral_type_modifier, parse_base_integral_type)
(parse_integral_type_modifier): New static function definitions.
(type_decl::type_decl): Use the parse_integral_type to parse an
integral type out of the current type_decl being built and
transform the current type name into a canonical form.
* tests/data/test-abidiff/test-PR18791-v0.so.abi: Adjust.
* tests/data/test-abidiff/test-PR18791-v1.so.abi: Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
* tests/data/test-diff-filter/test33-report-0.txt: Likewise.
* tests/data/test-diff-filter/test34-report-0.txt: Likewise.
* tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2016-07-08 Dodji Seketeli <dodji@redhat.com>
Bug 20332 - too many ...'s counted as parameters
* src/abg-dwarf-reader.cc (build_function_type): Create a variadic
parameter just for the first DW_TAG_unspecified_parameters seen.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
2016-07-06 Dodji Seketeli <dodji@redhat.com>
Better recognize qualified void type
* include/abg-ir.h (environment::is_void_type): Declare new member
function.
* src/abg-ir.cc (environment::is_void_type): Define new member
function.
* src/abg-dwarf-reader.cc (maybe_strip_qualification): Strip const
qualifier from const void.
* tests/data/test-diff-filter/test34-libjemalloc.so.2-gcc-6.1.0:
New test input.
* tests/data/test-diff-filter/test34-libjemalloc.so.2-intel-16.0.3: Likewise.
* tests/data/test-diff-filter/test34-report-0.txt: New reference output.
* tests/data/Makefile.am: Add the new files above to the source
distribution.
* tests/test-diff-filter.cc (in_out_specs): Compare the two new
binaries above.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Adjust.
* tests/data/test-read-dwarf/test1.abi: Adjust.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
2016-07-05 Dodji Seketeli <dodji@redhat.com>
Bug 20194 - Fail to recognize void type represented by DW_TAG_base_type
* src/abg-dwarf-reader.cc (build_type_decl): Recognize a
DW_TAG_base_type of size zero and of name "void" as a void
type.
* tests/data/test-diff-filter/test33-libelf.so.0.8.13-gcc: New
binary test input.
* tests/data/test-diff-filter/test33-libelf.so.0.8.13-intel16.0.3: Likewise.
* tests/data/test-diff-filter/test33-report-0.txt: New reference output.
* tests/data/Makefile.am: Add the new files above to source
distribution.
* tests/test-diff-filter.cc (in_out_specs): Make this test harness
run over the new test inputs above.
2016-07-04 Dodji Seketeli <dodji@redhat.com>
Add a new overload for is_type_decl
* include/abg-fwd.h (is_type_decl): Declare a new overload
* src/abg-ir.cc (is_type_decl): Define a new overload.
(function_decl::parameter::get_pretty_representation): Adjust.
2016-06-29 Chenxiong Qi <cqi@redhat.com>
Add --abipkgdiff option in manual and bash completion
* doc/manuals/fedabipkgdiff.rst: Add description of --abipkgdiff
option. Reformat paragraph.
* bash-completion/fedabipkgdiff: Add --abipkgdiff
2016-06-29 Chenxiong Qi <cqi@redhat.com>
Add fedabipkgdiff bash completion to dist
* bash-completion/Makefile.am: Add fedabipkgdiff
* bash-completion/fedabipkgdiff: Change mode to 775
2016-06-29 Chenxiong Qi <cqi@redhat.com>
Update bash completion for fedabipkgdiff
* bash-completion/fedabipkgdiff: New bash completion file.
2016-06-29 Dodji Seketeli <dodji@redhat.com>
Bump version number to 1.0.rc6
* configure.ac: Bump version number to 1.0.rc6
2016-06-29 Dodji Seketeli <dodji@redhat.com>
Update web page for 1.0.rc5
* doc/website/mainpage.txt: Update web page.
2016-06-27 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog for 1.0.rc5
* ChangeLog: Update by doing "make update-changelog" in the build
directory.
2016-06-27 Dodji Seketeli <dodji@redhat.com>
Update NEWS file in preparation for 1.0.rc5
* NEWS: update with the edited content of the command:
git shortlog libabigail-1.0.rc4..HEAD
2016-06-27 Dodji Seketeli <dodji@redhat.com>
Fix python interpreter path for el6
* tests/runtestdefaultsupprs.py.in: Use the python interpreter at
/usr/bin/python, not the one at /bin/python.
2016-06-24 Dodji Seketeli <dodji@redhat.com>
Misc cleanup in abg-reader.cc
* src/abg-reader.cc (read_context::push_decl_to_current_scope):
Pass the decl smart pointer by value.
2016-06-22 Dodji Seketeli <dodji@redhat.com>
Use ODR-based optimization on C/C++ translation unit only
* src/abg-ir.cc (strip_typedef): Set the translation unit of the
new ABI artifact.
(type_base::get_canonical_type_for): Perform the ODR-based
optimization only for ABI artifact in C and C++ language
translation units.
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Assert that
the new ABI artifact has its translation unit set.
* src/abg-reader.cc (read_context::{push_decl_to_current_scope,
push_and_key_type_decl}): Set the translation unit of the current
decl, irrespective of if it was added to the current scope or not.
Assert that the decl that was newly pushed to the current scope is
added to the current translation unit.
2016-06-10 Dodji Seketeli <dodji@redhat.com>
Misc white space and comment cleanups
* include/abg-ir.h (typedef type_or_decl_base): Cleanup comment.
* src/abg-ir.cc (struct type_or_decl_base::priv): Fix comment.
2016-06-10 Dodji Seketeli <dodji@redhat.com>
Cleanup function_decl::parameter::get_pretty_representation
* src/abg-ir.cc
(function_decl::parameter::get_pretty_representation): Assert that
the environment is always non-nil. Then no needs to check for it
being non-nil anymore. Use is_type_decl instead of
dynamic_pointer_cast.
2016-06-07 Chenxiong Qi <cqi@redhat.com>
Fix package NVR comparison in fedabipkgdiff
* configure.ac: Add new dependency.
* tests/runtestfedabipkgdiff.py.in (builds): Add new builds for
running tests to test selecting latest build from a package.
(packages): Add new package gnutls.
(GetPackageLatestBuildTest.{test_get_latest_one,
test_cannot_find_a_latest_build_with_invalid_distro}): Use new
builds of package gnutls to run tests.
* tools/fedabipkgdiff (cmp_nvr): New function used to compare nvrs
by Python built-in function sorted.
(Brew.listBuilds): Use the new cmp_nvr function.
2016-06-06 Chenxiong Qi <cqi@redhat.com>
Bug 20135 - Make fedabipkgdiff compare ABIs using devel packages
* doc/manuals/fedabipkgdiff.rst: Add documentation for the new
--no-devel-pkg command line option, as well as for the new default
behaviour of taking devel packages into account during ABI
comparison.
* tools/fedabipkgdiff (PkgInfo): Add new attribute
devel_package.
(RPM.is_devel): New property to determine if rpm is a
development package.
(LocalRPM._find_rpm): New method to find a specific rpm.
(LocalRPM.find_debuginfo): Use new method _find_rpm to find
debuginfo package.
(LocalRPM.find_devel): New method to find an associated
development package.
(Brew.select_rpms_from_a_build): RPMs selector method is
changed to select development package also.
(abipkgdiff): Construct and run abipkgdiff with and without
--devel-pkg[12] options.
(magic_construct): Construct PkgInfo with development package.
(run_abipkgdiff): Run abipkgdiff against rpms with development
packages.
(diff_local_rpm_with_latest_rpm_from_koji): Find development
package, and call method abipkgdiff with development package.
(build_commandline_args_parser): add new option --no-devel-pkg.
* tests/runtestfedabipkgdiff.py.in (packages): Add new package
nss-util.
(builds): Add new builds of nss-utils, nss-util-3.12.6-1.fc14
and nss-util-3.24.0-2.0.fc25.
(rpms): Add new associated rpms of the two new builds.
(AssertionHelper.assert_functions_changes_summary): New method
to match and assert functions changes summary.
(AssertionHelper.assert_abi_comparison_result): Changed to
support to help assert functions changes summary.
(MockGlobalConfig.{no_devel_pkg, check_all_subpackages}): New
fake options with default value for running tests.
(RPMTest.setUp): add new development package for running test
case.
(RPMTest.test_is_devel): New test to test is_devel property.
(RunAbipkgdiffTest.setUp): Add new development packages for
running test case.
(RunAbipkgdiffTest.{test_all_success, test_all_failure,
test_partial_failure}): Mock global config.
(RunAbipkgdiffWithDSOOnlyOptionTest): Removed.
(CompareABIFromCommandLineTest.test_compare_with_no_devel_pkg):
New test to test fedabipkgdiff with or without --no-devel-pkg
option.
* tests/data/Makefile.am: Add new rpms.
* tests/data/test-fedabipkgdiff/packages/nss-util/3.12.6/1.fc14/
x86_64/nss-util-3.12.6-1.fc14.x86_64.rpm: New rpm for running
tests.
* tests/data/test-fedabipkgdiff/packages/nss-util/3.12.6/1.fc14/
x86_64/nss-util-debuginfo-3.12.6-1.fc14.x86_64.rpm: New rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/nss-util/3.12.6/1.fc14/
x86_64/nss-util-devel-3.12.6-1.fc14.x86_64.rpm: New rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/nss-util/3.24.0/2.0.fc25/
x86_64/nss-util-3.24.0-2.0.fc25.x86_64.rpm: New rpm for running
tests.
* tests/data/test-fedabipkgdiff/packages/nss-util/3.24.0/2.0.fc25/
x86_64/nss-util-debuginfo-3.24.0-2.0.fc25.x86_64.rpm: New rpm
for running tests.
* tests/data/test-fedabipkgdiff/packages/nss-util/3.24.0/2.0.fc25/
x86_64/nss-util-devel-3.24.0-2.0.fc25.x86_64.rpm: New rpm for
running tests.
2016-06-03 Dodji Seketeli <dodji@redhat.com>
Improve python modules detection
* configure.ac: Include
autoconf-archive/ax_check_python_modules.m4 rather than
autoconf-archive/ax_python_module.m4. Use AX_CHECK_PYTHON_MODULES
rather than AX_PYTHON_MODULE.
* Makefile.am: Add the new file
autoconf-archive/ax_check_python_modules.m4 to source distribution
and remove the older autoconf-archive/ax_python_module.m4 one.
* autoconf-archive/ax_check_python_modules.m4: New file.
* autoconf-archive/ax_python_module.m4: Remove.
2016-05-30 Chenxiong Qi <cqi@redhat.com>
Add integration tests for fedabipkgdiff
* configure.ac: do not detect shutil module.
* tests/runtestfedabipkgdiff.py.in: do not import shutil
anymore.
(BUILT_ABIPKGDIFF): new global variable to reference the
abipkgdiff built from source code, as the new test case' tests
require this command directly rather than mocking the
global_config.
(test_data_dir): convert variable name to uppercase,
reference to the test data directory by absolute path instead of
relative path.
(TEST_TOPDIR): new global variable to use data directory as the
topdir passed to fedabpkgdiff to download rpms.
(TEST_DOWNLOAD_CACHE_DIR): new global variable referencing a
fake download cache directory for tests only.
(packages, builds, rpms): new global variables as a fake
storage holding packages, builds and rpms.
(AssertionHelper): new class helping to assert abipkgdiff
result easily.
(MockClientSession): new class to mock koji.ClientSession.
(MockGlobalConfig.abipkgdiff): set this option to global
variable BUILT_ABIPKGDIFF.
(MockKojiClientSessin): removed.
(mock_get_session): removed.
(GetPackageLatestBuildTest.{test_get_latest_one,
test_cannot_find_a_latest_build_with_invalid_distro,
test_cannot_find_a_latest_build_with_invalid_distro}): mock
koji.ClientSession with new class MockClientSession. Remove
invalid documentation from docstring. Use new package rather
than httpd.
(DownloadRPMTest.setUp): remove self.download_dir and use global
TEST_DOWNLOAD_CACHE_DIR.
(DownloadRPMTest.tearDown): do not remove download cache
directory.
(DownloadRPMTest.make_remote_file_url): do not omit positional
argument specifiers in string format.
(DownloadRPMTest.{test_succeed_to_download_a_rpm,
test_failed_to_download_a_rpm}): set fake download cache
directory to mocked get_download_dir in mock.patch decorator.
(BrewListRPMsTest.test_select_specific_rpms): use new
MockClientSession to mock koji.ClientSession. Rewrite test by
using the new package listed in global variable packages.
(RunAbipkgdiffWithDSOOnlyOptionTest.{test_abipkgdiff_with_dso_only,
test_abipkgdiff_without_dso_only}): set fake download cache
directory to mocked get_download_dir in mock.patch decorator.
(CompareABIFromCommandLineTest): new integration test case.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
i686/dbus-glib-0.100.2-2.fc20.i686.rpm: new rpm for running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
i686/dbus-glib-debuginfo-0.100.2-2.fc20.i686.rpm: new rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
i686/dbus-glib-devel-0.100.2-2.fc20.i686.rpm: new rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
x86_64/dbus-glib-0.100.2-2.fc20.x86_64.rpm: new rpm for running
tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
x86_64/dbus-glib-debuginfo-0.100.2-2.fc20.x86_64.rpm: new rpm
for running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
x86_64/dbus-glib-devel-0.100.2-2.fc20.x86_64.rpm: new rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
i686/dbus-glib-0.106-1.fc23.i686.rpm: new rpm for running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
i686/dbus-glib-debuginfo-0.106-1.fc23.i686.rpm: new rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
i686/dbus-glib-devel-0.106-1.fc23.i686.rpm: new rpm for running
tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
x86_64/dbus-glib-0.106-1.fc23.x86_64.rpm: new rpm for running
tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
x86_64/dbus-glib-debuginfo-0.106-1.fc23.x86_64.rpm: new rpm for
running tests.
* tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
x86_64/dbus-glib-devel-0.106-1.fc23.x86_64.rpm: new rpm for
running tests.
* tests/data/Makefile.am: add new rpms.
2016-05-31 Dodji Seketeli <dodji@redhat.com>
Bug 19967 - System-level suppressions for glibc
* default.abignore: Add initial suppression specifications for
glibc.
2016-05-31 Dodji Seketeli <dodji@redhat.com>
Escape all characters when reading a string in ini files
* src/abg-ini.cc (read_context::peek): Take an output parameter to
tell the caller when this function escaped the returned
character. Added an overload without this new parameter.
(read_context::read_string): Accept all characters as part of the
string.
* tests/data/test-diff-suppr/test7-var-suppr-9.suppr: New test
input.
* tests/data/test-diff-suppr/test7-var-suppr-report-9.txt: New
test reference output.
* tests/data/Makefile.am: Add the files above to source
distribution.
* tests/test-diff-suppr.cc (in_out_spec): Run a new comparison of
libtest7-var-suppr-v{0,1}.so this time using the new
test7-var-suppr-9.suppr specification that exercices a string with
the escaped characters that we were having difficulty with.
2016-05-31 Dodji Seketeli <dodji@redhat.com>
Don't require all version symbol sections to present
* src/abg-dwarf-reader.cc (get_symbol_versionning_sections): Allow
returning just some of the three version-related section, not
necessarily all of them. Adjust comment.
(get_version_for_symbol): Be ready to not necessarily having the
three version-related sections available.
2016-05-30 Dodji Seketeli <dodji@redhat.com>
Bug 20180 - Support system-wide suppression specifications
* doc/manuals/abidiff.rst: Document the default suppression
scheme, its interaction with the --supprs option and the new
--no-default option.
* doc/manuals/abipkgdiff.rst: Likewise.
* doc/manuals/fedabipkgdiff.rst: Likewise.
* configure.ac: Generate the tests/runtestdefaultsupprs.py file
from the new tests/runtestdefaultsupprs.py.in template.
* default.abignore: New file.
* Makefile.am: Add it to source distribution.
* src/Makefile.am: Define the ABIGAIL_ROOT_SYSTEM_LIBDIR
preprocessor macro that is set the value of the $libdir autotools
macro.
* include/abg-tools-utils.h: Update copyright years.
(get_system_libdir, get_default_system_suppression_file_path)
(get_default_user_suppression_file_path)
(load_default_system_suppressions)
(load_default_user_suppressions): Declare new functions
* src/abg-tools-utils.cc (get_system_libdir)
(get_default_system_suppression_file_path)
(get_default_user_suppression_file_path)
(load_default_system_suppressions)
(load_default_user_suppressions): Define new functions.
(is_regular_file): Amend this so that it return true for symlinks
to regular files too.
(is_dir): Amend this so that it returns true for symlinks to
directories too.
* tools/abidiff.cc (options::no_default_supprs): New data member.
(options::options): Initialize the new data member.
(display_usage): Display a new help string for the new
--no-default-suppression command line option.
(parse_command_line): Parse this new command line option.
(set_diff_context_from_opts): Load the default suppression
specifications, unless --no-default-suppression or --supprs was
provided.
* tools/abipkgdiff.cc (options::no_default_supprs): New data
member.
(options::options): Initialize the new data member.
(parse_command_line): Parse the new --no-default-suppression
command line option.
(main): Load the default suppression specifications, unless
--no-default-suppression or --supprs was provided.
* tools/fedabipkgdiff (abipkgdiff): Add --no-default-suppression
to the invocation of abipkgdiff if it was provided on the command
line.
(build_commandline_args_parser): Parse the new
--no-default-suppression command line option.
* tests/runtestdefaultsupprs.py.in: New test harness template.
* tests/Makefile.am: Add the new runtestdefaultsupprs.py to the
set of tests.
* tests/data/test-default-supprs/test0-type-suppr-0.suppr: New
test input.
* tests/data/test-default-supprs/test0-type-suppr-report-0.txt: Likewise.
* tests/data/test-default-supprs/test0-type-suppr-v0.o: Likewise.
* tests/data/test-default-supprs/test0-type-suppr-v1.o: Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir-report-0.txt:
Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir1: Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir2: Likewise.
* tests/data/Makefile.am: Add new the new tests input above to
Makefile.am.
* tests/runtestcanonicalizetypes.sh.in: Pass
--no-default-suppression to abidiff invocations.
* tests/runtestdefaultsupprs.py.in: Likewise.
* tests/test-abidiff-exit.cc: Likewise.
* tests/test-diff-dwarf-abixml.cc: Likewise.
* tests/test-diff-filter.cc: Likewise.
* tests/test-diff-suppr.cc: Likewise.
* tools/abidiff.cc: Likewise.
2016-05-30 Dodji Seketeli <dodji@redhat.com>
Add --abipkgdiff option to fedabipkgdiff
* tools/fedabipkgdiff (build_path_to_abipkgdiff): Define new
function.
(abipkgdiff): Invoke the new build_path_to_abipkgdiff() here.
(build_commandline_args_parser): Parse the new --abipkgdiff
option.
2016-05-28 Dodji Seketeli <dodji@redhat.com>
Better diagnostics when abipkgdiff has an extra argument
* tools/abipkgdiff.cc (options::wrong_arg): New data member.
(parse_command_line): Set options::wrong_arg
to the wrong argument passed.
(main): Tell wrong argument case apart, and report it.
2016-05-26 Dodji Seketeli <dodji@redhat.com>
Fix suppr spec wording in abipkgdiff manual
* doc/manuals/abipkgdiff.rst: Fix the wording for the --suppr
option.
2016-05-26 Dodji Seketeli <dodji@redhat.com>
Update reference to tools in libabigail-concepts manual
* doc/manuals/libabigail-concepts.rst: Do not refer just to
abidiff when talking about suppression specification. Also
refer to abipkgdiff and other tools.
2016-05-30 Dodji Seketeli <dodji@redhat.com>
Fix some wording in the Libabigail overview manual page
* doc/manuals/libabigail-overview.rst: Cleanup some confusion
about Abigail-the-framework and libabigail-the-library.
2016-05-25 Dodji Seketeli <dodji@redhat.com>
Add test data for tests/runtestfedabipkgdiff.py
* tests/data/test-fedabipkgdiff/dbus-glib-0.104-3.fc23.x86_64.rpm:
New file.
* tests/data/test-fedabipkgdiff/dbus-glib-0.80-3.fc12.x86_64.rpm: Likewise.
* tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm:
Likewise.
* tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm:
Likewise.
2016-05-25 Dodji Seketeli <dodji@redhat.com>
Add a 'check-valgrind' target to the top-most Makefile.am
* Makefile.am (check-valgrind): Add this new target here.
2016-05-21 Chenxiong Qi <cqi@redhat.com>
Bug 20085 - Add --dso-only option to fedabipkgdiff
* tools/fedabipkgdiff: Do not import shlex anymore.
(ABIDIFF_OK, ABIDIFF_ERROR, ABIDIFF_USAGE_ERROR)
(ABIDIFF_ABI_CHANGE): New global constant variables.
(abipkgdiff): Pass the --dso-only option to the abipkgdiff command
line tool, if that option was passed to fedabipkgdiff. Build this
abipkgdiff command invocation from an array of strings, rather
than from formatting a string. This makes us get rid of the shlex
module. Fix typo in dry-run logged string. If there was an
internal error reported by abipkgdiff, report it to stderr.
(build_commandline_args_parser): Parse the --dso-only command line
option.
* tests/runtestfedabipkgdiff.py.in (fedabipkgdiff_mod): Fix a typo
in initializing this global variable.
(test_data_dir): New global variable, that is used to reference
tests/data/test-fedabipkgdiff/.
(RunAbipkgdiffTest.{test_all_success, test_partial_failure}): Fix
typo.
(Mockglobalconfig.{koji_topdir, dso_only}): New data members.
(GetPackageLatestBuildTest.{test_get_latest_one,
test_cannot_find_a_latest_build_with_invalid_distro,
test_succeed_to_download_a_rpm, test_failed_to_download_a_rpm}):
Fix typo.
(BrewListRPMsTest.test_select_specific_rpms): Fix typo.
(RunAbipkgdiffWithDSOOnlyOptionTest): New test case class.
* doc/manuals/fedabipkgdiff.rst: update document for this new
--dso-only option.
* tests/data/test-fedabipkgdiff/dbus-glib-0.104-3.fc23.x86_64.rpm:
New symbolic link to
test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64.rpm.
* tests/data/test-fedabipkgdiff/dbus-glib-0.80-3.fc12.x86_64.rpm:
New symbolic link to
test-diff-pkg/dbus-glib-0.80-3.fc12.x86_64.rpm.
* tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm:
New symbolic link to
test-diff-pkg/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm.
* tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm:
New symbolic link to
test-diff-pkg/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm.
* tests/data/Makefile.am: add tests/data/test-fedabipkgdiff so
that this data directory and all things within it can be included
in tarball.
2016-05-24 Sinny Kumari <sinny@redhat.com>
Change parent directory for keeping extracted packages in abipkgdiff
* tools/abipkgdiff.cc (extracted_packages_parent_dir): Change
TMPDIR environment variable to XDG_CACHE_HOME and default
temporary parent directory to $HOME/.cache/libabigail/
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Make abi{pkg}diff filter out changes about private types
* include/abg-comp-filter.h: Update copyright year.
* src/abg-comp-filter.cc (has_virtual_mem_fn_change): Make this
static function become exported.
(has_virtual_mem_fn_change): Declare new function.
* include/abg-suppression.h
(suppression_base::{get,set}_is_artificial): Declare new
accessors.
(type_suppression::get_source_locations_to_keep): Return an
unordered set of strings, not a vector. Add a non-const overload.
(type_suppression::set_source_locations_to_keep): Set an unordered
set of strings, not a vector.
* src/abg-suppression.cc (suppression_base::priv::is_artificial_):
New data member.
(suppression_base::priv::priv): Initialize the new data member.
(suppression_base::{get,set}_is_artificial): Define new accessors.
(type_suppression::priv::source_locations_to_keep_): Change the
vector of strings representing source file names into unordered
set of string.
(type_suppression::get_source_locations_to_keep): Return an
unordered set of strings, not a vector. Define a non-const
overload.
(type_suppression::set_source_locations_to_keep): Set an unordered
set of strings, not a vector.
(type_suppression::suppresses_diff): Make this suppress virtual
member function diffs if the enclosing type of the changed virtual
member is suppressed by the current type_suppression.
(read_type_suppression): Adjust to use the fact that the source
locations are not stored in an unordered set, not in a vector
anymore. Otherwise, using a vector here make things too slow.
(type_suppression::suppresses_type): Likewise. Also, If the type
we are looking at has no location because it's a true opaque type
and if the current suppression is an artificial suppression that
is meant to suppress change reports about non-public types, then
suppress the type.
* include/abg-tools-utils.h (gen_suppr_spec_from_headers): Declare
new public function.
* src/abg-tools-utils.cc (PRIVATE_TYPES_SUPPR_SPEC_NAME): Define a
new constant variable.
(handle_fts_entry): Define new static function.
(gen_suppr_spec_from_headers): Define new public function.
* src/abg-comparison.cc
(corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars):
If a type suppression suppresses a given class C, make it change
added/removed virtual functions whose enclosing type is C.
* tools/abidiff.cc (options::{headers_dir1, headers_dir2}): New
data members.
(display_usage): Add help strings for --headers-dir1 and
--headers-dir2.
(parse_command_line): Parse the new --headers-dir1 and
--headers-dir2 options.
(set_diff_context_from_opts): Generate suppression specifications
to filter out changes on private types, if --headers-dir1 or
--headers-dir2 is given.
* tools/abipkgdiff.cc (options::{devel_package1, devel_package2}):
New data members.
(typedef package_sptr): New typedef.
(enum package::kind): New enum.
(package::kind_): New data member. This replaces ...
(package::is_debug_info_): ... this data member.
(package::{devel_package_, private_types_suppressions_}): New data
members.
(package::package): Adjust.
(package::get_kind): Define new member function. This replaces
...
(package::is_debug_info): ... this member function overload.
(package::set_kind): Define new member functin. It replaces ...
(package::is_debug_info): ... this member function overload.
(package::{devel_package, private_types_suppressions}): Define new
accessors.
(package::erase_extraction_directies): Erase the sub-directory
where development packages are extracted to.
(compare_args::private_types_suppr{1,2}): New data members.
(compare_args::compare_args): Adjust.
(display_usage): Add help strings for --devel-pkg1/--devel-pkg2.
(compare): Make the overload that compares elf files take private
types suppressions. Add the private types suppressions to the
diff context.
(pthread_routine_compare): Adjust the call to compare.
(maybe_create_private_types_suppressions): Define new static
function.
(pthread_routine_extract_pkg_and_map_its_content): If a devel
package was specified for the main package then extract it in
parallel with the other package extraction. When the extraction
is done, create private types suppressions by visiting the
directories that contain the header files.
(compare): In the overload that compares packages by scheduling
comparison of individual elf files that are in the packages, pass
in the private type suppressions too.
(parse_command_line): Parse the new --devel-pkg{1,2} command line
options.
(main): Associate the devel package to the main package, if the
--devel-pkg{1,2}.
* doc/manuals/abidiff.rst: Add documentation about the new
--headers-dir1 and --headers-dir2 options.
* doc/manuals/abipkgdiff.rst: Likewise, add documentation about
the new --devel-pkg1 and --devel-pkg2 libraries.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
New test reference output.
* tests/data/test-diff-pkg/tbb-devel-4.1-9.20130314.fc22.x86_64.rpm:
New test input package.
* tests/data/test-diff-pkg/tbb-devel-4.3-3.20141204.fc23.x86_64.rpm: Likewise.
* tests/test-diff-pkg.cc b/tests/test-diff-pkg.cc
(InOutSpec::{first,second}_in_devel_package_path): New data
members.
(in_out_specs): Adjust. Also, add a new entry describing the new
test inputs above.
(test_task::perform): When the new test entry contains devel
packages, pass them to abipkgdiff using the --devel1 and --devel2
options.
* tests/data/test-diff-suppr/test30-include-dir-v0/test30-pub-lib-v0.h:
A new test input source code.
* tests/data/test-diff-suppr/test30-include-dir-v1/test30-pub-lib-v1.h: Likewise.
* tests/data/test-diff-suppr/test30-priv-lib-v0.cc: Likewise.
* tests/data/test-diff-suppr/test30-priv-lib-v0.h: Likewise.
* tests/data/test-diff-suppr/test30-priv-lib-v1.cc: Likewise.
* tests/data/test-diff-suppr/test30-priv-lib-v1.h: Likewise.
* tests/data/test-diff-suppr/test30-pub-lib-v0.cc: Likewise.
* tests/data/test-diff-suppr/test30-pub-lib-v0.so: Add new test
binary input.
* tests/data/test-diff-suppr/test30-pub-lib-v1.cc: Add new test
input source code.
* tests/data/test-diff-suppr/test30-pub-lib-v1.so: Add new test
binary input.
* tests/data/test-diff-suppr/test30-report-0.txt: Add new test
reference output.
* tests/data/test-diff-suppr/test30-report-1.txt: Add new test
reference output.
* tests/test-diff-suppr.cc (InOutSpec::headers_dir{1,2}): New data
members.
(InOutSpec::abidiff_options): Renamed the bidiff_options data
member into this.
(in_out_specs): Adjust. Also, added the new test input above to
this.
(main): Adjust to invoke abidiff with the new --hd1 and --hd2
options if the input specs for the tests has the new
InOutSpec::headers_dir{1,2} data member set. Renamed bidiff into
abidiff.
* tests/data/Makefile.am: Add the new test inputs to the source
distribution.
2016-05-24 Dodji Seketeli <dodji@redhat.com>
Fix the number of removed functions in change report
* src/abg-suppression.cc (corpus_diff::report): Show the net
number of removed functions, not the total number of the removed
functions.
2016-05-23 Dodji Seketeli <dodji@redhat.com>
Document how to handle regression tests in CONTRIBUTING
* CONTRIBUTING: Add a section about regression tests.
* Makefile.am: Add a check-valgrind-recursive target.
2016-05-21 Dodji Seketeli <dodji@redhat.com>
Fix whitespaces in autotools files
* configure.ac: Fix some white spaces.
* tests/Makefile.am: Likewise.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Fix white space in abg-comparison.cc
* src/abg-comparison.cc (struct diff_context::priv): Fix indentation.
2016-05-21 Dodji Seketeli <dodji@redhat.com>
Fix bash completion configure status
* configure.ac: If bash completion is disabled, say so.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Enhance API doc for diff_context::add_diff
* src/abg-comparison.cc (diff_context::add_diff): Enhance the API
doc string.
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Add missing API doc strings
* src/abg-comparison.cc (diff::diff)
(decl_diff_base::decl_diff_base, distinct_diff::distinct_diff)
(base_diff::base_diff, scope_diff::scope_diff)
(fn_parm_diff::fn_parm_diff)
(function_type_diff::function_type_diff)
(type_decl_diff::type_decl_diff, typedef_diff::typedef_diff)
(translation_unit_diff::translation_unit_diff)
(corpus_diff::corpus_diff): Add missing API doc strings.
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Optimize out some shared_ptr use
* include/abg-ir.h (pointer_type_def::get_naked_pointed_to_type):
Declare new member function.
* src/abg-ir.cc (pointer_type_def::priv::naked_pointed_to_type_):
New data member.
(pointer_type_def::priv::priv): Adjust to initialize the new data
member.
(pointer_type_def::pointer_type_def): Adjust to use the
constructor pointer_type_def::priv::priv to initialize the
pointed-to type (including its new naked pointer variant). So we
do not have to initialize the priv_->pointed_to_type_ explicitely
in the constructor anymore.
(pointer_type_def::get_naked_pointed_to_type): Define new data
member.
(pointer_type_def::get_qualified_name): Use a naked pointer to the
pointed-to type, rather than a smart pointer.
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Light optimizations by passing reference to smart pointers around
* include/abg-fwd.h (get_type_name): Take a reference to type_sptr.
* src/abg-ir.cc (get_type_name): Take a reference to type_sptr.
(suppression_base::priv::{get_file_name_regex,
get_file_name_not_regex, get_soname_regex, get_soname_not_regex}):
Return a reference to regex_t_sptr.
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Minimize number of string::length calculation
* src/abg-tools-utils.cc (string_ends_with): Call string::length
just once on each instance of string that matters.
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Avoid unnecessary computation of type name in suppression evaluation
* src/abg-suppression.cc (type_suppression::suppresses_type): If
neither the type suppression "name" or "name_regex" properties
where provided in the suppression specification, then do not try
to look at the type name.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Plug leak of diffs of member variables of class type
* include/abg-comparison.h (diff_wptr, unordered_diff_sptr_set): New typedefs.
(struct diff_sptr_hasher): Define new type.
(diff_context::keep_diff_alive): Declare new member function.
(diff::children_nodes): Return a vector of diff*, rather than a
vector of diff_sptr.
* src/abg-comparison.cc (diff_context::priv::live_diffs_): New
data member.
(diff_context::keep_diff_alive): Define new data member.
(diff::priv::children_): Make this be a vector of diff*, rather
than a vector of diff_sptr.
(diff_less_than_functor::operator()): Add a new overload for
diff*. Make the existing overload of diff_sptr use the new one.
(diff::children_nodes): Adjust;
(diff::append_child_node): Make sure the child node is kept
alive. Only add the naked pointer to the child node to the vector
of children.
(diff::traverse): Adjust.
(var_diff::priv::type_diff_): Make this be a weak pointer, rather
than a shared pointer.
(var_diff::type_diff): The var_diff::priv::type_diff_ data member
is now a weak pointer, so make this accessor convert it to a
shared pointer.
(corpus_diff::priv::children_): Turn this into a vector of diff*,
rather than a vector of diff_sptr.
(corpus_diff::children_nodes): Adjust.
(corpus_diff::append_child_node): Make sure the child node is kept
alive. Only add the naked pointer to the child node to the vector
of children.
(category_propagation_visitor::visit_end): Adjust.
(suppression_categorization_visitor::visit_end): Adjust.
(redundancy_marking_visitor::{visit_begin, visit_end}): Adjust.
2016-05-20 Dodji Seketeli <dodji@redhat.com>
Speedup diff node child insertion
* src/abg-comparison.cc (corpus_diff::append_child_node): Insert
the new child at the right point in the vector of children, so
that it remains sorted.
2016-05-21 Dodji Seketeli <dodji@redhat.com>
Fix invocation of delete operator in test-read-dwarf.cc
* tests/test-read-dwarf.cc (main): Call delete[], not delete.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Plug leak of debug info handles
* configure.ac: Check the presence of dwarf_getalt in libdw. If
it's present, define the preprocessor macro
LIBDW_HAS_DWARF_GETALT. Update the autoconf configuration
summary.
* src/abg-dwarf-reader.cc: Add config.h.
(find_alt_debug_info_location): Factorize this out of ...
(find_alt_debug_info): ... this function. Use dwarf_getalt if
present, otherwise, keep using dwfl_standard_find_debuginfo. In
the later case, return the file descriptor opened to access the
alternate debug info, by parameter, so that the caller can fclose
it.
(read_context::alt_fd_): New data member.
(read_context::read_context): Initialize the new alt_fd_ data
member.
(read_context::load_debug_info): Store the file descriptor used to
access the alternate debug info into the new alt_fd_ data member.
(read_context::~read_context): New desctructor.
(get_soname_of_elf_file, get_type_of_elf_file): Free the elf
handle.
(read_context::load_debug_info): Be paranoid in making sure we
never override alt_dwarf_.
* tests/data/test-alt-dwarf-file/test0-report.txt: Adjust.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Plug leak of shared private data of class_diff type
* include/abg-comparison.h (class_diff::get_priv): Declare new
member function.
(class_diff::get_priv): Define new member function.
(class_diff::{chain_into_hierarchy, base_changes, deleted_bases,
inserted_bases, changed_bases, base_changes, member_types_changes,
member_types_changes, data_members_changes, inserted_data_members,
deleted_data_members, member_fns_changes, changed_member_fns,
member_fns_changes, deleted_member_fns, inserted_member_fns,
member_fn_tmpls_changes, member_class_tmpls_changes,
member_class_tmpls_changes, report}): Rather than accessing
class_diff::priv directly, use the new class_diff::get_priv.
2016-05-21 Dodji Seketeli <dodji@redhat.com>
Remove circular ref from class_decl::priv::definition_of_declaration
* include/abg-ir.cc (class_decl::get_definition_of_declaration):
Return a shared pointer, rather than a reference to a shared pointer.
* src/abg-ir.cc (class_decl::priv::definition_of_declaration_):
Make this be a weak pointer.
(class_decl::get_definition_of_declaration):
Likewise. And return the shared pointer built out of the weak
pointer we have in there now.
2016-05-21 Dodji Seketeli <dodji@redhat.com>
Plug leak of regex_t in suppression engine
* include/abg-sptr-utils.h (build_sptr<T>): Declare an overload that
allocates a T* and wraps it into a shared_ptr<T>.
(build_sptr<regex_t>): Declare a specialization for regex_t.
* src/abg-corpus.cc (build_sptr<regex_t>()): Define the
specialization here.
* src/abg-suppression.ccp
(suppression_base::priv::{get_file_[not]_name_regex,
get_soname_[not]_regex}): Use the new build_sptr<regex_t>().
(type_suppression::priv::{get_type_name_regex,
get_source_location_to_keep_regex}): Likewise.
(function_suppression::parameter_spec::priv::get_type_name_regex):
Likewise.
(function_suppression::priv::{get_name_regex,
get_return_type_regex, get_symbol_name_regex,
get_symbol_version_regex}): Likewise.
(variable_suppression::priv::{get_name_regex,
get_symbol_name_regex, get_symbol_version_regex,
get_type_name_regex}): Likewise.
2016-05-18 Dodji Seketeli <dodji@redhat.com>
Plug leak of diff_context_sptr after calling compute_diff
* src/abg-comparison.cc (diff::priv::ctxt_): Make this a weak_ptr.
(diff::priv::get_context): Convert the weak pointer to the context
into a shared_ptr and return it.
(diff::priv::is_filtered_out): Adjust to use
diff::priv::get_context() to access the context.
(diff::context): Likewise.
(corpus_diff::priv::ctxt_): Make this a weak_ptr.
(corpus_diff::priv::priv): Add a new overload that takes two
corpora and a diff context.
(corpus_diff::priv::get_context): Convert the weak pointer to the
context into a shared_ptr and return it.
(corpus_diff::priv::ensure_lookup_tables_populated): Adjust to use
the new corpus_diff::priv::get_context to get the context.
(variable_is_suppressed): Likewise.
(corpus_diff::priv::{apply_suppressions_to_added_removed_fns_vars,
apply_filters_and_compute_diff_stats, emit_diff_stats,
categorize_redundant_changed_sub_nodes,
clear_redundancy_categorization}): Likewise.
(corpus_diff::{corpus_diff, context,
apply_filters_and_suppressions_before_reporting}): Adjust.
* tools/abipkgdiff.cc (compare): Make the overload that compares
elf binaries take a diff context output parameter. After the
context is created by this function, it's return to the caller, so
that it's life time is bound to the scope this function was
called from.
(pthread_routine_compare): Create a shared pointer to hold a
reference on a diff context. Pass that shared pointer by
reference to the compare function that compares elf binaries.
Rather than storing corpora in the reports_map, (as those corpora
would then out-live the diff context and thus create memory
corruption issues), emit the report directly into an ostringstream
and store that stream in reports_map.
(compare): In the overoad that compares packages, rather than
trying to get corpora from the report_map, just emit the content
of the ostringstream that is now there.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Fix a read passed-the-end in abg-dwarf-reader.cc
* src/abg-dwarf-reader.cc (lookup_symbol_from_gnu_hash_tab): Do
not read passed the end of the array.
2016-05-21 Dodji Seketeli <dodji@redhat.com>
Support running "make check-valgrind"
* autoconf-archive/ax_valgrind_check.m4: Add new file. Copied it
from http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html.
* configure.ac: Include the new ax_valgrind_check.m4 file.
Initialize the valgrind checking on tests. Update the configure
status.
* tests/test-valgrind-suppressions.supp: New valgrind suppression
file to silence memcheck leak errors from python.
* tests/Makefile.am: Add test-valgrind-suppressions.supp to source
distribution. Add check-valgrind-memcheck-recursive target.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Update the CONTRIBUTING file
* CONTRIBUTING: Cleanup.
2016-05-22 Dodji Seketeli <dodji@redhat.com>
Update the COMMIT-LOG-GUIDELINES file
* COMMIT-LOG-GUIDELINES: Various enhancements.
2016-05-16 Dodji Seketeli <dodji@redhat.com>
Do not run fedabipkgdiff tests if --enable-fedabipkgdiff is turned off
* tests/Makefile.am: Make running runtestfedabipkgdiff be
dependent on ENABLE_FEDABIPKGDIFF.
2016-05-13 Chenxiong Qi <cqi@redhat.com>
Fix pep8 error
* tools/fedabipkgdiff (build_commandline_args_parser): Fix
PEP8 error, line is too long.
2016-05-13 Chenxiong Qi <cqi@redhat.com>
Use consistent string format
* tools/fedabipkgdiff (download_rpm): do not omit positional
argument specifiers in string format.
2016-05-16 Dodji Seketeli <dodji@redhat.com>
Remove config.h.in from the repository
* config.h.in: Remove from repository.
2016-02-09 Chenxiong Qi <cqi@redhat.com>
Bug 19428 - New fedabipkgdiff utility
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
2016-05-07 Dodji Seketeli <dodji@redhat.com>
Implement a [suppress_file] suppression directive
* doc/manuals/libabigail-concepts.rst: Document the new
'suppress_file' directive.
* include/abg-suppression.h (file_suppression): Define new class.
(file_suppression_sptr): Define new typedef.
(is_file_suppression, file_is_suppressed): Declare new functions.
* src/abg-suppression.cc ():
(read_file_suppression, is_file_suppression, file_is_suppressed):
Define new functions.
(file_suppression::{file_suppression, suppresses_file,
~file_suppression}): Define new member functions.
* tools/abidiff.cc (main): If a suppression specification
suppresses one of the input files, then do not perform the
comparison.
* tools/abipkgdiff.cc (compare): If a suppression specification
suppresses a file that is to be compared, then do not perform the
comparison.
* tools/abicompat.cc (create_diff_context): New static function.
(perform_compat_check_in_normal_mode)
(perform_compat_check_in_weak_mode): Adjust to take a context in
parameter. Do not create a diff context here anymore, do not load
suppression files here either.
(main): Use the new create_diff_context to create a diff context
and initialize it, including loading suppression specifications.
If any suppression specification suppresses a file to load, then
do not load perform any compatibility checking. Adjust
invocations of perform_compat_check_in_weak_mode and
perform_compat_check_in_normal_mode to pass the diff context.
* tests/data/test-diff-suppr/test0-type-suppr-3.suppr: New test
input.
* tests/data/test-diff-suppr/test0-type-suppr-4.suppr: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-5.suppr: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-5.txt:
Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-6.suppr: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-6.txt:
Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-7.txt:
Likewise.
* tests/test-diff-suppr.cc (in_out_specs): Use the new test
inputs.
* tests/data/test-abicompat/test0-fn-changed-1.suppr: New test
input.
* tests/data/test-abicompat/test0-fn-changed-report-3.txt:
Likewise.
* tests/test-abicompat.cc (in_out_specs):: Use the new test
inputs.
* tests/data/Makefile.am: Add the new test material to source
distribution.
2016-05-07 Dodji Seketeli <dodji@redhat.com>
Split suppression engine off of abg-comparison.{cc,h}
* include/Makefile.am: Add abg-suppression.h to source
distribution.
* include/abg-comparison.h: Remove abg-ini.h include directive.
(suppression_sptr, suppressions_type): Move these typedefs to
abg-fwd.h.
(class suppression_base, type_suppression)
(type_suppression::insertion_range)
(type_suppression::insertion_range::boundary)
(type_suppression::insertion_range::integer_boundary)
(type_suppression::insertion_range::fn_call_expr_boundary)
(function_suppression, function_suppression::parameter_spec)
(variable_suppression): Move these type definitions to the new
abg-suppression.h.
(read_suppressions, is_type_suppression, is_integer_boundary)
(is_fn_call_expr_boundary, is_function_suppression)
(is_variable_suppression, operator&)
(operator|): Move these function declarations to the new
abg-suppression.h.
(type_suppression, type_suppression_sptr, type_suppression_type)
(function_suppression, function_suppression_sptr)
(function_suppressions_type, variable_suppression)
(variable_suppression_sptr, variable_suppressions_type): Move
these forward declaration and typedefs to the new
abg-suppression.h.
(diff_context::suppressions): Adjust return type to
suppr::suppressions_type&.
(diff_context::add_suppression): Adjust parameter type to
suppr::suppressions_sptr.
(diff_context::add_suppressions): Adjust parameter type
suppr::suppressions_type&.
(is_type_diff, is_decl_diff, is_var_diff, is_function_decl_diff)
(is_pointer_diff, is_reference_diff, is_fn_parm_diff)
(is_base_diff, is_child_node_of_function_parm_diff)
(is_child_node_of_base_diff): Declare these new functions. They
were previously static, local to abg-comparison.cc only. Now they
need to be exported because they are used by the suppression
engine's code that now lives in its one files.
* include/abg-fwd.h (suppr::{suppression_base, suppression_sptr,
suppressions_type}): Forward declare these here.
* include/abg-suppression.h (class suppression_base)
(type_suppression, type_suppression::insertion_range)
(type_suppression::insertion_range::boundary)
(type_suppression::insertion_range::integer_boundary)
(type_suppression::insertion_range::fn_call_expr_boundary)
(function_suppression, function_suppression::parameter_spec)
(variable_suppression): Move these type definitions here, in the
namespace suppr.
(read_suppressions, is_type_suppression, is_integer_boundary)
(is_fn_call_expr_boundary, is_function_suppression)
(is_variable_suppression, operator&)
(operator|): Move these function decalration here, in the
namespace suppr.
(type_suppression_sptr, type_suppressions_type)
(function_suppression_sptr, function_suppressions_type)
(variable_suppression_sptr, variable_suppressions_type): Move
these typedefs here, in the namespace suppr.
* src/Makefile.am: add src/abg-suppression.cc to source
distribution.
* src/abg-comparison.cc (is_type_diff, is_decl_diff, is_var_diff)
(is_function_decl_diff, is_pointer_diff, is_reference_diff)
(is_reference_or_pointer_diff, is_fn_parm_diff, is_base_diff)
(is_child_node_of_function_parm_diff, is_child_node_of_base_diff):
Export these functions.
(*suppression*): Move all the suppression-related definitions to
the new abg-suppression.cc.
* src/abg-suppression.cc: New file. Contains all the *suppression*
definitions from src/abg-comparison.cc, that are put in the suppr
namespace.
* tools/abicompat.cc: Adjust.
* tools/abidiff.cc: Likewise.
* tools/abipkgdiff.cc: Likewise.
2016-05-08 Dodji Seketeli <dodji@redhat.com>
Fix indentation for abidiff manual
* doc/manuals/abidiff.rst: Fix indentation for the --suppression
paragraph.
2016-05-08 Dodji Seketeli <dodji@redhat.com>
Add several shortcuts to options for abicompat
* doc/manuals/abicompat.rst: Update documentation.
* tools/abicompat.cc (display_usage): Update help strings.
(parse_command_line): Add shortcuts --suppr, --appd, --libd1 and
--libd2.
2016-05-08 Dodji Seketeli <dodji@redhat.com>
Update copyright year in tools/abicompat.cc
* tools/abicompat.cc: Update copyright years to 2016.
2016-05-07 Dodji Seketeli <dodji@redhat.com>
Fix mention of tool's name in abidiff error message
* src/abg-tools-utils.cc (emit_prefix): Try to emit the prefix
only if the program name was provided.
* abidiff.cc (maybe_check_suppression_files): Pass the name of the
tool to the check_file function.
2016-05-07 Dodji Seketeli <dodji@redhat.com>
Update copyright year on abg-comparison.h
* include/abg-comparison.h: Update copyright year.
2016-05-08 Dodji Seketeli <dodji@redhat.com>
Doc not show classes' inherited members in apidoc
* doc/api/libabigail.doxy: Don't show inherited member functions
or variables of a given class.
2016-05-08 Dodji Seketeli <dodji@redhat.com>
Fix typo in concept manual
* doc/manuals/libabigail-concepts.rst: Do not refer to abidiff
specifically for suppressions because several tools use
suppressions.
2016-05-08 Dodji Seketeli <dodji@redhat.com>
Fix indentation in concepts manual
* doc/manuals/libabigail-concepts.rst: Fix indentation.
2016-05-06 Dodji Seketeli <dodji@redhat.com>
Add some apidoc to dwarf_reader
* include/abg-dwarf-reader.h (namespace dwarf_reader): Add apidoc.
(enum elf_type): Add an apidoc for each enumerator.
* src/abg-dwarf-reader.cc (get_type_of_elf_file): Add an apidoc
for the 'type' parameter.
2016-04-28 Dodji Seketeli <dodji@redhat.com>
[abipkgdiff] Show SONAME of removed/added libraries
* tools/abipkgdiff.cc (abi_diff::{added,removed}_binaries): Change
the type of these data member from vector<string> to
vector<elf_file_sptr>.
(compare): Adjust. Show the soname of added/removed binaries.
2016-04-27 Dodji Seketeli <dodji@redhat.com>
Bug 20015 - support file_name_not_regexp and soname_not_regexp in suppr specs
* include/abg-comparison.h
(suppression_base::{get,set}_file_name_not_regex_str): Declare new
member functions.
(suppression_base::{get,set}_soname_not_regex_str): Likewise.
(suppression_base::{names,sonames}_of_binaries_match): Likewise.
* src/abg-comparison.cc
(suppression_base::priv::get_file_name_regex): Fix comment.
(suppression_base::priv::get_file_name_not_regex): New member
function.
(suppression_base::priv::get_soname_regex): Fix comment.
(suppression_base::priv::get_soname_not_regex): New member
function.
(suppression_base::{get,set}_file_name_not_regex_str): Define new
member functions.
(suppression_base::{get,set}_soname_not_regex_str): Likewise.
(suppression_base::{names,sonames}_of_binaries_match): Likewise.
These got factorized out of type_suppression::suppresses_type,
function_suppression::suppresses_function,
function_suppression::suppresses_function_symbol,
variable_suppression::suppresses_variable,
variable_suppression::suppresses_variable_symbol.
(type_suppression::suppresses_type): Use the new
suppression_base::{names,sonames}_of_binaries_match.
(read_type_suppression): Read the new file_name_not_regexp and
soname_not_regexp properties.
(function_suppression::{suppresses_function,
suppresses_function_symbol}): Use the new
suppression_base::{names,sonames}_of_binaries_match.
(read_function_suppression): Read the new file_name_not_regexp and
soname_not_regexp properties.
(variable_suppression::{suppresses_variable,
variable_suppression::suppresses_variable_symbol}): Use the new
suppression_base::{names,sonames}_of_binaries_match.
(read_variable_suppression): Use the new
suppression_base::{names,sonames}_of_binaries_match.
* doc/manuals/libabigail-concepts.rst: Document the new
file_name_not_regexp and soname_not_regexp suppression properties.
* tests/data/test-diff-suppr/test24-soname-report-10.txt: New test
reference output.
* tests/data/test-diff-suppr/test24-soname-report-11.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-12.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-13.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-14.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-15.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-16.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-9.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-10.txt: New test input.
* tests/data/test-diff-suppr/test24-soname-suppr-11.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-12.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-13.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-14.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-15.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-16.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-9.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-2.txt: New test
reference output.
* tests/data/test-diff-suppr/test29-soname-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-5.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-6.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-7.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-8.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-2.txt: New test input.
* tests/data/test-diff-suppr/test29-suppr-3.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-4.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-5.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-6.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-7.txt: Likewise.
* tests/data/test-diff-suppr/test29-suppr-8.txt: Likewise.
* tests/data/Makefile.am: Add the new test material to source
distribution.
* tests/test-diff-suppr.cc (in_out_specs): Make this test harness
run over the new test inputs.
2016-04-27 Dodji Seketeli <dodji@redhat.com>
Make API documentation of thread pools visible
* include/abg-workers.h: Document the workers namespace, the task,
queue and queue::task_done_notify types.
* src/abg-workers.cc: Move the documentation of the thread_pool
module inside the abigail::worker namespace, so that references to
task and queue types (which are also in the abigail::worker
namespace) can be resolved in the apidoc.
2016-04-27 Dodji Seketeli <dodji@redhat.com>
Update documentation to require doxygen and python-sphinx for building
* COMPILING: Add python-sphinx to the set of required packages to
build the documentation.
* doc/website/mainpage.txt: Update the website to mention doxygen
and python-sphinx for documentation.
2016-04-27 Dodji Seketeli <dodji@redhat.com>
Add doc, info, man and html-doc targets to generate documentation
* Makefile.am: Add info, man and html-doc targets to generate
documentation in info, man and html formats. If you want to
generate them all, then the doc target is the one to be used.
* COMPILING: Add documentation for the above.
2016-04-25 Dodji Seketeli <dodji@redhat.com>
Bug 19964 - Cannot load function aliases on ppc64
* src/abg-dwarf-reader.cc (read_context::load_symbol_maps): While
filling the ppc64-specific "function-entry-address => symbol" map,
if we stumble accross a function-entry-address that belongs to an
alias of 'symbol', then assume the alias must have been registered
as an alias already, by the platform-agnostic code. Do not try to
register the alias again.
* tests/data/Makefile.am: Add the new test input binaries to the
source distribution.
* tests/data/test-diff-dwarf/libtest36-ppc64-aliases-v0.so: New
binary test input.
* tests/data/test-diff-dwarf/libtest36-ppc64-aliases-v1.so: Likewise.
* tests/data/test-diff-dwarf/test36-ppc64-aliases-report-0.txt:
New test reference output.
* tests/data/test-diff-dwarf/test36-ppc64-aliases-v0.cc: Source
code for the new binary test input above.
* tests/data/test-diff-dwarf/test36-ppc64-aliases-v1.cc: Likewise.
* tests/test-diff-dwarf.cc: Add the new test input to the list of
test inputs considered by this test harness.
2016-04-20 Sinny Kumari <sinny@redhat.com>
Bug 19961 - Distinguish between PI executable and shared library
* include/abg-dwarf-reader.h (elf_type): Add new enumerator
ELF_TYPE_PI_EXEC.
* src/abg-dwarf-reader.cc
(lookup_data_tag_from_dynamic_segment): New function for
data tag lookup in dynamic segment of an elf
(elf_file_type): Return ELF_TYPE_PI_EXEC file type for
a PI executable.
(get_elf_file_type): Change this to take an elf handle.
(get_type_of_elf_file): New function that got factorized out of ...
(load_dt_soname_and_needed): ... this one.
* tools/abipkgdiff.cc (create_maps_of_package_content): Also
consider ELF_TYPE_PI_EXEC file type.
(compare): Likewise.
* tests/test-diff-pkg.cc (in_out_specs): Test case additions
* tests/data/Makefile.am: Include test files
* tests/data/test-diff-pkg/tarpkg-1-dir1.tar.gz: New test data
* tests/data/test-diff-pkg/tarpkg-1-dir2.tar.gz: New test data
* tests/data/test-diff-pkg/tarpkg-1-report-0.txt: New test result
2016-04-17 Dodji Seketeli <dodji@redhat.com>
Update website to 1.0.rc4
* doc/website/mainpage.txt: Update tarball reference to 1.0.rc4
2016-04-17 Dodji Seketeli <dodji@redhat.com>
Bump current version number to 1.0.rc5
* configure.ac: Bump current version number to 1.0.rc5
2016-04-17 Dodji Seketeli <dodji@redhat.com>
Add a 'release' target to main Makefile
* Makefile.am: Add tarball, upload-release-only, upload-release
and release targets.
2016-04-11 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog for 1.0.rc4
* ChangeLog: Update automatically by running "make
update-changelog"
2016-04-11 Dodji Seketeli <dodji@redhat.com>
Update NEWS for 1.0.rc4
* NEWS: Update for 1.0.rc4
2016-04-16 Dodji Seketeli <dodji@redhat.com>
Fix typos in the suppression specifications manual
* doc/manuals/libabigail-concepts.rst: Fix typos.
2016-04-16 Dodji Seketeli <dodji@redhat.com>
Ease use of soname_regexp/file_name_regexp in suppr specs
* doc/manuals/libabigail-concepts.rst: Update the manual to
reflect the changes in the suppression_type, suppress_function and
suppress_variable directives.
* src/abg-comparison.cc (read_type_suppression): Accept that
the suppress_type directive contains only file_name_regexp
or the soname_regexp property.
(read_function_suppression): Likewise for the suppress_function
directive.
(read_variable_suppression): Likewise for the suppress_variable
directive.
* tests/data/test-diff-suppr/libtest29-soname-v0.so: New binary
test input.
* tests/data/test-diff-suppr/libtest29-soname-v1.so: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-5.txt: New
reference test output.
* tests/data/test-diff-suppr/test24-soname-report-6.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-7.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-report-8.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-5.txt: New test
suppression file.
* tests/data/test-diff-suppr/test24-soname-suppr-6.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-7.txt: Likewise.
* tests/data/test-diff-suppr/test24-soname-suppr-8.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-report-0.txt: New
reference test output.
* tests/data/test-diff-suppr/test29-soname-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test29-soname-v0.cc: Source code for
the new binary output above.
* tests/data/test-diff-suppr/test29-soname-v1.cc: Likewise.
* tests/data/test-diff-suppr/test29-suppr-0.txt: New test
suppression file.
* tests/data/test-diff-suppr/test29-suppr-1.txt: Likewise.
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-diff-suppr.cc (in_out_specs): Make this test harness
run over the new test input above.
2016-03-31 Dodji Seketeli <dodji@redhat.com>
Fix comments in tests/test-diff-pkg.cc
* tests/test-diff-pkg.cc: Fix the wording of the introductory
comments.
2016-03-30 Dodji Seketeli <dodji@redhat.com>
Bug 19885 - Cannot associates a function DIE to a symbol on powerpc64
*from* the address of its entry point.
More precisely, on ppc64, the address of a function is the address of
a function descriptor. The function descriptor is a set of three 64
bits addresses. The first element of the triplet is the function
entry pointer address. So to get the symbol a given function entry
point address belongs to, one must get to the function descriptor
which contains said function entry point address. And function
descriptors are in the ".opd" special section.
Unfortunately, Libabigail's ELF/DWARF reader has no knowledge of all
this. So it cannot get the symbol of a given function DWARF
description. So it considers all functions as having no ELF symbols.
So it shows no ABI change pertaining to function sub-types on ppc64.
This patch makes Libabigail support function descriptors on ppc64 so
it can detect changes on function sub-types there.
* src/abg-dwarf-reader.cc (read_context::{opd_section_,
fun_entry_addr_sym_map_}): New data members.
(read_context::read_context): Initialize the new opd_section_ data
member.
(read_context::{find_opd_section,
lookup_ppc64_elf_fn_entry_pointer_address,
fun_entry_addr_sym_map_sptr, fun_entry_addr_sym_map,
elf_architecture_is_ppc64, elf_architecture_is_big_endian}): New
member functions.
(read_context::lookup_elf_fn_symbol_from_address): Adjust to use
the new read_context::fun_entry_addr_sym_map() function.
(read_context::load_symbol_maps): Populate the function entry
addresses -> symbol map, for ppc64 ELFv1.
(read_context::load_elf_properties): Renamed
read_context::load_remaining_elf_data into this.
(read_corpus_from_elf): Load elf properties before trying to load
elf symbols information.
* tests/data/test-diff-filter/libtest32-struct-change-v0.so: New
binary test input, compiled for ppc64le.
* tests/data/test-diff-filter/libtest32-struct-change-v1.so: Likewise.
* tests/data/test-diff-filter/test32-ppc64le-struct-change-report0.txt:
New test reference output.
* tests/data/test-diff-filter/test32-ppc64le-struct-change-v0.c:
Source code of the new binary test input above.
* tests/data/test-diff-filter/test32-ppc64le-struct-change-v1.c:
Likewise.
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-diff-filter.cc (in_out_spec): Make this test harness
run over the new test input binaries above.
2016-03-25 Dodji Seketeli <dodji@redhat.com>
Fix logs in abipkgdiff and add some more
* tools/abipkgdiff.cc (compare): Fix logs to make them more
readable in a multithreaded context.
(create_maps_of_package_content): Likewise. Add logs about the
number of elf files found in a given directory. Add logs about
skipping files.
2016-03-25 Dodji Seketeli <dodji@redhat.com>
Bug 19867 - abipkgdiff skips symbolic links
* include/abg-tools-utils.h (maybe_get_symlink_target_file_path):
Declare new function.
* src/abg-tools-utils.cc (get_stat): Use lstat here, not stat.
Update comment.
* tools/abipkgdiff.cc (first_package_tree_walker_callback_fn)
(second_package_tree_walker_callback_fn): Follow symbolic links to
elf files to get their target paths, and only work with that
target path.
(maybe_get_symlink_target_file_path): Define new function.
* test-diff-pkg/symlink-dir-test1-report0.txt New test material.
* test-diff-pkg/symlink-dir-test1/dir1/symlinks/foo.o: Likewise.
* test-diff-pkg/symlink-dir-test1/dir1/symlinks/libfoo.so: Likewise.
* test-diff-pkg/symlink-dir-test1/dir1/targets/foo.c: Likewise.
* test-diff-pkg/symlink-dir-test1/dir1/targets/foo.o: Likewise.
* test-diff-pkg/symlink-dir-test1/dir1/targets/libfoo.so: Likewise.
* test-diff-pkg/symlink-dir-test1/dir2/symlinks/foo.o: Likewise.
* test-diff-pkg/symlink-dir-test1/dir2/symlinks/libfoo.so: Likewise.
* test-diff-pkg/symlink-dir-test1/dir2/targets/foo.c: Likewise.
* test-diff-pkg/symlink-dir-test1/dir2/targets/foo.o: Likewise.
* test-diff-pkg/symlink-dir-test1/dir2/targets/libfoo.so: Likewise.
* tests/data/Makefile.am: Add the new test material to source
distribution.
* tests/test-diff-pkg.cc (in_out_spec): Run this test harness
over the new test material above.
2016-03-21 Dodji Seketeli <dodji@redhat.com>
Fix typo on the web page
* doc/website/mainpage.txt: Fix typo.
2016-03-18 Roland McGrath <roland@hack.frob.com>
Fix typo in configure --enable-deb help text
* configure.ac: Fix typo in --enable-deb usage text.
2016-03-18 Dodji Seketeli <dodji@redhat.com>
Bug 19846 - variable decl associated with the wrong debug info section
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Associate the
decl of the variable to the same debug info file (alternate or
not) as the DIE, not as its specification DIE.
2016-03-18 Dodji Seketeli <dodji@redhat.com>
Fix typo in the manual of abidiff
* doc/manuals/abidiff.rst: Fix typo.
2016-03-18 Dodji Seketeli <dodji@redhat.com>
Fix typos in comments in src/abg-dwarf-reader.cc
* src/abg-dwarf-reader.cc (read_context::{die_type_map,
is_wip_class_die_offset, is_wip_function_type_die_offset}): Fix
typo in comments.
2016-03-18 Dodji Seketeli <dodji@redhat.com>
Bug 19844 - Cannot try to canonicalize a type that is being constructed
* src/abg-dwarf-reader.cc
(read_context::{alternate_die_wip_classes_map_,
alternate_die_wip_function_types_map_}): New data members.
(read_context::lookup_type_from_die_offset): Lookup WIP class and
function types too.
(read_context::{die_wip_classes_map, die_wip_function_types_map}):
Take a flag saying if we should get the map for the alternate
debug info section or not.
(read_context::{is_wip_class_die_offset,
is_wip_function_type_die_offset}): Take a flagy saying if the DIE
is in the alternate debug info section or not.
(build_class_type_and_add_to_ir, build_function_type)
(maybe_canonicalize_type): Adjust.
(build_ir_node_from_die): Do not call maybe_canonicalize_type on
type DIEs which no type has been constructed for.
* tests/data/test-diff-pkg/gtk2-debuginfo-2.24.22-5.el7.i686.rpm:
New test input.
* tests/data/test-diff-pkg/gtk2-debuginfo-2.24.28-8.el7.i686.rpm:
Likewise.
* tests/data/test-diff-pkg/gtk2-immodule-xim-2.24.22-5.el7.i686.rpm:
Likewise.
* tests/data/test-diff-pkg/gtk2-immodule-xim-2.24.28-8.el7.i686.rpm:
Likewise.
* tests/data/test-diff-pkg/gtk2-immodule-xim-2.24.22-5.el7.i686--gtk2-immodule-xim-2.24.28-8.el7.i686-report-0.txt:
New test reference output.
* tests/data/Makefile.am: Add the new test material to the source
distribution.
* tests/test-diff-pkg.cc (in_out_spec): Make this test harness run
on the new test input above.
2016-03-16 Dodji Seketeli <dodji@redhat.com>
Fix a typo in include/abg-tools-utils.h
* include/abg-tools-utils.h (enum abidiff_status): Fix typo in
comment.
2016-03-16 Dodji Seketeli <dodji@redhat.com>
Update copyright dates for the manuals
* doc/manuals/conf.py: Update copyright years.
2016-03-16 Dodji Seketeli <dodji@redhat.com>
More docs about ABIDIFF_ABI_INCOMPATIBLE_CHANGE
* doc/manuals/abidiff.rst: Explain the kind of changes that flip
the ABIDIFF_ABI_INCOMPATIBLE_CHANGE flag.
2016-03-09 Dodji Seketeli <dodji@redhat.com>
Fix typos on the web page
* doc/website/mainpage.txt: Fix typos.
2016-03-08 Dodji Seketeli <dodji@redhat.com>
Bump version number to 1.0.rc4
* configure.ac: Bump version number to 1.0.rc4
2016-03-08 Dodji Seketeli <dodji@redhat.com>
Fix potential race condition in test-diff-pkg.cc
* tests/test-diff-pkg.cc (in_out_spec): Make the tar format tests
output have different names.
2016-03-08 Dodji Seketeli <dodji@redhat.com>
Updated website to point to 1.0.rc3 tarball
* doc/website/mainpage.txt: Updated website to point to 1.0.rc3
tarball.
2016-03-08 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog before 1.0.rc3
* ChangeLog: Update for 1.0.rc3
2016-03-08 Dodji Seketeli <dodji@redhat.com>
Update NEWS file for 1.0.rc3
* NEWS: update for 1.0.rc3
2016-03-07 Dodji Seketeli <dodji@redhat.com>
Walk function_type_diff tree in a deterministic way
* src/abg-comparison.cc
(function_type_diff::priv::{sorted_subtype_changed_parms_,
sorted_changed_parms_by_id_}): Add two data members.
(function_type_diff::ensure_lookup_tables_populated): Sort the
changed parameters here ...
(function_type_diff::report): ... not here.
(function_type_diff::chain_into_hierarchy): Chain the *sorted*
changed parameters.
2016-03-07 Dodji Seketeli <dodji@redhat.com>
Fix reference to test file in Makefile.am
* tests/data/Makefile.am: Fix bogus reference to
libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt.
2016-03-07 Dodji Seketeli <dodji@redhat.com>
Bug 19780 - abipkgdiff doesn't support parallel execution
* tools/abipkgdiff.cc: Update copyright notice.
(package::extracted_packages_parent_dir): Use mkdtemp to generate
the unique root directory under which packages are extracted.
* tests/test-diff-pkg.cc (struct test_task): New type.
(main): Use worker threads to run abipkgdiff in parallel,
depending on the number of CPUs advertised by the underlying
machine.
2016-03-07 Dodji Seketeli <dodji@redhat.com>
Bug 19778 - diff_has_ancestor_filtered_out() loops forever
* src/abg-comparison.cc (diff_has_ancestor_filtered_out): Add an
overload that takes an additional map of pointer values. Make the
older overload call the new one.
* tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm: New test material.
* tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt:
New reference output.
* tests/data/test-diff-pkg/libICE-1.0.9-2.el7.x86_64.rpm: New test material.
* tests/data/test-diff-pkg/libICE-debuginfo-1.0.6-1.el6.x86_64.rpm: New test material.
* tests/data/test-diff-pkg/libICE-debuginfo-1.0.9-2.el7.x86_64.rpm:
New test material.
* tests/data/Makefile.am: Add the new test material to source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Run this test harness
over the new tests material above.
2016-03-07 Dodji Seketeli <dodji@redhat.com>
Forgot to add test2-filtered-removed-fns-v{0,1}.o
* test2-filtered-removed-fns-v{0,1}.o: Add these test input files.
2016-03-03 Dodji Seketeli <dodji@redhat.com>
Bug 19596 - Suppressed removed symbol changes still considered incompatible
* src/abg-comparison.cc (corpus_diff::has_incompatible_changes):
Consider the *net* number of removed function and variable
symbols. Also, if all function sub-type changes have been
suppressed, then no virtual offset change should be considered
incompatible.
* tests/data/test-abidiff-exit/test1-voffset-change-report1.txt
* tests/data/test-abidiff-exit/test1-voffset-change.abignore
* tests/data/test-abidiff-exit/test2-filtered-removed-fns-report0.txt
* tests/data/test-abidiff-exit/test2-filtered-removed-fns-report1.txt
* tests/data/test-abidiff-exit/test2-filtered-removed-fns-v0.c
* tests/data/test-abidiff-exit/test2-filtered-removed-fns-v1.c
* tests/data/test-abidiff-exit/test2-filtered-removed-fns.abignore
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-abidiff-exit.cc (InOutSpec::in_suppr_path): New data
member.
(in_out_specs): Adjust. Add new test inputs.
(main): Adjust.
2016-02-25 Dodji Seketeli <dodji@redhat.com>
Fixup virtual member functions with linkage and no underlying symbol
* src/abg-dwarf-reader.cc (die_function_decl_map_type): New
typedef.
(read_context::die_function_with_no_symbol_map_): New data member.
(read_context::die_function_decl_with_no_symbol_map): New
accessor.
(read_context::fixup_functions_with_no_symbols): New member
function.
(finish_member_function_reading): Take a read_context. Schedule
virtual member functions with linkage and no underlying symbol to
be fixed up after all the debug info is read.
(build_function_decl): After a virtual member function_decl has
been updated, if it has its underlying symbol and was scheduled
for fixup, then de-schedule it.
(build_class_type_and_add_to_ir, build_ir_node_from_die): Adjust
call to finish_member_function_reading.
(read_corpus_from_elf): Move the pure ELF (symbol and other mundane
information) information reading ...
(read_debug_info_into_corpus): ... here. Make it happen *before*
actual reading of DWARF information. We need symbol information
to be present and fully set before we start reading debug info.
This is so that we can know when a virtual member function doesn't
need to be fixed up. Also, perform the fixup after the debug
information was read.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
2016-02-25 Dodji Seketeli <dodji@redhat.com>
Add --verbose to abidw
* doc/manuals/abidw.rst: Update the manual for the new --verbose
option.
* tools/abidw.cc (options::do_log): New data member.
(options::options): Initialize it.
(display_usage): New string for --verbose.
(parse_command_line): Parse the --verbose option.
(main): Set the the logging option.
2016-02-25 Dodji Seketeli <dodji@redhat.com>
Update copyright information
* tools/abidiff.cc: Update copyright info for 2016.
* tools/abidw.cc: Likewise.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Make libabigail link with pthread
* src/Makefile.am: Add -pthread to libabigail_la_LDFLAGS.
* tools/Makefile.am: Do not use abinilint_LDFLAGS when it should
be abinilint_LDADD. This one was fixed by Michi Henning.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Update mentions to the build dependencies in the doc
* COMPILING: Mention elfutils, libtool, autoconf, automake and
libtool.
* doc/website/mainpage.txt: Mention automake and libtool. Fix a typo.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Bug 19706 - Core dump from abidiff with suppression
* src/abg-comparison.cc
(function_suppression::suppresses_function): Make sure a function
has a symbol before (de)referencing it.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Some small speed optimizations
* include/abg-ir.h (var_decl::get_naked_type): Declare new member function.
* src/abg-ir.cc (var_decl::get_naked_type): Define it.
(equals): For the var_decl overload, avoid copying symbol
smart pointers. Likewise for variable type smart pointers.
(hash_type_or_decl): Avoid accessing canonical type smart pointer.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Mist style cleanups
* include/abg-ir.h: Add missing comments. Space cleanups. Use
shorter typedefs rather than long template instantiation names.
Use string rather than the longer std::string.
* src/abg-ir.cc: Space cleanups. Add missing comments. User
shorter typedefs.
* src/abg-reader.cc: Likewise.
* src/abg-writer.cc: Likewise.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Implement string interning for Libabigail
* include/Makefile.am: Add the new abg-interned-str.h file to
source distribution.
* include/abg-corpus.h (corpus::corpus): Re-arrange the order of
* src/abg-corpus.cc
(corpus::exported_decls_builder::priv::get_id): Return
interned_string rather than std::string.
(corpus::corpus): Re-arrange the order of parameters: take an
environment as first parameter. parameters: take an environment
as first parameter.
* include/abg-dwarf-reader.h (lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf): Likewise.
* src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab)
(lookup_symbol_from_elf_hash_tab, lookup_symbol_from_symtab)
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
(lookup_public_variable_symbol_from_elf, lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf): Take an environment as
first parameter and adjust.
(build_translation_unit_and_add_to_ir)
(build_namespace_decl_and_add_to_ir, build_type_decl)
(build_enum_type, finish_member_function_reading)
(build_class_type_and_add_to_ir, build_function_type)
(read_debug_info_into_corpus, read_corpus_from_elf): Adjust.
* include/abg-fwd.h: Include abg-interned-str.h
(get_type_name, get_function_type_name, get_method_type_name):
Return a interned_string, rather than a std::string.
* include/abg-interned-str.h: New declarations for interned strings
and their pool.
* include/abg-ir.h (environment::intern): Declare new method.
(elf_symbol::{g,s}et_environment): Likewise.
(type_or_decl_base::type_or_decl_base): Make the default
constructor private.
({translation, type_or_decl_base}::set_environment)
(set_environment_for_artifact): Take a const environment*.
(elf_symbol::elf_symbol)
(elf_symbol::create)
(type_or_decl_base::type_or_decl_base)
(translation::translation, decl_base::decl_base)
(scope_decl::scope_decl, type_base::type_base)
(type_decl::type_decl, scope_type_decl::scope_type_decl)
(namespace_decl::namespace_decl)
(enum_type_decl::enumerator::enumerator)
(function_type::function_type, method_type::method_type)
(template_decl::template_decl, function_tdecl::function_tdecl)
(class_tdecl::class_tdecl, class_decl::class_decl): Take an
environment.
(type_or_decl_base::operator=)
(enum_type_decl::enumerator::get_environment): Declare new method.
(decl_base::{peek_qualified_name, peek_temporary_qualified_name,
get_qualified_name, get_name, get_qualified_parent_name,
get_linkage_name}, qualified_type_def::get_qualified_name)
(reference_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(enum_type_decl::enumerator::{get_name, get_qualified_name})
({var,function}_decl::get_id)
(function_decl::parameter::{get_type_name, get_name_id}): Return
an interned_string, rather than a std::string.
(decl_base::{set_qualified_name, set_temporary_qualified_name,
get_qualified_name, set_linkage_name})
(qualified_type_def::get_qualified_name)
(reference_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(function_decl::parameter::get_qualified_name): Take an
interned_string, rather than a std::string.
(class_decl::member_{class,function}_template::member_{class,function}_template):
Adjust.
* src/abg-ir.cc (environment_setter::env_): Make this be a pointer
to const environment.
(environment_setter::visit_begin): Adjust.
(interned_string_pool::priv): Define new type.
(interned_string_pool::*): Define the method declared in
abg-interned-str. h.
(operator==, operator!=, operator+): Define operator for interned_string and
std::string
(operator<<): Define for interned_string.
(translation_unit::priv::env_): Make this be a pointer to const
environment.
(translation_unit::priv::priv): Take a pointer to const
environment.
(elf_symbol::priv::env_): New data member.
(elf_symbol::priv::priv): Adjust. Make an overoad take an
environment.
(translation_unit::{g,s}et_environment): Adjust.
(interned_string_bool_map_type): New typedef.
(environment::priv::classes_being_compared_): Make this hastable
of string be a hashtable of interned_string.
(environment::priv::string_pool_): New data member.
(environment::{get_void_type_decl,
get_variadic_parameter_type_decl}): Adjust.
(type_or_decl_base::priv::env_): Make this be a pointer to const
environment.
(type_or_decl::base::priv::priv): Adjust.
(type_or_decl_base::set_environment)
(set_environment_for_artifact): Take a pointer to const
environment.
(elf_symbol::{g,s}et_environment, environment::intern)
(type_or_decl_base::operator=): Define new methods.
(decl_base::priv::{name_, qualified_parent_name_,
temporary_qualified_name_, qualified_name_, linkage_name_}): Make
these data member be of tpe interned_string.
(decl_base::priv::priv): Make this take an environment. Adjust.
(decl_base::{peek_qualified_name, peek_temporary_qualified_name,
get_linkage_name, get_qualified_parent_name, get_name,
get_qualified_name}, get_type_name, get_function_type_name)
(get_method_type_name, get_node_name)
(qualified_type_def::get_qualified_name)
(pointer_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(enum_type_decl::enumerator::get_qualified_name)
(var_decl::get_id, function_decl::get_id)
(function_decl::parameter::get_{name_id, type_name}): Return an
interned_string.
(decl_base::{set_qualified_name, set_temporary_qualified_name})
(qualified_type_def::get_qualified_name)
(pointer_type_def::get_qualified_name)
(reference_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(function_decl::parameter::get_qualified_name): Take an
interned_string.
(decl_base::{set_name, set_linkage_name}): Intern the std::string
passed in parameter.
(equals): In the overload for decl_base, adjust for a little speed
optimization that is justified by profiling.
(pointer_type_def::priv::{internal_qualified_name_,
temp_internal_qualified_name_}): Make these data member be
interned_string.
(enum_type_decl::enumerator::priv::env_): New data member.
(enum_type_decl::enumerator::priv::{name_, qualified_name}): Make
these data member be of type interned_string.
(enum_type_decl::enumerator::get_environment): New method.
(enum_type_decl::enumerator::priv::priv) Adjust.
(typedef_decl::operator==): Implement a little speed optimization.
(var_decl::priv::nake_type_): New data member.
(var_decl::priv::id_): Make this data member be of type
interned_string.
(equals): In the overload for var_decl, function_type,
function_decl, adjust for the use of interned_string.
(function_decl::priv::id_): Make this be of type interned_string.
(scope_decl::{add_member_decl, insert_member_decl})
(lookup_function_type_in_translation_unit)
(synthesize_type_from_translation_unit, lookup_node_in_scope)
(lookup_type_in_scope, scope_decl::scope_decl)
(qualified_type_def::qualified_type_def)
(qualified_type_def::get_qualified_name)
(pointer_type_def::pointer_type_def)
(reference_type_def::reference_type_def)
(array_type_def::array_type_def, array_type_def::append_subrange)
(array_type_def::get_qualified_name)
(enum_type_decl::enum_type_decl)
(enum_type_decl::enumerator::get_qualified_name)
(enum_type_decl::enumerator::set_name)
(typedef_decl::typedef_decl, var_decl::var_decl)
(function_type::function_type, method_type::method_type)
(function_decl::function_decl)
(function_decl::parameter::parameter)
(class_decl::priv::comparison_started)
(class_decl::add_base_specifier)
(class_decl::base_spec::base_spec)
(class_decl::method_decl::method_decl)
(type_tparameter::type_tparameter)
(non_type_tparameter::non_type_tparameter)
(template_tparameter::template_tparameter)
(type_composition::type_composition)
(function_tdecl::function_tdecl, class_tdecl::class_tdecl)
(qualified_name_setter::do_update): Adjust.
(translation_unit::translation_unit, elf_symbol::elf_symbol)
(elf_symbol::create, type_or_decl_base::type_or_decl_base)
(decl_base::decl_base, type_base::type_base)
(type_decl::type_decl, scope_type_decl::scope_type_decl)
(namespace_decl::namespace_decl)
(enum_type_decl::enumerator::enumerator, class_decl::class_decl)
(template_decl::template_decl, function_tdecl::function_tdecl)
(class_tdecl::class_tdecl): Take an environment.
* src/abg-comparison.cc
(function_suppression::suppresses_function): Adjust.
* src/abg-reader.cc (read_translation_unit)
(read_corpus_from_input, build_namespace_decl, build_elf_symbol)
(build_function_parameter, build_function_decl, build_type_decl)
(build_function_type, build_enum_type_decl, build_enum_type_decl)
(build_class_decl, build_function_tdecl, build_class_tdecl)
(read_corpus_from_native_xml): Likewise.
* src/abg-writer.cc (id_manager::m_cur_id): Make this mutable.
(id_manager::m_env): New data member.
(id_manager::id_manager): Adjust.
(id_manager::get_environment): New method.
(id_manager::{get_id, get_id_with_prefix}): Return an
interned_string.
(type_ptr_map): Make this be a hash map of type_base* ->
interned_string, rather a type_base* -> string.
(write_context::m_env): New data member.
(write_context::m_type_id_map): Make this data member be mutable.
(write_context::m_emitted_type_id_map): Make this be a hash map of
interned_string -> bool, rather than string -> bool.
(write_context::write_context): Take an environment and adjust.
(write_context::get_environment): New method.
(write_context::get_id_manager): New const overload.
(write_context::get_id_for_type): Return an interned_string; adjust.
(write_context::{record_type_id_as_emitted,
record_type_as_referenced}): Adjust.
(write_context::type_id_is_emitted): Take an interned_string.
(write_context::{type_is_emitted,
record_decl_only_type_as_emitted}): Adjust.
(write_translation_unit, write_corpus_to_native_xml, dump):
Adjust.
* tools/abisym.cc (main): Adjust.
* tests/data/test-read-write/test22.xml: Adjust.
* tests/data/test-read-write/test23.xml: Adjust.
* tests/data/test-read-write/test26.xml: Adjust.
2016-02-24 Dodji Seketeli <dodji@redhat.com>
Update copyright notice
* include/abg-corpus.h: Update copyright notice.
* include/abg-dwarf-reader.h: Likewise.
* src/abg-comparison.cc: Likewise.
* src/abg-corpus.cc: Likewise.
* src/abg-ir.cc: Likewise.
2016-02-23 Dodji Seketeli <dodji@redhat.com>
Fix crash when handling templates with empty patterns
* src/abg-ir.cc (function_tdecl::traverse): Do not crash when
traversing a template with empty pattern.
(class_tdecl::operator==): Do not crash when comparing templates
with empty patterns.
2016-02-23 Dodji Seketeli <dodji@redhat.com>
Add missing inequality operators for ABI artifacts
* include/abg-ir.h ({translation_unit, elf_symbol::version,
context_rel, decl_base, type_base, type_decl,
array_type_def::subrange_type, enum_type_def::enumerator,
dm_context_rel, template_parameter}::operator!=): Declare.
(operator==): Make the overload form translation_unit_sptr,
scope_decl_sptr, class_decl::base_spec_sptr,
class_decl::member_function_template_sptr,
class_decl::member_class_template_sptr take const references.
(operator!=): Declare an an overload for the non-member operator
!= of translation_unit_sptr, elf_symbol_sptr,
type_or_decl_base_sptr, type_base_sptr, scope_decl_sptr,
type_decl, qualified_type_def_sptr, pointer_type_def_sptr,
reference_type_def_sptr, enum_type_decl_sptr, class_decl_sptr,
class_decl::base_spec_sptr,
class_decl::member_function_template_sptr,
class_decl::member_class_template_sptr.
* src/abg-ir.cc ({translation_unit, elf_symbol::version,
context_rel, decl_base, type_base, type_decl,
array_type_def::subrange_type, enum_type_def::enumerator,
dm_context_rel, template_parameter}::operator!=): Define.
(operator==): Make the overload for translation_unit_sptr,
scope_decl_sptr, class_decl::base_spec_sptr,
class_decl::member_function_template_sptr,
class_decl::member_class_template_sptr take const references.
(operator!=): Define an an overload for the non-member operator !=
of translation_unit_sptr, elf_symbol_sptr, type_or_decl_base_sptr,
type_base_sptr, scope_decl_sptr, type_decl,
qualified_type_def_sptr, pointer_type_def_sptr,
reference_type_def_sptr, enum_type_decl_sptr, class_decl_sptr,
class_decl::base_spec_sptr,
class_decl::member_function_template_sptr,
class_decl::member_class_template_sptr.
2016-02-20 Dodji Seketeli <dodji@redhat.com>
Make the tree pass distcheck again.
* tests/data/Makefile.am: Add file
test-diff-suppr/test28-add-aliased-function-report-0.txt to source
distribution.
2016-02-18 Dodji Seketeli <dodji@redhat.com>
Bug 19658 - Type canonicalization slow for the 2nd binary loaded
* include/abg-corpus.h (corpus::{record_canonical_type,
lookup_canonical_type}): Declare new member functions.
* src/abg-corpus.cc (corpus::priv::canonical_types_): New data
member.
(corpus::{record_canonical_type, lookup_canonical_type}): Define
new member functions.
* src/abg-ir.cc (type_base::get_canonical_type_for): Cache the
canonical type inside the corpus of the type being canonicalized.
Then later when canonicalizing another type, lookup in the cache
inside its corpus to see if there is a type with the same name.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
Adjust.
2016-02-18 Dodji Seketeli <dodji@redhat.com>
Add --verbose option to abidiff
* doc/manuals/abidiff.rst: Add documentation for new --verbose
option.
* include/abg-dwarf-reader.h (set_do_log): Declare new function.
* src/abg-dwarf-reader.cc (read_context::do_log_): New data
member.
(read_context::read_context): Initialize the new data member.
(read_context::do_log): Define accessors.
(set_do_log): Define new function;
(read_context::canonicalize_types_scheduled)
(read_debug_info_into_corpus): Add logs.
* tools/abidiff.cc (options::do_log): New data member.
(options::options): Initialize it.
(display_usage): Add an usage string for --verbose.
(parse_command_line): Parse the new --verbose option.
(main): Set the dwarf reader's context wrt presence of the
--verbose option.
2016-02-18 Dodji Seketeli <dodji@redhat.com>
Fix indentation
* tools/abipkgdiff.cc (parse_command_line): Fix a wrong indentation.
2016-02-17 Dodji Seketeli <dodji@redhat.com>
Bug 19638 - DWARF reader fails to link clone function to its declaration
* include/abg-ir.h (decl_base::set_linkage_name): Make this member
function virtual.
(class_decl::string_mem_fn_ptr_map_type): Define new member type.
(class_decl::find_member_function): Declare new member function.
(copy_member_function): Declare new function. Declare it as
friend of class_decl.
(method_decl::set_linkage_name): Declare an overload for this
virtual function.
* src/abg-dwarf-reader.cc (build_function_decl): Allow updating of
linkage_name even if the linkage_name was already defined.
(build_ir_node_from_die): In the case DW_TAG_subprogram, make the
lookup of scope of the DIE work even if it has both an abstract
origin and a specification (DW_AT_abstract_origin and
DW_AT_specification).
* src/abg-ir.cc (maybe_adjust_canonical_type): Define new
function.
(canonicalize): Use it.
(function_decl::get_id): Return the linkage name first, if it
exist.
(class_decl::priv::mem_fns_map_): New data member.
(class_decl::find_member_function): Define new member function.
(class_decl::method_decl::set_linkage_name): Likewise.
(class_decl::add_member_function): Update the new data member
class_decl::priv::mem_fns_map_.
(copy_member_function): Define new static function.
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
2016-02-17 Dodji Seketeli <dodji@redhat.com>
Add function lookup by linkage name to libabigail::corpus
* include/abg-corpus.h (corpus::lookup_functions): Declare new
member function.
* src/abg-corpus.cc (class corpus::exported_decls_builder::priv):
Make class corpus be a friend of this type.
(corpus::exported_decls_builder::priv::add_fn_to_id_fns_map): Fix
a thinko that was preventing the fn_id -> functions map from ever
being filled. Fix this function to make it associate each aliases
of a given function to the function, in the hash table.
(corpus::lookup_functions): Define new member function.
2016-02-17 Dodji Seketeli <dodji@redhat.com>
Fix style cleanups
* include/abg-ir.h (method_type::{method_type, set_class_type,
get_type, set_type}): Use type_base_sptr and class_decl_sptr
instead of the full non-typedefed name.
(method_type):Do some cleanups in the definition of the
convenience typedefs.
* src/abg-ir.cc (method_type::{method_type, set_class_type,
get_type, set_type}): Use type_base_sptr and class_decl_sptr
instead of the full non-typedefed name.
* src/abg-writer.cc (write_class_decl): Add a comment.
2016-02-13 Dodji Seketeli <dodji@redhat.com>
Bug 19619 - failing to suppress added aliased function reports for C++
* src/abg-comparison.cc
(function_suppression::suppresses_function): Make the evaluation
of the "name" and "name_regexp" consider the cases of languages in
which the function name is the same as the symbol name and the
case of languages in which it is not. In the former case, all
symbol alias names must be matched. In the latter case, if "name"
and "name_regexp" match the function name, the suppression
specification is considered to match the report about the function
change. Also, use the elf_symbol::is_main_symbol() predicate to
test for the symbol being a main symbol, rather than using
error-prone pointer equality.
* tests/data/test-diff-suppr/test27-add-aliased-function-0.suppr:
New test input.
* tests/data/test-diff-suppr/test27-add-aliased-function-1.suppr: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-2.suppr: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-3.suppr: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-4.suppr: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-report-5.txt: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-v0.cc: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-v0.o: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-v1.cc: Likewise.
* tests/data/test-diff-suppr/test27-add-aliased-function-v1.o: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-0.suppr: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-1.suppr: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-2.suppr: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-3.suppr: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-4.suppr: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-5.suppr: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-5.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-report-6.txt: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-v0.c: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-v0.o: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-v1.c: Likewise.
* tests/data/test-diff-suppr/test28-add-aliased-function-v1.o: Likewise.
* tests/data/Makefile.am: Add the new test material above to the
source distribution.
* tests/test-diff-suppr.cc: Add the new test inputs above to this
test harness.
2016-02-12 Dodji Seketeli <dodji@redhat.com>
Emit more informational messages on unrecognized options
* tools/abicompat.cc (options::prog_name): New data member.
(display_help, perform_compat_check_in_normal_mode)
(perform_compat_check_in_weak_mode, main): Prefix error messages
with the name of the program.
* tools/abidw.cc (options::wrong_option): New data member.
(display_help): Prefix error messages with the name of the
program.n
(parse_command_line): Record the name of the unrecognized option.
(main): Tell the name of the unrecognized option. Prefix error
messages with the name of the program.
* tools/abilint.cc (optionqs::wrong_option): New data member
(display_usage): Prefix error messages with the name of the
program.
(parse_command_line): Record the name of the unrecognized option.
(main): Tell the name of the unrecognized option. Prefix error
messages with the name of the program.
* tools/abipkgdiff.cc (options::{wrong_option, prog_name}): New
data members.
(package::erase_extraction_directory, display_usage, extract_rpm)
(extract_deb, extract_tar)
(erase_created_temporary_directories_parent, extract_package)
(compare, create_maps_of_package_content): Prefix error messages
with the name of the program.
(maybe_check_suppression_files): Adjust.
(parse_command_line): Record the name of the unrecognized option,
and the name of option which lacks an operand.
(main): Give the name of the unrecognized option. Prefix error
messages with the name of the program.
2016-02-12 Dodji Seketeli <dodji@redhat.com>
Prefix abidiff error message with the 'abidiff' program name
* include/abg-tools-utils.h (emit_prefix): Declare new function.
(check_file): Add a new parameter with a default value, so that
existing code keeps compiling.
* src/abg-tools-utils.cc (emit_prefix): Define new function.
(check_file): Use the emit_prefix function and give it the program
name passed as a new parameter.
* tools/abidiff.cc (display_usage, main): Use the new emit_prefix
to prefix error messages.
2016-02-11 Dodji Seketeli <dodji@redhat.com>
Bug 19606 - Need better error message for invalid options
* tools/abidiff.cc (options::wrong_option): New data member.
(parse_command_line): Record the name of the unknown option and of
the option which value is missing.
2016-02-11 Dodji Seketeli <dodji@redhat.com>
Add a comment about libabigail needing elfutils 0.159 at least.
* configure.ac: Add a comment saying that we require at least
elfutils 0.159.
2016-02-11 Dodji Seketeli <dodji@redhat.com>
Talk about mandatory properties in suppress_* directives
* doc/manuals/libabigail-concepts.rst: Talk about the mandatory
properties for suppress_type, suppress_function and
suppress_variable directives.
2016-02-11 Dodji Seketeli <dodji@redhat.com>
Make abipkgdiff check for the presence of suppression spec files
* tools/abipkgdiff.cc (maybe_check_suppression_files): Define new
static function.
(main): Use it.
2016-02-11 Dodji Seketeli <dodji@redhat.com>
Make abipkgdiff return correct exit code on usage error
* tools/abipkgdiff.cc (main): Return the correct error code on
usage error.
2016-02-11 Dodji Seketeli <dodji@redhat.com>
Bug 19604 - abidiff --suppressions doesn't complain about invalid file name
* tools/abidiff.cc (maybe_check_suppression_files): Define new
static function.
(main): Use it.
2016-02-10 Dodji Seketeli <dodji@redhat.com>
Use proper WIFEXITED and WEXITSTATUS macros to get exit code
* tests/test-diff-dwarf-abixml.cc (main): Use WIFEXITED and
WEXITSTATUS macros to get the return code of the abidiff program.
* tests/test-diff-filter.cc (test_task::perform): Likewise.
* tests/test-diff-pkg.cc (main): Likewise.
* tests/test-diff-suppr.cc (main): Likewise.
2016-02-10 Dodji Seketeli <dodji@redhat.com>
Bug 19596 - Incorrect exit status for incompatible ABI change
* include/abg-comparison.h (enum diff_category): Adjust the
comment for enumerator VIRTUAL_MEMBER_CHANGE_CATEGORY; changes of
this category are incompatible ABI changes.
(corpus_diff::diff_stats::num_func_with_virtual_offset_changes):
Declare new accessors.
* src/abg-comparison.cc
(corpus_diff::diff_stats::priv::num_func_with_virt_offset_changes):
New data member.
(corpus_diff::diff_stats::priv::priv): Initialize the new data
member.
(corpus_diff::diff_stats::num_func_with_virtual_offset_changes):
Define new accessors.
(corpus_diff::priv::apply_filters_and_compute_diff_stats): Use the
new accessor to set the number of functions with virtual offset
changes onto the stats data structure.
(corpus_diff::has_incompatible_changes): Take functions with
virtual offset changes into account.
* tests/test-abidiff-exit.cc: New test harness to test for exit
codes of abidiff.
* tests/Makefile.am: Build the new test harness runtestabidiff
from the test-abidiff-exit.cc source file.
* tests/data/test-abidiff-exit/test1-voffset-change-report0.txt:
New reference test output.
* tests/data/test-abidiff-exit/test1-voffset-change-v0.cc: New
test input source code.
* tests/data/test-abidiff-exit/test1-voffset-change-v0.o: New test input.
* tests/data/test-abidiff-exit/test1-voffset-change-v1.cc: New
test input source code.
* tests/data/test-abidiff-exit/test1-voffset-change-v1.o: New test input.
* tests/data/Makefile.am: tests/data/Makefile.am: Add the new test
inputs above to the source distribution.
2016-02-04 Dodji Seketeli <dodji@redhat.com>
Fix synthesizing of reference type
* src/abg-ir.cc (synthesize_type_from_translation_unit): Support
synthesizing reference types.
* tests/data/test-abicompat/libtest9-fn-changed-v0.so: Add new
test input.
* tests/data/test-abicompat/libtest9-fn-changed-v1.so: Likewise.
* tests/data/test-abicompat/test9-fn-changed-app: Likewise.
* tests/data/test-abicompat/test9-fn-changed-app.cc: : Likewise.
* tests/data/test-abicompat/test9-fn-changed-report-0.txt: Likewise.
* tests/data/test-abicompat/test9-fn-changed-v0.cc: Likewise.
* tests/data/test-abicompat/test9-fn-changed-v0.h: Likewise.
* tests/data/test-abicompat/test9-fn-changed-v1.cc: Likewise.
* tests/data/test-abicompat/test9-fn-changed-v1.h: Likewise.
* tests/data/Makefile.am: Add the new material to source
distribution.
* tests/test-abicompat.cc (in_out_specs): Add the new test inputs
to the test harness.
2016-02-03 Dodji Seketeli <dodji@redhat.com>
Fix synthesizing of pointer type
* include/abg-ir.h: Update copyright.
* src/abg-ir.cc (synthesize_type_from_translation_unit): Support
synthesizing pointer types.
* tests/data/test-abicompat/libtest8-fn-changed-libapp-v0.so: New
test input.
* tests/data/test-abicompat/libtest8-fn-changed-libapp-v1.so: Likewise.
* tests/data/test-abicompat/test8-fn-changed-app: Likewise.
* tests/data/test-abicompat/test8-fn-changed-app.c: Likewise.
* tests/data/test-abicompat/test8-fn-changed-libapp-v0.c: Likewise.
* tests/data/test-abicompat/test8-fn-changed-libapp-v0.h: Likewise.
* tests/data/test-abicompat/test8-fn-changed-libapp-v1.c: Likewise.
* tests/data/test-abicompat/test8-fn-changed-libapp-v1.h: Likewise.
* tests/data/test-abicompat/test8-fn-changed-report-0.txt: Likewise.
* tests/data/Makefile.am: Add the new test input files to source
distribution.
* tests/test-abicompat.cc (in_out_specs): Add the new test inputs
above to the test harness.
2016-01-26 Mark Wielaard <mjw@redhat.com>
Remove defined but not used functions pointed out by GCC6.
* src/abg-ir.cc (convert_node_to_decl(decl_base_sptr)): Remove
definition.
(get_node_name(decl_base_sptr)): Likewise.
2016-01-26 Mark Wielaard <mjw@redhat.com>
Make make more silent.
* Makefile.am (AM_MAKEFLAGS): Set --no-print-directory.
2016-01-26 Mark Wielaard <mjw@redhat.com>
Fix GCC6 -Wmisleading-indentation warnings.
* src/abg-dwarf-reader.cc (find_import_unit_point_before_die):
Properly indent code after if clause.
* src/abg-ini.cc (write_property_value): Properly indent return
statement after else clause.
2016-01-27 Dodji Seketeli <dodji@redhat.com>
Fix abicompat's handling of library types not used by the application
* tools/abicompat.cc (perform_compat_check_in_weak_mode): If the
application doesn't use a given type defined and exported by the
library, then skip it.
2016-01-27 Dodji Seketeli <dodji@redhat.com>
Do not crash when looking up a type from global scope
* src/abg-ir.cc (lookup_type_in_scope): Gently Handle empty access
path.
2016-01-25 Dodji Seketeli <dodji@redhat.com>
Comparing aliases of the same symbol must be done by pointer
* src/abg-ir.cc (elf_symbol::operator==): Fix thinko and
indentation. What was I thinking ...
(elf_symbol::add_alias)
(compute_aliases_for_elf_symbol): Do not compare aliases using the
equality operator, because it considers all aliases of a given
symbol as equal. Rather, use elf_symbol::is_main_symbol() to test
if an alias is the main symbol alias.
* src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
Likewise.
* src/abg-corpus.cc
(corpus::priv::build_unreferenced_symbols_tables): Likewise.
* src/abg-writer.cc (write_elf_symbol_aliases): Likewise.
2016-01-21 Dodji Seketeli <dodji@redhat.com>
Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE
* src/abg-dwarf-reader.cc (get_parent_die): If we couldn't find
the parent of a given DIE, return false, do not abort. Also,
assert that if we don't find the parent of a DIE in the main debug
info, we don't find it in the alternate debug info either (and
vice versa). This is because I'd like to abort on cases where we
look for a DIE in the wrong debug info; those cases are likely to
be hint that the DWARF reader is doing something wrong which ought
to be investigated and fixed.
(get_scope_for_die): If we couldn't get the parent of the DIE,
then return a nil scope.
* tests/data/test-types-stability/pr19204-libtcmalloc.so.4.2.6-xlc:
New test binary input.
* tests/data/Makefile.am: Add the new binary test input to the
source distribution.
* tests/test-types-stability.cc (elf_paths): Account for the new
binary input.
2016-01-20 Dodji Seketeli <dodji@redhat.com>
Pass parm of elf_symbol::add_alias by reference
* include/abg-ir.h (elf_symbol::add_alias): Pass parameter by
reference.
* src/abg-ir.cc (elf_symbol::add_alias): Likewise.
2016-01-20 Dodji Seketeli <dodji@redhat.com>
Bug 19141 - Libabigail doesn't support common ELF symbols
* include/abg-ir.h (elf_symbol::elf_symbol): Take a new flag to
say if the symbol is common.
(elf_symbol::{is_common_symbol, has_other_common_instances,
get_next_common_instance, add_common_instance}): New member functions.
* src/abg-ir.cc (elf_symbol::priv::{is_common_,
next_common_instance_): New data members.
(elf_symbol::priv::priv): Adjust.
(elf_symbol::{elf_symbol, create}): Take a new flag to say if the
symbol is common.
(textually_equals): Adjust to account for symbol common-ness.
(elf_symbol::{is_common_symbol, has_other_common_instances,
get_next_common_instance, add_common_instance}): Define new member
functions.
(elf_symbol::add_alias): Drive-by fix; compare symbols using
pointer value. Value comparison is not necessary.
* src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab)
(read_context::lookup_elf_symbol_from_index): Adjust the creation
of the symbol to account for common-ness.
(read_context::load_symbol_maps): Recognize instances of a given
common symbol and represent them as such. Do not mistake this
with symbol aliases.
* src/abg-reader.cc (build_elf_symbol): Adjust the creation of the
symbol to account for common-ness.
* src/abg-writer.cc (write_elf_symbol): Adjust symbol
serialization to account common-ness.
* tests/data/test-types-stability/pr19141-get5d.o: Add new test
binary input.
* tests/data/test-types-stability/pr19142-topo.o: Likewise.
* tests/data/Makefile.am: Add the new test inputs to source distribution.
* tests/test-types-stability.cc (elf_paths): The the new test
inputs into account.
2016-01-13 Dodji Seketeli <dodji@redhat.com>
Bug 19434 - invalid character in attribute value
* include/abg-tools-utils.h (string_is_ascii_identifier): Declare
new function.
* src/abg-tools-utils.cc (string_is_ascii_identifier): Define new function.
* src/abg-dwarf-reader.cc (build_function_type): Discard parameter
name if it's made of non-identifier ascii characters.
* tests/data/test-types-stability/pr19434-elf0: New test binary input file.
* tests/data/Makefile.am: Add the new test input to source distribution.
* tests/test-types-stability.cc: Test the new test input into account.
2016-01-18 Dodji Seketeli <dodji@redhat.com>
Sort the tests run in tests/ by running the slowest ones first
* tests/Makefile.am: Sort the tests by running the slowest ones
first.
2016-01-15 Dodji Seketeli <dodji@redhat.com>
Use worker threads pattern to speed up some tests
* include/Makefile.am: Add the new abg-workers.h to source
distribution.
* include/abg-workers.h: New file.
* src/Makefile.am: Add the new abg-worker.cc to source
distribution.
* src/abg-workers.cc: New file.
* tests/test-utils.cc: Update copyright. Make get_src_dir() and
get_build_dir() return a const char*, as opposed to returning a
string. Make that const char reside in thread local storage, so
that two concurrent threads can safely call these functions in
parallel, without any race.
* tests/test-utils.h: Make get_src_dir() and get_build_dir()
return a const char*, as opposed to returning a string.
* tests/test-abicompat.cc: Update copyright. Adjust for
get_src_dir() and get_build_dir() change.
* tests/test-abidiff.cc: Likewise.
* tests/test-alt-dwarf-file.cc: Likewise.
* tests/test-core-diff.cc: Likewise.
* tests/test-diff-dwarf-abixml.cc: Likewise.
* tests/test-diff-dwarf.cc: Likewise.
* tests/test-diff-pkg.cc: Likewise.
* tests/test-diff-suppr.cc: Likewise.
* tests/test-lookup-syms.cc: Likewise.
* tests/test-read-dwarf.cc: Likewise.
* tests/test-read-write.cc: Likewise.
* tests/test-types-stability.cc: Likewise. Use the new task queue
type to run these tests in parallel.
* tests/test-diff-filter.cc: Likewise.
2016-01-18 Ondrej Oprala <ooprala@redhat.com>
Escape the value of the filepath attribute.
* src/abg-writer.cc (write_location): Sanitize the filepath with
xml::escape_xml_string().
(write_translation_unit): Likewise.
(write_corpus_to_native_xml): Likewise.
* tests/data/test-types-stability/pr19433-custom0: Add a new test file.
* tests/test-types-stability.cc: Add the test file to the test harness.
* tests/data/Makefile.am: Add the new test file to the list.
2016-01-09 Dodji Seketeli <dodji@redhat.com>
Make enum values take 64 bits on all platforms
* include/abg-ir.h: Include stdint.h for int64_t.
(enumerator::enumerator): Take an int64_t value for the value of
the enumerator.
(enumerator::{s,g}et_value): Take/return an int64_t value.
* src/abg-ir.cc (enum_type_decl::enumerator::priv): Store the
value in an int64_t.
(enumerator::priv::priv): Take a int64_t for the value.
(enum_type_decl::enumerator::enumerator): Likewise.
(enum_type_decl::enumerator::{s,g}et_value): Take/returnan int64_t
value.
* src/abg-dwarf-reader.cc (die_unsigned_constant_attribute): Take
an uint64_t value.
(die_signed_constant_attribute): Take an int64_t value.
(die_location, die_size_in_bits, die_access_specifier)
(die_virtuality, die_is_virtual, die_is_declared_inline)
(build_translation_unit_and_add_to_ir, build_type_decl)
(build_enum_type, build_pointer_type_def, build_array_type):
Adjust.
* src/abg-reader.cc (build_enum_type_decl): Adjust.
* src/abg-writer.cc (write_enum_type_decl): Do not cast the result
of enumerator::get_value() anymore, it's value is now a int64_t.
2016-01-08 Dodji Seketeli <dodji@redhat.com>
Include missing <algorithm> to abg-dwarf-reader.cc
* src/abg-dwarf-reader.cc: Add missing <algorithm> include file.
2016-01-08 Dodji Seketeli <dodji@redhat.com>
Bug 19138 - Failure to relate variables address from DWARF and ELF
* include/abg-dwarf-reader.h (elf_type::ELF_TYPE_RELOCATABLE): New
enumerator.
* src/abg-dwarf-reader.cc (find_section): Factorize this from ...
(find_text_section, find_bss_section): ... these.
(find_rodata_section, find_data_section, find_data1_section):
Define new static functions.
(elf_file_type): Move this static function definition up.
(read_context::{get_elf_file_type, address_is_in_section,
get_data_section_for_variable_address}): New member functions.
(read_context::maybe_adjust_fn_sym_address): Adjust comment.
Adjust to use the new
read_context::get_data_section_for_variable_address().
* tests/data/test-types-stability/pr19138-elf0: New test input
binary.
* tests/data/Makefile.am: Add the new test input binary to the
test suite.
* tests/test-types-stability.cc (elf_paths): Take it into account.
2016-01-08 Dodji Seketeli <dodji@redhat.com>
Bump version revision to 1.0.rc3
* configure.ac: Change version_revision to rc3
2016-01-08 Dodji Seketeli <dodji@redhat.com>
Add a release announcement text pattern
* release-text-template.txt: New file.
2016-01-08 Dodji Seketeli <dodji@redhat.com>
Upate build instructions on the website
* doc/website/mainpage.txt: Add instruction about how to build
tarballs.
2016-01-07 Dodji Seketeli <dodji@redhat.com>
Update website link for 1.0.rc2
* doc/website/mainpage.txt: Update tarball link for 1.0.rc2
2016-01-07 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog before 1.0.rc2
* ChangeLog: Update with make update-changelog
2016-01-07 Dodji Seketeli <dodji@redhat.com>
Update NEWS for 1.0.rc2
* NEWS: Update.
2016-01-07 Dodji Seketeli <dodji@redhat.com>
Fix tests/data/Makefile.am glitch
* tests/data/Makefile.am: Fix a faulty file path.
2016-01-07 Dodji Seketeli <dodji@redhat.com>
Lexicographically sort added/removed base classes in change report
* src/abg-comparison.cc (sort_string_base_diff_sptr_map): Define
new static function.
(struct base_spec_comp): Define new type.
(class_diff::priv::sorted_{deleted,inserted}_bases_): New data
members.
(class_diff::ensure_lookup_tables_populated): Sort the deleted and
inserted base classes.
(class_diff::report): Use the sorted set of deleted/inserted base
classes in the report.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
2016-01-06 Dodji Seketeli <dodji@redhat.com>
Fix regression on the support for alternate debug info files
* src/abg-dwarf-reader.cc
(imported_unit_point::imported_unit_from_alt_di): New data member.
(imported_unit_point::imported_unit_point): Adjust.
(read_context::alt_tu_die_imported_unit_points_map_): New data
member.
(read_context::alt_tu_die_imported_unit_points_map): New accessor.
(die_die_attribute): Remove the overload which doesn't say if the
resulting DIE comes from alternate debug info.
(build_die_parent_relations_under): Take a new flag which says if
we are building the relations about DIEs in the alternate debug
info section or not. Use that flag to know if the imported unit
trace we are building is for an alternate debug info file or not.
(build_die_parent_maps): Build two different imported unit point
trace vectors: one for the main debug info file, and another one
for the alternate debug info file.
(find_import_unit_point_between_dies): Take a flag that says if
the beginning of the search is a DIE in the alternate debug info
file or not. Use it to know if we should use the import point
trace vectors from alternate debug info or from the main debug
info file. When the import point trace vector is empty, return
immediatly.
(get_parent_die): If the parent DIE is a DW_TAG_partial_unit which
hasn't been imported into this TU, then assume the logical parent
is the DIE for the current translation unit.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
Reference test output.
* tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64.rpm: New
input test rpm.
* tests/data/test-diff-pkg/tbb-4.3-3.20141204.fc23.x86_64.rpm:
Likewise.
* tests/data/test-diff-pkg/tbb-debuginfo-4.1-9.20130314.fc22.x86_64.rpm:
Likewise.
* tests/data/test-diff-pkg/tbb-debuginfo-4.3-3.20141204.fc23.x86_64.rpm:
Likewise.
* tests/data/Makefile.am: Add the new test materials to the source
distribution.
* tests/test-diff-pkg.cc (int_out_specs): Add the new rpms to the
list of rpms to test against.
2016-01-06 Dodji Seketeli <dodji@redhat.com>
Bump revision number to 1.0.rc2
* configure.ac: Bump revision number to 1.0.rc2
2016-01-05 Dodji Seketeli <dodji@redhat.com>
Update link to the 1.0.rc1 tarball
* doc/website/mainpage.txt: Update the "Getting source code"
section.
2016-01-05 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog before 1.0.rc1
* ChangeLog: Update automatically with make update-changelog
2016-01-05 Dodji Seketeli <dodji@redhat.com>
Fix abidw -v
* tools/abidw.cc (parse_command_line): Simplify logic.
(main): Fix logic.
2016-01-05 Dodji Seketeli <dodji@redhat.com>
Add a NEWS file
* NEWS: New file.
* Makefile.am: Add NEWS file to source distribution.
2016-01-04 Dodji Seketeli <dodji@redhat.com>
Bug 19355 - Libabigail slow on r300_dri.so
* src/abg-dwarf-reader.cc (struct imported_unit_point): Define new
type.
(operator<(const imported_unit_point&, const
imported_unit_point&)): Define less-than operator for new
imported_unit_point& type.
(imported_unit_points_type, tu_die_imported_unit_points_map_type):
New typedefs.
(find_lower_bound_in_imported_unit_points): Define new static function.
(read_context::tu_die_imported_unit_points_map_): New data member.
(read_context::tu_die_imported_unit_points_map): New getter.
(die_die_attribute): Define new overload.
(build_die_parent_relations_under): Take imported_unit_points_type
output parameter and populate it along the way. Remove the
overload that takes a read_context as a parameter.
(build_primary_die_parent_relations_under)
(build_alternate_die_parent_relations_under): Remove.
(build_die_parent_maps): Pass an instance of
imported_unit_points_type to build_die_parent_relations_under.
(find_import_unit_point_between_dies): Rename one overload of
find_last_import_unit_point_before_die into this. Adjust to make
it find the import point between two offsets.
(find_import_unit_point_before_die): Rename the other overload of
find_last_import_unit_point_before_die into this. Adjust to use
find_import_unit_point_between_dies.
(get_parent_die): Adjust to use find_import_unit_point_before_die.
2016-01-04 Dodji Seketeli <dodji@redhat.com>
Support two different variables having the same underlying symbol
* src/abg-ir.cc (var_decl::get_id()): Include the name of the
variable in the ID.
2016-01-04 Dodji Seketeli <dodji@redhat.com>
Avoid adding the same base class twice
* src/abg-dwarf-reader.cc:
* src/abg-reader.cc:
2016-01-04 Dodji Seketeli <dodji@redhat.com>
Speed up class_decl::find_base_class
* src/abg-ir.cc (class_decl::priv::bases_map_): New data member.
(class_decl::add_base_specifier): Add the new base specifier to
the new class_decl::priv::bases_map_ data member.
(class_decl::find_base_class): Use the new
class_decl::priv::bases_map_ data member to speed up finding the
base class.
2016-01-04 Dodji Seketeli <dodji@redhat.com>
Make class_decl::base_spec class follow the pimpl pattern
* include/abg-ir.h (class_decl::base_spec::priv): Declare new
private data type.
(class_decl::base_spec::priv_): Declare new pimpl data member.
(class_decl::base_spec::{base_class_, offset_in_bits_,
is_virtual_}): Remove.
(class_decl::base_spec::{get_base_class, get_is_virtual,
get_offset_in_bits}): Make these member functions out of line.
* src/abg-ir.cc (struct class_decl::base_spec::priv): New type.
(class_decl::base_spec::{get_base_class, get_is_virtual,
get_offset_in_bits}): Define these functions here.
(class_decl::base_spec::base_spec): Adjust because now there is
only one pimpl data member to initialize.
2015-11-16 Ondrej Oprala <ooprala@redhat.com>
Add the option of printing the file, line and column information about a type being reported.
* bash-completion/abicompat: Complete the new "--no-show-locs" option.
* bash-completion/abidiff: Likewise.
* bash-completion/abidw: Likewise.
* bash-completion/abipkgdiff: Likewise.
* doc/manuals/abicompat.rst: Mention the new "--no-show-locs" option.
* doc/manuals/abidiff.rst: Likewise.
* doc/manuals/abidw.rst: Likewise.
* doc/manuals/abipkgdiff.rst: Likewise.
* include/abg-comparison.h (show_locs): Add declarations.
* src/abg-comparison.cc: (diff_context::priv): Add a new switch
called "show_locs_" and set its default value to false.
(report_loc_info): New function. Outputting the extra information
is conditionalized based on the associated diff contexts settings.
(show_locs): define a getter/setter for
diff_context::priv::show_locs_.
({distinct,pointer,reference,qualified_type,enum,class,scope,fn_parm,
typedef,corpus}_diff::report): Call report_loc_info when
appropriate.
(maybe_report_diff_for_member): Likewise.
(represent): Accept a const reference to a diff_context_sptr as a first
argument and call report_loc_info on its second argument.
* src/abg-dwarf-reader.cc:
* tests/data/Makefile.am: Add the new test reference files.
* tests/data/test-abicompat/test0-fn-changed-report-2.txt: New test
reference output.
* tests/data/test-abicompat/test5-fn-changed-report-1.txt: Likewise.
* tests/data/test-abicompat/test6-var-changed-report-1.txt: Likewise.
* tests/data/test-abicompat/test7-fn-changed-report-2.txt: Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
Likewise.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
Likewise.
* tests/data/test-diff-pkg/dirpkg-3-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test6-fn-suppr-report-0-1.txt: Likewise.
* tests/test-abidiff.cc: Explicitly create a diff context and turn off
location emitting.
* tests/test-diff-dwarf.cc: Likewise.
* tests/test-abicompat.cc: Add --no-show-locs to all existing test
arguments. Run a few of the existing tests again, but without this
option.
* tests/test-diff-filter.cc: Likewise.
* tests/test-diff-pkg.cc: Likewise.
* tests/test-diff-suppr.cc: Likewise.
* tools/abicompat.cc: Handle the new "--no-show-locs" option.
* tools/abidiff.cc: Likewise.
* tools/abidw.cc: Likewise.
* tools/abipkgdiff.cc: Likewise.
2015-11-16 Ondrej Oprala <ooprala@redhat.com>
Fix a function doc
* src/abg-ir.cc: (location_manager::expand_location): Fix a factual
error in the function documentation.
2015-12-11 Dodji Seketeli <dodji@redhat.com>
[PERF] Speedup comparing declaration-only class_decls
* src/abg-ir.cc (equals): In the overload for class_decl, avoid
calling class_decl::get_is_declaration_only() several times.
Avoid copying the qualified name of the class_decl. Also, use the
== operator to compare strings, rather than the != one.
2015-12-11 Dodji Seketeli <dodji@redhat.com>
[PERF] Access naked pointers for canonical types and function types
* include/abg-ir.h (type_base::get_naked_canonical_type): Declare
new accessor.
(function_decl::get_naked_canonical_type): Likewise.
(function_decl::set_type): Pass a reference to the shared_ptr.
* src/abg-ir.cc (type_base::priv::naked_canonical_type): New data
member.
(type_base::priv::priv): Initialize it.
(canonicalize): Set the naked canonicalize type when we set its
shared pointer.
(type_base::get_naked_canonical_type): Define new accessor.
({pointer_type_def,reference_type_def,function_type,class_decl}::operator==):
Use naked canonical pointers rather than the slower shared_ptr to
canonical pointers.
(function_decl::priv::naked_type_): New data member.
(function_decl::priv::priv): Initialize it.
(function_decl::get_naked_type): Define new accessor.
(function_decl::set_type): Pass a reference to the shared_ptr .
(equals): In the overload for function_decl, use the faster naked
pointers to the type of the function.
2015-12-11 Dodji Seketeli <dodji@redhat.com>
[PERF] Turn some pimpl pointers into naked pointers
* include/abg-ir.h ({decl_base, type_base, function_decl}::priv_)
Make this a naked pointer to priv, rather than a shared_ptr<priv>.
* src/abg-ir.cc (decl_base::~decl_base): Destroy the private data
pointer, aka pimpl pointer.
(type_base::~type_base): Likewise.
(function_decl::~function_decl): Likewise.
(class_decl::~class_decl): Likewise.
2015-12-11 Dodji Seketeli <dodji@redhat.com>
[PERF] Pass a bunch of perf-sensitive smart pointers by reference
* include/abg-fwd.h (lookup_type_in_corpus, lookup_type_in_scope)
(lookup_var_decl_in_scope): Pass the decls smart pointers by
reference.
* src/abg-ir.cc (lookup_type_in_corpus, lookup_type_in_scope)
(lookup_var_decl_in_scope): Pass the decls smart pointers by
reference, for performance reasons.
2015-12-10 Dodji Seketeli <dodji@redhat.com>
Bug 19126 - abidw segv on a dwz compressed version of r300_dri.so
* include/abg-ir.h (class location_manager): Forward declare it
before class location.
(location::loc_manager_): New data member.
(location::location): Take the location manager in one overload
and initialize the new loc_managers_ in all the overloads.
(location::get_location_manager): New getter.
(location::expand): New member function.
(location::*): Add API doc to all entry points.
(location_manager::expand_location): Take a const location.
(type_or_decl_base::set_corpus): Remove.
(type_or_decl_base::{get,set}_translation): New accessors.
(decl_base::{decl_base,get_location}): Take or return a reference
on location.
(scope_decl::scope_decl): Likewise.
(type_decl::type_decl): Likewise.
(namespace_decl::namespace_decl): Likewise.
(qualified_type_def::qualified_type_def): Likewise.
(pointer_type_def::pointer_type_def): Likewise.
(reference_type_def::reference_type_def): Likewise.
(array_type_def::subrange_type::{subrange_type,
get_location}): Likewise.
(enum_type_decl::enum_type_decl): Likewise.
(typedef_decl::typedef_decl): Likewise.
(var_decl::var_decl): Likewise.
(function_decl::function_decl): Likewise.
(function_decl::parameter::parameter): Likewise.
(template_decl::template_decl): Likewise.
(type_tparameter::type_tparameter): Likewise.
(non_type_tparameter::non_type_tparameter): Likewise.
(function_tdecl::function_tdecl): Likewise.
(class_tdecl::class_tdecl): Likewise.
(class_decl::class_decl): Likewise.
(class_decl::method_decl::method_decl): Likewise.
* src/abg-ir.cc (location::expand_location): Define new member
function.
(type_or_decl_base::priv::corpus_): Remove.
(type_or_decl_base::priv::translation_unit_): New data member.
(type_or_decl_base::priv::priv): Adjust.
(type_or_decl_base::set_corpus): Remove.
(type_or_decl_base::get_corpus): Adjust.
(type_or_decl_base::{get,set}_translation_unit): New member
functions.
(decl_base::priv::priv): Take a reference to location.
(decl_base::decl_base): Likewise.
(decl_base::get_location): Return a reference to location.
(location_manager::create_new_location): Adjust.
(location_manager::expand_location): Take a reference to location.
(translation_unit::get_global_scope()): Adjust.
(translation_unit::bind_function_type_life_time): Likewise.
(scope_decl::{add,insert}_member_decl): Adjust.
(get_translation_unit): Likewise.
(type_decl::type_decl): Take a reference to location.
(namespace_decl::namespace_decl): Likewise.
(qualified_type_def::qualified_type_def): Likewise.
(pointer_type_def::pointer_type_def): Likewise.
(reference_type_def::reference_type_def): Likewise.
(array_type_def::subrange_type::priv::priv): Likewise.
(array_type_def::subrange_type::{subrange_type,
get_location}): Likewise.
(enum_type_decl::enum_type_decl): Likewise.
(typedef_decl::typedef_decl): Likewise.
(var_decl::var_decl): Likewise.
(function_decl::function_decl): Likewise.
(function_decl::parameter::parameter): Likewise.
(template_decl::template_decl): Likewise.
(type_tparameter::type_tparameter): Likewise.
(non_type_tparameter::non_type_tparameter): Likewise.
(function_tdecl::function_tdecl): Likewise.
(class_tdecl::class_tdecl): Likewise.
(class_decl::class_decl): Likewise.
(class_decl::method_decl::method_decl): Likewise.
* src/abg-writer.cc (write_location): Take a reference to
location and adjust.
(write_array_type_def, write_function_decl, dump_decl_location):
Adjust.
2015-12-08 Dodji Seketeli <dodji@redhat.com>
Fix some white space nits
* src/abg-comparison.cc (class_diff::report): Remove a useless
horizontal white space.
* src/abg-ir.cc (operator==): Add a vertical space.
2015-12-08 Dodji Seketeli <dodji@redhat.com>
Filter out harmless diagnostics glitches due to some ODR violation
* src/abg-comp-filter.cc
(class_diff_has_harmless_odr_violation_change): New static
function.
(harmless_filter::visit): Call it.
2015-12-08 Dodji Seketeli <dodji@redhat.com>
Fix internal name for pointers, typedefs and arrays
* include/abg-ir.h (pointer_type_def::priv_): New data structure.
The type is now pimpled.
(typedef_decl::priv_): Likewise.
* src/abg-ir.cc (struct pointer_type_def::priv): New struct.
(pointer_type_def::pointer_type_def): Adjust.
(pointer_type_def::get_pointed_to_type): Likewise.
(pointer_type_def::get_qualified_name): Store temporary/internal
names into different caches.
(array_type_def::priv::{temp_internal_qualified_name_,
internal_qualified_name_}): New data members.
(get_type_representation): In the overload for array_type_def,
take requests for internal names into account.
(array_type_def::get_qualified_name): Take requests for internal
names into account. Store temporary/internal names into different
caches.
(typedef_decl::priv): New struct.
(typedef_decl::typedef_decl): Adjust.
(typedef_decl::get_underlying_type): Likewise.
2015-12-08 Dodji Seketeli <dodji@redhat.com>
Avoid try/catch code paths when that is possible
* src/abg-ir.cc (is_type, equals): Do not use try/catch based
dynamic_cast.
2015-12-08 Dodji Seketeli <dodji@redhat.com>
Fix comparison in qualified_type_diff::has_changes
* src/abg-comparison.cc (qualified_type_diff::has_changes): Make
this stupid and simple, now that we have (fast) canonical type
based comparison.
* include/abg-ir.h (qualified_type_diff::operator==): Add an
overload for qualified_type_diff here.
(operator==): Likewise.
* src/abg-ir.cc (qualified_type_diff::operator==): Define it.
(operator==): Likewise.
2015-12-06 Dodji Seketeli <dodji@redhat.com>
Bug 19336 - Better handle redundantly qualified reference types
* src/abg-dwarf-reader.cc (maybe_strip_qualification): Do not nuke
the qualified type. Rather, just turn the redundant const
qualifier into a no-op one.
* src/abg-comparison.cc (compute_diff_for_types): Look through
no-op qualified types.
* include/abg-ir.h
(decl_base::{peek,set}_temporary_qualified_name): Declare new
accessors.
* src/abg-ir.cc (decl_base::priv::temporary_qualified_name_): New
data member.
(decl_base::{peek,set}_temporary_qualified_name): Define new
accessors.
(qualified_type_def::priv::{temporary_internal_name_,
internal_name}): New data members.
(qualified_type_def::build_name): For a no-op qualified type, the
internal name (which contains the 'none' qualifier) is different
from the non-internal name.
(qualified_type_def::get_qualified_name): Handle temporary names
and non-temporary names in two different caches. Also handle
internal and non-internal names in two different caches. This
makes four different caches.
(qualified_name_setter::do_update): Do not touch the non-internal,
non-temporary qualified name cache if the qualified parent name is
empty.
* tools/abidw.cc (main): change --check-alternate-debug-info to
make it *not* display the name/path to the alternate debug info,
when it's found. Rather, only
--check-alternate-debug-info-base-name keeps displaying the base
name of the alternate debug info.
* tests/data/test-alt-dwarf-file/test1-libgromacs-debug-dir/*: New
test material.
* tests/data/Makefile.am: Add the new test material to the build
system.
* tests/test-alt-dwarf-file.cc (in_out_specs): Take the new test
input into account.
* tests/data/test-read-dwarf/test1.abi: Adjust.
* tests/data/test-read-dwarf/test7.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
Likewise.
2015-12-06 Dodji Seketeli <dodji@redhat.com>
Do not forget to peel qualified type off when peeling types
* include/abg-fwd.h (peel_qualified_type): Declare new function
...
* src/abg-ir.cc (peel_qualified_type): ... and define it.
(peel_typedef_pointer_or_reference_type): Peel qualified types
here too.
2015-12-06 Dodji Seketeli <dodji@redhat.com>
Find more spots where to discriminate internal and non-internal names
* src/abg-ir.cc (get_type_name, get_method_type_name)
({typedef_decl,var_decl,function_decl,class_decl}::get_pretty_representation):
Propagate the internal-ness to the call to get_qualified_name().
2015-12-06 Dodji Seketeli <dodji@redhat.com>
Constify is_qualified_type()
* include/abg-fwd.h (is_qualified_type): Make this take a const
parameter.
* src/abg-ir.cc (is_qualified_type): Likewise.
2015-11-28 Dodji Seketeli <dodji@redhat.com>
Add missing new line to abidiff help message
* tools/abidiff.cc (display_usage): Add missing new line.
2015-11-26 Dodji Seketeli <dodji@seketeli.org>
Do not abort when there is no binary to compare in a package
* tests/data/test-diff-pkg/empty-pkg-libvirt-0.9.11.3-1.el7.ppc64.rpm:
New input test package.
* tests/data/test-diff-pkg/empty-pkg-libvirt-1.2.17-13.el7_2.2.ppc64.rpm:
Likewise.
* tests/data/test-diff-pkg/empty-pkg-report-0.txt: New test
reference output.
* data/Makefile.am: Add the new test material above to the build system.
* tests/test-diff-pkg.cc (int_out_specs): Add the new test inputs
to the set of tests.
* tools/abipkgdiff.cc (compare): Do not abort if there is no
binary to compare.
2015-11-14 Ondrej Oprala <ooprala@redhat.com>
Abidiff: Remove doubled line in help.
* tools/abidiff.cc (display_usage): Remove a doubled help message.
2015-11-14 Ondrej Oprala <ooprala@redhat.com>
Add bash-completion scripts for the libabigail tools
* Makefile.am: include bash-completion/Makefile.am
* bash-completion/Makefile.am: New makefile for the bash-completion
directory.
* bash-completion/abicompat: New completion script.
* bash-completion/abidiff: Likewise.
* bash-completion/abidw: Likewise.
* bash-completion/abilint: Likewise.
* bash-completion/abinilint: Likewise.
* bash-completion/abipkgdiff: Likewise.
* bash-completion/abisym: Likewise.
* configure.ac: Check for the bash-completion package. Handle
the new --enable-bash-completion[=WHEN] configure option.
* manuals/libabigail-tools.rst: Mention the scripts.
2015-11-17 Dodji Seketeli <dodji@redhat.com>
Read enum values in the size_t and write them in ssize_t
* include/abg-ir.h (enum_type_def::enumerator::get_value): Return
a size_t.
* src/abg-ir.cc (enum_type_decl::enumerator::get_value): Likewise.
* src/abg-dwarf-reader.cc (die_signed_constant_attribute): #if-out
this static function that is not used anymore.
(build_enum_type): Read the value of the enumerator using a size_t
value.
* src/abg-reader.cc (build_enum_type_decl): Read the enum value
using a long long int.
* src/abg-writer.cc (write_enum_type_decl): Write using a ssize_t.
2015-11-17 Dodji Seketeli <dodji@redhat.com>
Bump version to release candidate 1.0.rc1
* configure.ac: Bump version to release candidate 1.0.rc1
2015-11-17 Dodji Seketeli <dodji@redhat.com>
Do not use designated initializers in abipkgdiff.cc
* tools/abipkgdiff.cc (prepare_packages): Do not use designated
initializers syntax.
2015-11-16 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog for 1.0.rc0
* ChangeLog: Udpate using make update-changelog
2015-11-16 Dodji Seketeli <dodji@redhat.com>
Fix doxygen configuration file paths in doc/Makefile.am
* doc/Makefile.am: There was an extra "/doc" in the path.
2015-11-16 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog file in preparation of 1.0.rc0 release
* ChangeLog: Update using make update-changelog.
2015-11-16 Dodji Seketeli <dodji@redhat.com>
Add --version option to several libabigail tools
* configure.ac: Set the version revision to "rc0".
* doc/manuals/abicompat.rst: Adjust manual for new --version
option.
* doc/manuals/abidiff.rst: Likewise.
* doc/manuals/abidw.rst: Likewise.
* doc/manuals/abilint.rst: Likewise.
* doc/manuals/abipkgdiff.rst: Likewise.
* include/abg-config.h (config::{m_format_minor, m_format_major}):
Make these be strings.
(config::{get,set}_format_minor_version_number): Make these return
strings.
(config::{get,set}_format_major_version_number): Make these return
or take strings.
(abigail_get_library_version): Make this take strings.
* src/abg-config.cc (config::config): Adjust.
(config::{get,set}_format_major_version_number): Make these return
or take strings.
(config::{get,set}_format_minor_version_number): Make these return
strings.
(abigail_get_library_version): Make this take strings.
* include/abg-version.h.in: Make the version variables be strings.
* src/abg-writer.cc (write_translation_unit): The version numbers
are now strings so adjust.
* tools/{abicompat,abidiff,abidw,abilint,abipkgdiff,abisym}.cc
(options::display_version): New data member.
(options::options): Initialize it.
(display_usage): Add documentation for new --version option.
(parse_command_line): Parse new --version option.
(main): Support --version.
2015-11-12 Dodji Seketeli <dodji@redhat.com>
Correctly handle fn DIE with abstract_origin in alt debug info
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Consider that
the function decl is for a DIE in the alternate debug info file only if
the DIE itself comes from the alternate debug info file, not if
the specification or the origin of the function comes from the
alternate debug info file.
* tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-20.el7.ppc64.rpm:
New test input rpm.
* tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64.rpm: Likewise.
* tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-20.el7.ppc64.rpm: Likewise.
* tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-7.el7.ppc64.rpm: Likewise.
* tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64--qemu-img-rhev-2.3.0-20.el7.ppc64-report-0.txt:
New test reference output.
* tests/data/Makefile.am: Add the new test material to the source
distribution.
* tests/test-diff-pkg.cc (in_out_specs): Use the new test rpm
inputs.
2015-11-09 Ondrej Oprala <ooprala@redhat.com>
Bug 19081 - abipkgdiff parallelization
* doc/manuals/abipkgdiff.rst: Mention the new --no-parallel option.
* tools/Makefile.am: Add -pthread to abipkgdiffs link options.
* tools/abipkgdiff.cc (elf_file_paths_tls_key): New key for the
thread-local vector of ELF filepaths.
(reports_map): A map of the path of the first ELF of a compared pair
and a corpus representing the difference.
(env_map): A map of the corpus difference and a corresponding
environment needed to be kept alive until the diff is reported.
({arg,map}_lock): mutexes to control access to the comparison argument
list and the {reports,env}_map respectively.
(options): Add a new member "parallel" and set it to true in the ctor.
(elf_file): Add a new "size" member and set it in the ctor.
(package descriptor): Arguments passed to extract_package_set.
(compare_args): Arguments passed to the ELF comparison function.
(display_usage): Mention the new "--no-parallel" option.
(pthread_routine_extract_package): A wrapper function around
extract_package to be used in a multi-threaded environment.
({first_second}_package_tree_walker_callback_fn): Add the new ELF file
paths to a thread-specific vector.
(compare): In an overload of compare, verbose output is updated to
always mention the ELF files being compared for each reported stage.
Reporting is no longer done in this function, the resulting difference
is instead passed back to the calling function for reporting in the
main thread, along with a corresponding environment.
(pthread_routine_compare): Accept a pointer to a vector of comparison
arguments. This function is to be called NTHREAD times and share the
vector passed to it with its other invocations. Create the environment
for compare() and store its output in a map if there is a difference.
(create_maps_of_package_content): Allocate memory for a thread local
vector of ELF paths and dispose of it before returning.
(pthread_routine_extract_pkg_and_map_its_content): Renamed from
extract_package_and_map_its_content. Extract the debuginfo as well as
the regular package in this function. Spawn a separate thread for the
extraction of the debug package.
(pthread_join): A function handling thread joining throughout package
extractions.
(prepare_packages): Spawn a thread to extract each set of packages.
(elf_size_is_greater): New comparison function used to order ELF pairs
by size.
(compare): In the overload of compare, pass through the ELF path
vectors and identify pairs to be diffed. Put them in a vector and sort
it by the summed ELF pair size. Spawn comparison threads and safely
check for results in the proper order of the ELF pairs. Report any
differences ASAP and collect the threads after all the reporting is
done, checking their return status.
(parse_command_line): Check for the "--no-parallel" option.
2015-11-10 Dodji Seketeli <dodji@redhat.com>
Fix typo in test-diff-dwarf-abixml.cc
* tests/test-diff-dwarf-abixml.cc (main): Fix typo.
2015-10-14 Ondrej Oprala <ooprala@redhat.com>
Document abipkgdiff's option --no-abignore
* doc/manuals/abipkgdiff.rst: Mention the new option.
* tools/abipkgdiff.cc: Likewise.
2015-11-09 Dodji Seketeli <dodji@redhat.com>
Avoid canonicalizing function types too early
* src/abg-dwarf-reader.cc (die_function_type_map_type): New
typedef.
* ():
(read_context::die_wip_function_types_map_): New data member.
(read_context::{die_wip_function_types_map,
is_wip_function_type_die_offset}): New methods.
(build_function_type): Mark the function being built as "work in
progress".
(maybe_canonicalize_type): Do not early-canonicalize WIP function
types.
* src/abg-reader.cc (build_function_type): Mark the function being
built as "work in progress".
* tests/test-diff-dwarf-abixml.cc: New test harness.
* tests/Makefile.am: Add new test harness runtestdiffdwarfabixml
to the build system.
* tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1:
New test binary input.
* tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
New test input.
* tests/data/Makefile.am: Add new test inputs to source
distribution.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
2015-11-09 Dodji Seketeli <dodji@redhat.com>
Propagate environment property to base specifiers
* src/abg-comparison.cc (compute_diff): In the overload for
class_decl::base_spec_sptr, assert that the environment of the
base classes are equal and that the environment the base class is
the same as the environment of the base specifier.
* src/abg-ir.cc (add_base_specifier): Propagate the environment of
the class to its base specifiers.
* tests/data/test-types-stability/pr19026-libvtkIOSQL-6.1.so.1:
New test binary input.
* tests/data/Makefile.am: Add the new test input to the build
system.
* tests/test-types-stability.cc (elf_paths): Add new binary to the
test harness.
2015-11-09 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-comparison.cc (diff_context::mark_diff_as_visited): Add
missing space.
(corpus_diff::priv::ensure_lookup_tables_populated): Likewise.
* src/abg-dwarf-reader.cc (lookup_symbol_from_elf): Likewise.
(get_soname_of_elf_file, get_type_of_elf_file): Likewise.
* src/abg-ir.cc (var_decl::get_pretty_representation): Likewise.
2015-11-07 Dodji Seketeli <dodji@redhat.com>
Support DW_AT_count DWARF attribute
* src/abg-dwarf-reader.cc (get_default_array_lower_bound): Define
new static function.
(build_array_type): Support the DW_AT_count attribute.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang.so:
New test binary input.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang2.so: Likewise.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt:
New test reference output.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc.so:
New test binary input.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc2.so:
New test binary input.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt:
New test reference output.
* tests/data/test-diff-dwarf/test35-pr19173-libfoo-long.c: Source
code for the binaries above.
* tests/data/Makefile.am: Add the new test material to the build
system.
* tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs
to the harness.
2015-11-07 Dodji Seketeli <dodji@redhat.com>
Bug 19173 - Abidiff doesn't detect symbol size change in library
* include/abg-ir.h (elf_symbol::{elf_symbol, create}): Take a size
parameter.
(elf_symbol::{get,set}_size): New accessors.
* src/abg-ir.cc (elf_symbol::priv::size_): New data member.
(elf_symbol::priv::priv): Initialize it.
(elf_symbol::{elf_symbol, create}) Take a size parameter.
(textually_equals): Compare the size of variable symbols.
(elf_symbol::{get, set}_size): New accessors.
* src/abg-comparison.cc (maybe_report_diff_for_symbol): New static
function.
({function_decl_diff,var_diff}::report): Use it.
* src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab)
(read_context::lookup_elf_symbol_from_index): Set the size of the
elf symbols' internal representation.
* src/abg-reader.cc (build_elf_symbol): Read the size attribute if
present.
* src/abg-writer.cc (write_elf_symbol): Write the size attribute
for variable symbols, if it's not zero.
* tests/data/test-diff-dwarf/test34-pr19173-libfoo.so: New test
input binary.
* tests/data/test-diff-dwarf/test34-pr19173-libfoo2.so: Likewise.
* tests/data/test-diff-dwarf/test34-pr19173-libfoo-report-0.txt:
New reference test output.
* tests/data/Makefile.am: Add the new test input binaries to the
build system.
* tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
above to the test harness.
* tests/data/test-diff-dwarf/test9-report.txt: Adjust.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
* tests/data/test-read-dwarf/test0.abi: Likewise.
* tests/data/test-read-dwarf/test1.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
Likewise.
* tests/data/test-read-dwarf/test6.so.abi: Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2015-11-07 Dodji Seketeli <dodji@redhat.com>
Add some needed vertical space
* src/abg-dwarf-reader.cc (build_array_type): Add a new line after
this function.
2015-11-07 Dodji Seketeli <dodji@redhat.com>
Pass a bunch of parameters by reference as they ought to be
* include/abg-ir.h (operator==): In the overload for
elf_symbol_sptr, pass the parameters by reference.
* src/abg-ir.cc (operator==): Do the same at definition site.
* src/abg-comparison.cc (maybe_report_diff_for_member): Pass
parameters by reference.
2015-11-05 Dodji Seketeli <dodji@redhat.com>
Bug 19139 - DWARF reader doesn't handle garbage in function names
* include/abg-tools-utils.h (string_is_ascii): Declare new
function ...
* src/abg-tools-utils.cc (string_is_ascii): ... and define it.
* src/abg-writer.cc (write_function_type): Escape forbidden XML
characters in function type names.
* src/abg-dwarf-reader.cc (build_function_type): If a parameter
name is not ascii, drop it on the floor.
* tests/data/test-types-stability/pr19139-DomainNeighborMapInst.o:
New test input binary.
* tests/data/test-types-stability/pr19202-libmpi_gpfs.so.5.0:
Likewise.
* tests/data/Makefile.am: Add the new binaries above to the build
system.
* tests/test-types-stability.cc: New test harness.
* tests/Makefile.am: Add the new test harness to the build system.
2015-11-05 Dodji Seketeli <dodji@redhat.com>
Introduce the name abixml in some comments
* src/abg-reader.cc: Mention abixml in the comment at the top of
the file.
* src/abg-writer.cc: Likewise.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Bug 19026 - Types with same name and different size considered equivalent
* src/abg-ir.cc (type_base::get_canonical_type_for): Really
compare the size of the type to be canonicalized against the size
of the *current* potential canonical type of the same name.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Add a script to update the reference output of runtestreaddwarf
* tests/update-test-read-dwarf-output.py: New helper python program.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Style fixes in the abixml writer.
* src/abg-writer.cc (write_var_decl): Use the var_decl_sptr
typedef.
(write_class_decl): Indent.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Fix typo in test-read-dwarf.cc
* tests/test-read-dwarf.cc (for test test21-pr19092.so.abi): Fix
typo in the output path of that test.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Adjust regression tests reference output for the current patch set
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so:
New test input binary.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
New test reference output.
* tests/data/Makefile.am: Add the new test files above to the
source distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add the two new test
files above to the set of test input files.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Use abidw --abidiff in test-read-dwarf.cc
* tests/test-read-dwarf.cc (handle_in_out_spec): Rather than
calling abilint on the abixml and abidiff-ing the .so file against
its .so.abi, call abidw --abidiff on the .so file and voila. Ok,
it does one extra save of abixml, but then that won't hurt. And
things are faster now than what they were anyway :-)
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Fix emitting of referenced type in abixml writer
* Use of canonical pointers in the hash map of referenced types
The abixml writer was using canonical types pointer values to hash
referenced types in a map. It was doing so "by hand"; and it was thus
messing things up for types without canonical types (like some class
declarations) etc.
This patch changes that by using the generic solution of
abigail::ir::hash_type_or_decl(), which also uses the same canonical
pointer type values. For types with no canonical types, that
functions knows has to gracefully fallback. At worst, it will just
make things slower, not wrong.
* Sorting of referenced types
The patch also changes the sorting function used for the hash map of
referenced types. The previous solution was sorting the pretty
representation of types; but then when two types have the same pretty
representation (think, typedefs, for instance) then their relative
position in the sorted result was random. This causes some stability
issues, in that emitting the abixml for the same binary several times
can lead to the some types being sorted differently -- they have the
same name, but not necessarily the same type *IDs*, as they are
different types.
The new sorting code handles this better; it also uses the pretty
representations of types, when they are equal, it uses the type IDs to
tell the types apart. At least this brings stability in the abixml
output, for a given binary.
* Avoiding duplicating declaration-only types when emitting the
context of referenced member types.
We don't keep track of declaration-only classes that are emitted.
This is because we allow a given class declaration (that carries no
definition) to appear several times in a given ABI corpus. So when a
referenced type is a class declaration, it always appears as if that
referenced type has not been emitted. So when we specifically emit
the not-emitted referenced types, it can happen that declaration-only
classes can appear a lot of times. This is unnecessary duplication,
aka bloat.
This patch thus introduces a new hash map that tracks emitted
declaration-only classes, so that we can allow duplication of class
declarations when they follow what's done in the IR read from DWARF,
and disallow that duplication when it's totally artificial and
useless.
* Better tracking of referenced types
We were blatantly forgetting to mark some referenced types as such.
So those were missing in some abixml output.
This patch fixes the spots where we were forgetting that important
information.
* Better representation of the scopes of the referenced types that
were specifically emitted.
The previous code was failing at properly representing the class scope
of some referenced types that were specifically emitted, or sometimes,
for member types, representing the scope would be so screwed that the
(referenced) member type itself wouldn't be emitted at all.
This is because I thought that to emit a given member type, just
emitting its parent scope would be enough. I thought that would
automatically trigger emitting the member type itself. First, that
would emit too much information at times; the other members of the
scope are not necessarily needed. And second the "duplication
detection code" would sometime refuse to emit the scope class, because
it has already been emitted earlier! But the incarnation that got
emitted didn't have this member type as member, then. Yes, in DWARF,
the same class A can be declared several times with different member
types in it. The complete representation of A would be a union of all
those declarations of A that are seen.
This patch addresses this issue by carefully emitting just the
information that is needed from the scope of the referenced type.
Basically the scope is declared just to declare/define the type we are
interested in; period. The abixml reader is now properly geared to
re-construct the scope by merging its different parts that are now
scattered around, in the ABI corpus. That support is part of this
patch set.
instance, a member typedef would be emitted with the information of
its parent class badly formatted.
* src/abg-writer.cc (struct type_ptr_comp_functor): Remove this.
(sort_type_ptr_map): Likewise.
(write_context::record_type_as_referenced): Do not add the
canonical type of the type to record as referenced directly.
(write_context::type_is_referenced): Adjust accordingly.
(struct write_context::type_ptr_cmp): New comparison functor.
(write_context::sort_types): New sorting function.
(write_context::{record_decl_only_type_as_emitted,
decl_only_type_is_emitted}): New member functions.
(write_member_type_opening_tag): Factorize out of ...
(write_member_type): ... here.
(write_class_decl_opening_tag): Factorize out of ...
(write_class_decl): ... here. Now, keep track also of
declaration-only classes that are emitted.
(write_decl_in_scope): Use the new write_member_type_opening_tag
and write_class_decl_opening_tag. Now write class scopes
ourselves; they only contain the type declarations that we are
emitting.
(write_translation_unit): Use the new sorting code to sort the
referenced types to emit. Do not emit referenced types that are
declaration-only classes that have already been emitted. Handle
the fact that emitting the referenced types might make those
emitted type *reference* other types too! So handle those new
referenced types as such, and emit them too.
(write_qualified_type_def, write_typedef_decl, write_var_decl): Do
not forget to mark referenced types as such.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Support updating a class in the abixml reader
* include/abg-ir.h (class_decl::{find_base_class,
find_member_type, find_data_member}): Declare new member functions ..
* src/abg-ir.cc (class_decl::{find_base_class,
find_member_type, find_data_member}): ... and define them.
* src/abg-reader.cc (build_class_decl): Add the ability to update
a class to add new data members, member types and base classes to
it, if necessary.
2015-10-17 Dodji Seketeli <dodji@redhat.com>
Don't canonicalize types not added to their context in abixml reader
* src/abg-reader.cc (read_context::maybe_canonicalize_type):
Assert that a class type that is scheduled for canonicalization
must be in a scope. We do this only for classes, for now. The
assert here helped to spot (and fix) a lot of places where we
were canonicalizing types without scope.
(read_context::build_or_get_type_decl): Canonicalize types here,
when they are built and (hopefully) added to their scope. There
might be cases here where we try to canonicalize types that are
not added to their scope. That should bomb in the assert above,
at least for class types, for now. We'll then fix the places where
the types are created, to make them properly scoped.
(build_type_decl, build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def)
(build_array_type_def, build_enum_type_decl, build_typedef_decl):
Do not try to canonicalize the types early, right when they are
created. Canonicalization should happen at the point where (or
after) they are added to their scope.
(build_class_decl): Likewise. Also, schedule member types for
canonicalization once they've been added to their scope.
(build_class_tdecl): Schedule the pattern of the class template
for canonicalization once it has been added to its scope. I am
not sure I should do this, as the pattern is not yet a real type,
but I am taking my bet.
(build_type_composition): Schedule the composed type for
canonicalization once it's been added to its scope.
(handle_type_decl, handle_qualified_type_decl)
(handle_pointer_type_def, handle_reference_type_def)
(handle_function_type, handle_array_type_def)
(handle_enum_type_decl, handle_typedef_decl, handle_class_decl):
At this point, we should know if the type is to be added to a
scope or not. If it's in a scope, then schedule for
canonicalization.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Bug 19092 - abidw aborts on types that violate the ODR
* src/abg-ir.cc (type_base::get_canonical_type_for): Look at the
size of types with the same name which could be considered
ODR-equal, to spot possible violations that would induce a type
canonicalization error.
* tests/data/test-read-dwarf/test21-pr19092.so: New test input
binary.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: New reference
abixml for the binary above.
* tests/data/Makefile.am: Add the new test input above to source
distribution.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/test-read-dwarf.cc (int_out_specs): Add the two test input
above.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Fix activation of Debian package support
* configure.ac: If we cannot activate Debian package support, then
report it clearly.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Misc style cleanup
* include/abg-fwd.h: Remove unnecessary declaration of class
parameter.
* src/abg-ir.cc: Remove trailing space in a comment.
* src/abg-reader.cc: Fix a comment.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Emit statistics about resolved class declarations
* src/abg-dwarf-reader.cc
(read_context::resolve_declaration_only_classes): Emit statistics
about resolved classes and the missed ones.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Add a missing xml text reader call
* src/abg-reader.cc (read_corpus_from_input): Add the necessary
call to xmlTextReaderNext call after the xmlTextReaderExpand call.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Pass some more parameters in reference
* include/abg-ir.h (operator==): For the type_base_sptr and
decl_base_sptr overloads, pass the parameters by reference.
({var,function}_decl::{set,get}_symbol): Pass the elf_symbol_ptr
by reference.
* src/abg-ir.cc (operator==): For the type_base_sptr and
decl_base_sptr overloads, pass the parameters by reference, now in
the definition.
({var,function}_decl::{set,get}_symbol): Pass the elf_symbol_ptr
by reference, now in the definition.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Adjust tests for the patchset
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Make abidw --abidiff not show definitely harmless changes
* tools/abidw.cc (set_diff_context): New function.
(main): Use that new function. Do not show any output for
--abidiff if only compatible changes were detected. Also, do not
abort if no input binary was giving.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Allow only one definition of a given type per corpus in abixml
* src/abg-writer.cc (write_translation_unit): Do not clear some
important per-translation unit maps here. There are needed to
keep track of the emitted and referenced types through the entire
corpus. Avoid (wrongly) recording function types twice.
(write_array_type_def, write_function_decl, write_function_type):
Record referenced types.
(write_class_decl): Record referenced types, and, allow only
declarations to be duplicated in a corpus.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
A series of small speed optimizations here and there
* src/abg-comparison.cc (var_diff::has_changes): Just compare the
two var_decl. It's (way) faster now than using recursive hashing
for that.
* src/abg-ir.cc (elf_symbol::does_alias): Get out early if the two
main symbols are equal.
(equals): In the overload for function_decl, start by comparing
types. This can be very fast for functions with different types,
as it amounts to a pointer comparison. In the overload for
class_decl, avoid a map lookup when it's not necessary.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Accelerate a slow path in hash_type_or_decl()
* include/abg-ir.h (is_function_parameter, is_class_base_spec):
Declare new functions.
* src/abg-ir.cc (is_function_parameter, is_class_base_spec):
Define them.
(hash_type_or_decl): Handle hashing of function parameters are
class base specifications with the fast path of type hashing.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Implement fast type lookup in a corpus
* include/abg-fwd.h (components_to_type_name): Declare new
function.
* include/abg-ir.h (string_type_base_wptr_map_type): New typedef.
(translation_unit::{get,set}_types): Declare new member functions.
* src/abg-ir.cc (translation_unit::priv::types_): New data member.
(translation_unit::{get,set}_types): Define these member
functions.
(maybe_update_types_lookup_map): Define new static function.
(components_to_type_name): Define new function.
(scope_decl::{add_member_decl, insert_member_decl}): Call the new
maybe_update_types_lookup_map.
(scope_decl::find_iterator_for_member): Fix logic.
(class_decl::set_is_declaration_only): When a class declaration
becomes a definition, update the name -> type map maintained in
the scope of the class.
(lookup_type_in_translation_unit): Use the hash map of qualified
name -> types that is now maintained in the translation unit.
This is way faster than the previous walking algorithm.
* src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
When fixing up global variable declarations that need to be
re-added to the translation unit, use the new fast type lookup
function.
2015-10-15 Dodji Seketeli <dodji@redhat.com>
Set the corpus of all ABI artifact reads from abixml
* src/abg-reader.cc (read_translation_unit): Set the current
corpus to the current translation unit being built.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Make canonicalization non sensitive to struct-ness of subtypes
* include/abg-fwd.h (get_type_name, get_function_type_name)
(get_method_type_name, get_pretty_representation): Add an
"internal" flag to all overoads.
* include/abg-ir.h
({type_or_decl_base, decl_base, type_decl, scope_type_decl,
qualified_type_def, array_type_def, enum_type_decl, typedef_decl,
var_decl, function_decl, function_decl::parameter, function_type,
method_type, class_decl}::get_pretty_representation): Add an
'internal' flag.
({decl_base, qualified_type_def, pointer_type_def,
reference_type_def, array_type_def, enum_type_decl::enumerator,
function_decl::parameter}::get_qualified_name): Likewise.
(qualified_type_def::build_name): Likewise.
* src/abg-ir.cc ({decl_base, qualified_type_def, pointer_type_def,
reference_type_def, array_type_def, enum_type_decl,
enum_type_decl::enumerator,
function_decl::parameter}::get_qualified_name): Take an "internal"
flag.
(qualified_type_def::build_name): Likewise.
({decl_base, type_decl, namespace_decl, array_type_def,
enum_type_decl, typedef_decl, var_decl, function_type,
method_type, function_decl,
class_decl}::get_pretty_representation): Likewise.
(get_type_name, get_function_type_name, get_method_type_name)
(get_pretty_representation): Likewise.
(type_base::get_canonical_type_for): Call
get_pretty_representation() with the "internal" flag set to
"true", to get a pretty representation that is independant from
the struct-ness of the subtypes of the type being canonicalized.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Handle aliased function decls when comparing decls in general
* include/abg-ir.h (is_function_decl): Add a const to the
reference parameter, making it comply with the definition.
* src/abg-ir.cc (equals): In the overload for decl_base, when the
two linkage names are different, consider the case of the decls
being aliased functions.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Fix const-ness of a function parameter
* include/abg-fwd.h (is_function_decl): Add a const to the
parameter to make it comply with the definition in abg-ir.cc.
Woops.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Fix "is-anonymous" abixml property impact on some tests
* tests/data/test-abidiff/test-PR18166-libtirpc.so: New file.
* tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Likewise.
* tests/data/test-abidiff/test-corpus0-report0.txt: Renamed into
tests/data/test-abidiff/test-PR18166-libtirpc.so.report.txt.
* tests/data/test-abidiff/test-corpus0-v{0,1}.so.abi: Removed.
* tests/data/Makefile.am: Renamed test-corpus0-* files into
test-PR18166-libtirpc.so-* files.
* tests/test-abidiff.cc (specs): Adjust.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Do not compare access specs for member types & functions
* include/abg-fwd.h (is_function_decl): Declare a new overload.
* src/abg-ir.cc (is_function_decl): Define a new overload.
(equals): In the overload for decl_base, do not compare access
specifiers when comparing member functions and types.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test0-report.txt: Likewise.
* tests/data/test-diff-filter/test01-report.txt: Likewise.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise.
* tests/data/test-diff-filter/test4-report.txt: Likewise.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Fix strip_typedef issues
* src/abg-ir.cc (strip_typedef): Do not canonicalize
the return type of the method type to typedef-strip.
Acknowledge that the return type can be nil.
2015-10-14 Dodji Seketeli <dodji@redhat.com>
Force late canonicalizing of function types read from abixml
* src/abg-reader.cc (build_function_type): Late-canonicalize
function types.
2015-10-13 Ondrej Oprala <ooprala@redhat.com>
Bug 19082 - Recognize suppression spec files
* tests/data/Makefile.am: Add new test material to the build system.
* tests/data/test-diff-pkg/dirpkg-{0-dir1,{1,2}-dir2}/dir.abignore:
A test suppression specification.
* tests/data/test-diff-pkg/dirpkg-{2,3}-dir2/.abignore: Likewise.
* tests/data/test-diff-pkg/dirpkg-3.suppr: Likewise.
* tests/data/test-diff-pkg/dirpkg-{1,2,3}-dir{1,2}/libobj-v0.so: New
binary test inputs.
* tests/data/test-diff-pkg/dirpkg-{1,2,3}-dir{1,2}/obj-v0.cc: New test
source files
* tests/data/test-diff-pkg/dirpkg-{1,2,3}-report-{0,1}.txt: New
reference outputs
* tests/test-diff-pkg.cc: Adjust to run the new tests.
* tools/abipkgdiff.cc (prog_options): New static pointer to struct
opts.
(file_tree_walker_callback_fn): Rename to
first_package_tree_walker_callback_fn.
(second_package_tree_walker_callback_fn): Check for ELF files just
like the previous function but additionally check for files
ending with ".abignore", unless disabled from the command line.
({create_maps_of_package,extract_package_and_map_its}_content):
Add a callback as a new argument.
(main) handle the new "--no-abignore" option, which turns off
the search for suppression files within the new package.
2015-10-08 Dodji Seketeli <dodji@redhat.com>
Bug 19024 - Failing to flag underlying type of enums as anonymous
* src/abg-dwarf-raeder.cc (build_enum_type): Set the is-anonymous
flag on the underlying type of the enum.
* tests/data/test-read-dwarf/test0.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
2015-10-08 Dodji Seketeli <dodji@redhat.com>
Bug 19025 - abixml writer forgets to emit some member types
* include/abg-fwd.h (is_namespace): Fix prototype.
* src/abg-writer.cc (struct type_ptr_comp_functor): New internal
type.
(sort_type_ptr_map): New static function.
(write_context::m_referenced_types_map): Renamed
m_referenced_fntypes_map data member into this.
(write_context::get_referenced_types): New member function.
(write_context::record_type_as_referenced): Renamed
record_fntype_as_referenced member function into this. Adjust.
(write_context::type_is_referenced): Renamed fntype_is_referenced
into this.
(write_context::clear_referenced_types_map): Renamed
clear_referenced_fntypes_map member function into this. Adjust.
(write_decl_in_scope): New static function.
(write_translation_unit): Use it here to emit types that are
referenced by other types in the TU, but that are not emitted.
Adjust.
(write_pointer_type_def, write_reference_type_def)
(write_typedef_decl): Record the underlying types referenced by
the emitted types as being, well, referenced.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so:
New test binary input.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
New reference output of the binary input above.
* tests/data/Makefile.am: Add the new test material above to the
source distribution.
* tests/test-read-dwarf.cc (in_out_spec): Add the new test inputs.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
2015-10-06 Ondrej Oprala <ooprala@redhat.com>
Parallelize test read-dwarf.
* tests/Makefile.am: Link runtestreaddwarf with libpthread.
* tests/test-read-dwarf.cc (main) Create worker threads corresponding
to the number of CPUs online, add a "--no-parallel" option and move
the main loop...
(handleInOutSpec) ...here.
2015-10-07 Dodji Seketeli <dodji@redhat.com>
Bug 19023 - Type canonicalization is sensitive to struct-ness
* include/abg-ir.h (class_decl::is_struct): Declare a setter for the
"is-struct" property.
* src/abg-ir.cc (class_decl::is_struct): And define that setter
here.
(type_base::get_canonical_type_for): Temporarily set the
'is-struct' flag of the class type to 'false' before building its
pretty representation.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so:
New test input binary.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
New test reference output.
* tests/data/Makefile.am: Add the new test material above to the
source distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add the two new test
inputs to the list of test inputs to consider.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
2015-10-06 Dodji Seketeli <dodji@redhat.com>
Style adjustment in abg-corpus.cc
* src/abg-corpus.cc (corpus::exported_decls_builder::id_var_map_):
Renamed data member vars_map_ into this.
(corpus::exported_decls_builder::id_var_map): Renamed vars_map
into this.
(corpus::exported_decls_builder::var_id_is_in_id_var_map): Renamed
var_is_in_map into this.
(corpus::exported_decls_builder::{add_var_to_map,
add_var_to_exported, maybe_add_var_to_exported_vars}): Adjust.
2015-10-06 Dodji Seketeli <dodji@redhat.com>
Bug 19037 - Make ABI corpus support several functions with same symbol
* include/abg-corpus.h
(corpus::exported_decls_builder::str_{fn,var}_ptr_map_type):
Remove these typedefs from here as they only used internally in
abg-corpus.cc. So we move them there instead.
* src/abg-corpus.cc (str_fn_ptrs_map_type): New typedef.
(str_var_ptr_map_type): Moved the typedef that was in
corpus::exported_decls_builder here.
(corpus::exported_decls_builder::id_fns_map_): Rename the fns_
data member into this. Make it have a str_fn_ptrs_map_type as a
type.
(corpus::exported_decls_builder::id_fns_map): Renamed the
fns_map() accessor into this one.
(corpus::exported_decls_builder::{fn_id_is_in_id_fns_map,
fn_is_in_fns}): New member functions.
(corpus::exported_decls_builder::fn_is_in_id_fns_map): Rename
fn_is_in_map into this.
(corpus::exported_decls_builder::add_fn_to_id_fns_map): Rename
add_fn_to_map into this.
(corpus::exported_decls_builder::add_fn_to_exported): Adjust.
(corpus::exported_decls_builder::maybe_add_fn_to_exported_fns):
Adjust.
* src/abg-comparison.cc (function_decl_diff::report): Emit reports
about function name changes (for a given function ID) only if
there are sub-type changes to be reported for the function. In
that case, do not forget to emit the sub-type changes after the
name changes have been reported.
(corpus_diff::priv::ensure_lookup_tables_populated): Several
functions of the same ID can be removed or added from/to the
corpus.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so:
New test input binary.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
New test output reference.
* tests/data/Makefile.am: Add the new test materials to the source
distribution.
* tests/test-read-dwarf.cc (in_out_specs): Adjust to add the new
test inputs above.
2015-10-05 Ondrej Oprala <ooprala@redhat.com>
Do not imply private access when building a struct from ABIXML.
* src/abg-reader.cc (read_context): Abort if we run into an
unsupported access specifier.
(build_class_decl) Default to public access for the children
of a struct.
2015-10-05 Ondrej Oprala <ooprala@redhat.com>
Fix minor warnings when building documentation.
* manuals/abilint.rst: Fix the "Literal block expected" warning.
* manuals/abipkgdiff.rst: Fix the "Title underline too short" warning.
2015-10-05 Ondrej Oprala <ooprala@redhat.com>
Fix an "Unknown target name" error during make info.
* doc/manuals/libabigail-overview.rst: Fix the reference to
"ELF symbols".
2015-10-05 Ondrej Oprala <ooprala@redhat.com>
Fix a path in doc/Makefile.am
* doc/Makefile.am: Prefix the path for DOXY_WEBSITE_SRC_CFG and
DOXY_WEBSITE_BLD_{CFG,DIR} with "/doc" to protect it against make
clean.
2015-10-04 Dodji Seketeli <dodji@redhat.com>
Misc style cleanups
* src/abg-reader.cc (read_is_struct): Fix comment.
(build_type_decl): Use type_decl_sptr rather than
shared_ptr<type_decl>.
(build_type_decl): Use typedef_decl_sptr rather than
shared_ptr<typedef_decl>.
2015-10-04 Dodji Seketeli <dodji@redhat.com>
Use the ODR to speed up type canonicalization
* include/abg-fwd.h (class corpus): Forward-declare this.
(is_anonymous_type): Declare this new function.
* include/abg-ir.h (corpus_sptr, corpus_wptr): Declare these
typedefs here too.
(translation_unit::{g,s}et_corpus): Declare new member functions.
(type_or_decl_base::{g,s}et_corpus): Likewise.
* src/abg-ir.cc (translation_unit::priv::corpus): New data member.
(translation_unit::priv::priv): Initialize it.
(translation_unit::{g,s}et_corpus): Define new accessors.
(translation_unit::get_global_scope): Propagate the corpus of the
translation unit to its newly created global scope.
(translation_unit::bind_function_type_life_time): Propagate the
corpus of the translation_unit to the added function type.
(type_or_decl_base::priv::corpus_): Add new data member.
(type_or_decl_base::priv::priv): Initialize it.
(type_or_decl_base::{g,s}et_corpus): Define new accessors.
(scope_decl::{add,insert}_member_decl): Propagate the context's
corpus to the member added to the context.
(decl_base::priv::is_anonymous_): Add new data member.
(decl_base::priv::priv): Initialize it.
(decl_base::{s,g}et_is_anonymous): Define accessors.
(is_anonymous_type): Define a new test function.
(decl_base::set_name): Update the "is_anonymous" property.
(type_base::get_canonical_type_for): Implement the ODR-based
optimization to type canonicalization.
* src/abg-corpus.cc (corpus::add): When a translation unit is
added to a corpus, set the corpus of the translation unit.
* src/abg-dwarf-reader.cc (build_enum_type)
(build_class_type_and_add_to_ir): Set the "is_anonymous" flag on
anonymous enums and classes.
* src/abg-reader.cc (read_is_anonymous): Define new static
function.
(build_type_decl, build_enum_type, build_class_decl): Call the new
read_is_anonymous function and set the "is_anonymous" property on
the built type declaration.
* src/abg-writer.cc (write_is_anonymous): Define new static
function.
(write_type_decl, write_enum_type_decl, write_class_decl): Write
the "is_anonymous" property.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2015-10-04 Dodji Seketeli <dodji@redhat.com>
Late canonicalize all types that reference classes when reading DWARF
* include/abg-fwd.h (peel_array_type): Declare new function.
* src/abg-ir.cc (peel_array_type): Define it.
(peel_typedef_pointer_or_reference_type): Peel arrays too, to get
the type of its element.
* src/abg-dwarf-reader.cc (maybe_canonicalize_type): If a pointer,
reference, array or typedef references a class, then do
late-canonicalize this type.
2015-10-04 Dodji Seketeli <dodji@redhat.com>
Fix infinite loop in peel_typedef_pointer_or_reference_type
* src/abg-ir.cc (peel_typedef_pointer_or_reference_type): Make
sure the variable tested in the condition is the one updated by
the loop.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Try harder to hash_type_or_decl avoid the slow path
* src/abg-ir.cc (hash_type_or_decl): When a declaration-only
class has a definition, then use the canonical type of that
definition as a hash value. If the class no definition, only
then, use the slow patfh of computing the recursive progressive
hash value of the type.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Do not use recursive type hashing when writing out function types
* src/abg-writer.cc (typedef fn_shared_ptr_map): Remove.
(write_context::m_referenced_fntypes_map): Change the type of this
into type_ptr_map.
(write_context::{record_fntype_as_referenced,
fntype_is_referenced}): Use the pointer value of the canonical
type of the referenced type as key for the map.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Prevent build_function_type from not canonicalizing certain types
* src/abg-dwarf-reader.cc (build_function_type): Associate the
type being built with its DIE, before starting to build the
sub-types. The current type is then amended with the sub-types
that are built later.
(build_ir_node_from_die): In the case for DW_TAG_subroutine_type,
do not associate the type to the DIE here, as it's been done in
build_function_type.
* src/abg-ir.cc (function_type::set_parameters): Adjust the index
of the parameters being set to the function: they start at 1,
unless the first parameter is artificial, in which case its index
starts at zero. This is just like what is done when the function
type is constructed directly with the parameters passed as an
argument to the constructor.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Fix detection of changes in pointer diff in the comparison engine
* src/abg-comparison.cc (pointer_diff::has_changes): Just
comparing the underlying type might not be enough. Let's just
compare the pointer itself. Now that we have canonical types,
comparing the pointer itself is not slower.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Do not overly canonicalize types during typedef stripping
* src/abg-ir.cc (strip_typedef): Do not canonicalize the stripped
type if the input one is not canonicalized.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Cleanup some IR type comparison operators
* include/abg-ir.h (operator==): In the overloads for type_decl,
enum and class_decl, turn the shared_ptr parameter into a const
reference to the shared_ptr.
* src/abg-ir.cc (operator==): Do the same in the definitions.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
Add missing deep equality operator for pointer and reference types
* include/abg-ir.h (pointer_type_def::operator==): Add an overload
for pointer_type_def.
(reference_type_def::operator==) Add an overload for
reference_type_def.
(operator==): Add an overload for pointer_type_def_sptr and
reference_type_def_sptr.
* src/abg-ir.cc (pointer_type_def::operator==): Make the overload
for type_base& use the overload for decl_base&. Add a new
overload for pointer_type_def& and make is use the overload for
decl_base& too.
(operator==): Add free form overloads for pointer_type_def& and
reference_type_def&.
(reference_type_def::operator==): Add comments. Add an overload
for reference_type_def&.
2015-10-02 Dodji Seketeli <dodji@redhat.com>
constify is_class_type()
* include/abg-fwd.h (is_class_type): Take a pointer to const.
* src/abg-ir.cc (is_class_type): Adjust.
2015-10-01 Ondrej Oprala <ooprala@redhat.com>
Bug 19027 - ABI asymmetry with enums over INT_MAX
* src/abg-reader.cc (build_enum_type_decl): Use strtol
instead of atoi to parse the values and check for overflow.
* tests/data/Makefile.am: Add the new test material to the build
system.
* tests/data/test-read-dwarf/test17-pr19027.so: New test file.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/test-read-dwarf.cc: Adjust to launch the new test.
2015-10-01 Dodji Seketeli <dodji@redhat.com>
Encourage people to use autoreconf -i
* COMPILING: Mention autoreconf -i, rather than just autoreconf.
2015-09-23 Ondrej Oprala <ooprala@redhat.com>
Bug 17340 - Support pointers and references to functions
* include/abg-comparison.h (compute_diff_for_distinct_kinds): Take the
first two arguments of type const type_or_decl_base_sptr instead.
* include/abg-ir.h (translation_unit::get_function_types): Declare new
method.
(function_types): Declare new typedef.
* src/abg-comparison.cc (compute_diff_for_types): Take the first two
arguments of type const type_or_decl_base_sptr instead of a const
decl_base_sptr.
(try_to_diff): Likewise.
(try_to_diff<class_decl>): Likewise.
(try_to_diff_distinct_kinds): Likewise.
(compute_diff_for_distinct_kinds): Likewise. Also remove a variant
accepting arguments of type const type_base_sptr.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Skip
building a pointer if it points to the beginning of a vptr.
(build_pointer_type_def): Declare utype_decl of type
type_or_decl_base_sptr and adjust assignments to it accordingly.
(build_function_type): New function definition.
(build_function_decl): Call build_function_type instead of building
an ftype manually.
(build_ir_node_from_die): Amend case DW_TAG_subroutine_type with
appropriate calls to build a function type.
* src/abg-ir.cc (translation_unit::get_function_types): New method
definition.
({pointer,reference}_type_def::pointer_type_def): Expect that
pointed_to might not have an accompanying declaration and set a type's
name in this case as well.
({pointer,reference}_type_def::get_qualified_name): Generate a
qualified name even if the pointed-to type has no declaration.
* src/abg-reader.cc (build_function_type): New function definition.
(handle_element_node): Return a type_or_decl_base_sptr instead and
try calling handle_function_type in addition to others.
(handle_function_type): New function definition that calls
build_function_type.
(build_type): Try calling build_function_type as well.
* src/abg-writer.cc (fn_shared_ptr_map): Declare new typedef.
(write_context::{clear_referenced_fntypes_map,fntype_is_referenced,
record_fntype_as_referenced}): New member functions.
(write_translation_unit): Call the new clear_referenced_fntypes_map.
* tests/data/Makefile.am: Add the new test material to the build
system.
(write_translation_unit): Separately write function types that have
been recorded to emit by write_{pointer,reference}_type_def.
(write_{pointer,reference}_type_def): Record the type pointed to as
a type to be emitted if type == function type.
(write_function_type): Write the details of a function type in the
abixml format and unmark the type.
* tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt: New
test reference report.
* tests/data/test-diff-dwarf/test32-fnptr-changes-v{0,1}.cc: New test
source files.
* tests/data/test-diff-dwarf/test32-fnptr-changes-v{0,1}.o: New binary
test inputs.
* tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt: New
test reference report.
* tests/data/test-diff-dwarf/test33-fnref-changes-v{0,1}.cc: New test
source files.
* tests/data/test-diff-dwarf/test33-fnref-changes-v{0,1}.o: New binary
test inputs.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
Adjust.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-write/test27.xml: New test source file.
* tests/test-diff-dwarf.cc: Adjust to launch the new tests.
* tests/test-read-write.cc: Likewise.
2015-09-09 Ondrej Oprala <ooprala@redhat.com>
Generalize some dwarf-reader functions to generate and return instances of type_or_decl_base_stpr to be able to propagate types occurring without an accompanying declaration.
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Return
a type_or_decl_base_sptr instead.
(get_scope_for_die): Likewise.
(build_class_type_and_add_to_ir): Typecast the assignment from
build_ir_node_from_die properly.
(build_{qualified,reference,array,typedef}_type): Likewise.
(build_pointer_type_def): Likewise.
(build_{var,function}_decl): Likewise.
2015-09-29 Ondrej Oprala <ooprala@redhat.com>
Move a constructor declaration
* include/abg-ir.h (decl_base): Change the decl_base() declaration's
visibility to private.
2015-09-24 Dodji Seketeli <dodji@redhat.com>
Bug 18535 - abidiff reports false positive ABI difference for libstdc++
*non-static* data member; a static data member only is not enough to
make the class declaration become a definition.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): The
presence of a data member shouldn't make a declaration-only class
loose its declaration-only-ness; the presence of a enon-static*
data member should.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-4.8.3.so:
New binary test input.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-4.9.2.so:
Likewise.
* tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
New test reference output.
* tests/data/Makefile.am: Add the new test material to the build
system.
* tests/test-diff-filter.cc (in_out_specs): Add the new test
inputs to the set of inputs to consider.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Remove duplicated runtestreaddwarf test
* tests/Makefile.am: Remove one copy of the runtestreaddwarf test
that is present twice.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Add a missing function declaration
* include/abg-tools-utils.h (dir_name): Add missing function
declaration.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Remove some dead code in abilint
* tools/abilint.cc (options::bidiff): Remove.
(options::options): Adjust.
(display_usage): Remove usage string for --bidiff
(parse_command_line): Remove parsing of un-implemented option
--bidiff.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Add a new --abidiff option to abidw
* tools/abidw.cc (options::abidiff): New data member.
(options::options): Initialize it.
(display_usage): Add a usage string for the new --abidiff option.
(parse_command): Parse the new --abidiff options.
(main): Save the abi of the input elf in a temporary abixml file;
read it back and compare both.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-hash.cc (class_decl::hash::operator()): Use a temporary
variable to ease debugging.
* src/abg-reader.cc (read_context::is_wip_type): Make this
function const.
* src/abg-writer.cc (write_context): Move data members at the top.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Speed up type canonicalization by avoiding recursive hashing
* include/abg-ir.h (canonical_types_map_type): Adjust this typedef
to make it point to an unordered_map which the key is now a string
and the value is a vector of types.
(type_or_decl_base::{get_cached_hash_value, set_cached_hash_value,
cached_hash}): Remove these member functions and type.
(struct type_base::cached_hash): Remove.
* src/abg-ir.cc (struct type_or_decl_base::priv::hash_): Remove.
(type_or_decl_base::priv::priv): Adjust.
(type_or_decl_base::{g,s}et_cached_hash_value): Remove.
(type_base::get_canonical_type_for): For declaration-only classes,
look at their definition for the canonical_type. Do not use
recursive type hashing anymore. Rather, use the pretty
representation string, and hash that.
(class_decl::base_spec::get_hash): Do away with hash value caching
here.
(class_decl::operator==): For decl-only classes, look at their
definitions for canonical types.
(hash_type_or_decl): Adjust comment. Use the canonical type
pointer value for type hash. That's the fast path. Otherwise, if
not available, fall back to a slow path which is the recursive
type hash we were using before.
* src/abg-dwarf-reader.cc (maybe_canonicalize_type): Schedule all
classes and typedef to classes for late canonicalization.
* src/abg-hash.cc (type_base::dynamic_hash::operator()): There is
no hash value cashing anymore.
(type_base::cached_hash::operator()): Remove.
* src/abg-reader.cc (read_context::get_type): Slight style
adjustment.
(read_translation_unit_from_file)
(read_translation_unit_from_buffer): Do not forget to canonicalize
types when reading just one translation unit.
(build_type_tparameter, build_template_tparameter): Canonicalize
the type.
* src/abg-writer.cc (struct type_hasher): New hasher type.
(type_ptr_map): Use a deep pointer comparison equal operator
functor, and canonical types as type hash values.
(write_class_decl): Do not write size and alignment on decl-only
classes. Do not record decl-only classes as being emitted. Their
definition must be emitted before.
* tests/test-read-write.cc (main): Do not do abi testing on
translation units (as opposed to doing it on abi corpora) as that
code is not wet yet. We need to know how to diff namespaces.
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Update qualified name of a decl when it's added to its context
* include/abg-ir.h (decl_base::priv_): Make this be public, so
that the qualified name updater function can access it.
(class class_decl): Make set_member_is_static() a friend function.
* src/abg-ir.cc (class ::qualified_name_setter): New tree walking
type.
(decl_base::get_qualified_parent_name): Do not do any computation
here. Just return the pre-computed qualified parent name string.
(decl_base::get_qualified_name): Likewise, for qualified name.
(scope_decl::{add,insert}_member_decl): Update the qualified name of the
newly added member. Set the scope of the member here. It's not
going to be set elsewhere, from now on.
(add_decl_to_scope): Do not set the scope here anymore. Just call
scope_decl::add_member_decl and let it do the work.
(insert_decl_into_scope): Likewise, just call
scope_decl::insert_member_decl and let it do the work.
(class_decl::{add_data_member, add_member_function}): Do not
handle details of context setting at this point. Let
scope_decl::add_member_decl do it. Adjust the properties of the
context relation afterwards. In add_data_member, when a data
member changes its static-ness, move the data member into the
class_decl::priv::non_static_data_members_ or out of it, as
necessary.
(class_decl::insert_member_decl): By default, a data member is
considered static.
(set_member_is_static): Move this definition after the definitions
of class_decl, so that this function can see those. Also, when a
data member changes its static-ness, move the data member into the
class_decl::priv::non_static_data_members_ or out of it, as
necessary.
(class_decl::add_member_function_template): As we the
underlying function template decl to the context, do not do any
scope adding for it here.
(::qualified_name_setter::{do_update, visit_begin}): Define new
member functions.
(update_qualified_name): Define new static function.
* src/abg-reader.cc (build_class_decl): Make build_function_decl,
build_var_decl, build_function_tdecl and build_class_tdecl
automatically add the created decl to their context, and then
update the properties of the resulting member decl later, just
like what we do in the DWARF reader.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Add new test functions
* include/abg-fwd.h (is_function_decl, is_decl, is_namespace)
(is_scope_decl): Declare new function overloads.
* src/abg-ir.cc (is_function_decl, is_decl, is_namespace)
(is_scope_decl): Define them.
2015-09-21 Dodji Seketeli <dodji@redhat.com>
Constify some diff-utils functor operators
* include/abg-diff-utils.h (deep_ptr_eq_functor::operator()): Make
the overloads be const.
2015-09-16 Dodji Seketeli <dodji@redhat.com>
Support source_location_not_in and source_location_not_regexp suppressions
* include/abg-ini.h (enum property_value::value_kind): Add a
LIST_PROPERTY_VALUE kind.
(class {list_property_value, list_property}): Declare new types.
(is_list_property, is_list_property_value): Declare new functions.
* src/abg-ini.cc (struct list_property_value::priv): Define new
type.
(list_property_value::{list_property_value, get_content,
set_content, as_string}): Define new member functions.
(is_list_property_value): Define new function.
(struct list_property::priv): Define new type.
(list_property::{list_property, get_value, set_value,
handle_escape}): Define new member functions.
(is_list_property): Define new function.
(read_context::buf_): New data member.
(read_context::{peek, get, put_back, good, eof, read_string,
read_list_property_value}): New member functions.
(read_context::read_next_char): Use the new read_context::{get,
good, eof} member function, rather than using the input stream
directly.
(read_context::{skip_white_spaces, skip_comments,
skip_white_spaces_or_comments, read_property_name,
read_function_name, read_function_argument,
read_function_call_expr, read_property_value,
read_tuple_property_value, read_section_name, read_section}):
Adjust to use the new member functions of read_context rather than
using the input stream directly.
(read_context::read_string_property_value): Likewise. Use the new
read_context::read_string() method.
(read_context::{read, write}_property): Support reading list_property.
* include/abg-comparison.h
(type_suppression::{get_source_locations_to_keep,
set_source_locations_to_keep,
set_source_location_to_keep_regex_str,
get_source_location_to_keep_regex_str}): Add new member functions.
* src/abg-comparison.cc
(type_suppression::priv::{source_location_to_keep_,
source_location_to_keep_regex_str_,
source_location_to_keep_regex_}): Add new data members.
(type_suppression::priv::{g,s}et_source_location_to_keep_regex):
Define new member functions.
(type_suppression::{g,s}et_source_locations_to_keep): Define new
member functions.
(type_suppression::{g,s}et_source_location_to_keep_regex_str):
Likewise.
(type_suppression::suppresses_type): Support
"source_location_not_regexp" and "source_location_not_in"
properties of suppression specifications.
(read_type_suppression): Likewise. Also adjust to the fact that
ta tuple property value that is a list of strings is not a list
property value.
* doc/manuals/libabigail-concepts.rst: Add documentation for
source_location_not_in and source_location_not_regexp.
* tests/data/test-diff-suppr/libtest26-loc-suppr-v{0,1}.so: New
binary test inputs.
* tests/data/test-diff-suppr/test26-loc-suppr-{0,1,2}.suppr: New
suppression specification test inputs.
* tests/data/test-diff-suppr/test26-loc-suppr-report-{0,1,2,3}.txt:
New test reference reports.
* tests/data/test-diff-suppr/test26-loc-suppr-v{0,1}.cc: Source
code of the test binary input above.
* tests/data/test-diff-suppr/test26-loc-suppr.h: Likewise.
* tests/data/Makefile.am: Add the new test material to source
distribution.
* tests/test-diff-suppr.cc (in_out_specs): Add the new test inputs above.
2015-09-16 Dodji Seketeli <dodji@redhat.com>
Pass simple property data by reference
* include/abg-ini.h (simple_property::{simple_property,
set_value}): Pass the value shared pointer by reference.
* src/abg-ini.cc (simple_property::{simple_property, set_value):
Pass the value shared pointer by reference.
2015-09-15 Dodji Seketeli <dodji@redhat.com>
Make string_ends_with() allow long suffixes
* src/abg-tools-utils.cc (string_ends_with): Allow suffixes of the
same size as the input string.
2015-09-13 Dodji Seketeli <dodji@redhat.com>
Add missing 'break' keyword in e_machine_to_string()
* src/abg-dwarf-reader.cc (e_machine_to_string): Add missing
'break' keywords in switch/case statement.
2015-09-09 Dodji Seketeli <dodji@redhat.com>
Fix compilation warnings in abipkgdiff.cc
* tools/abipkgdiff.cc (package::erase_extraction_directory)
(extract_rpm, extract_deb, extract_tar)
(erase_created_temporary_directories_parent): Check the return
value of the system() function.
(extract_package): Add necessary white space.
2015-09-09 Dodji Seketeli <dodji@redhat.com>
Fix spurious errors in the install-man-and-info-doc target
* doc/manuals/Makefile.am (install-man-and-info-doc): Don't check
for abidiff.info, that thing doesn't exist. Rather, check for
abigail.info. Use gzip -f in case the zipped file exists already.
2015-09-09 Dodji Seketeli <dodji@redhat.com>
Compare qualified name in decl_base comparison operator
* src/abg-ir.cc (equals): In the overload for decl_base, compare
qualified names, not just names.
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
2015-09-08 Dodji Seketeli <dodji@redhat.com>
Fix a stupid typo in function sorting code
* src/abg-comparison.cc (function_comp::operator()): Fix a typo
preventing the proper sorting of function name when their
declarator names are equal. Oops.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
2015-09-08 Dodji Seketeli <dodji@redhat.com>
Update manual for abipkgdiff
* doc/manuals/abipkgdiff.rst: Say we support tarballs and plain
directories.
2015-09-07 Dodji Seketeli <dodji@redhat.com>
Adjust {s,g}et_show_stats() to use a reference
* include/abg-dwarf-reader.h ({s,g}et_show_stats): Use a reference
to the reader.
* tools/abidiff.cc (main): Adjust.
* tools/abidw.cc (main): Likewise.
2015-09-07 Dodji Seketeli <dodji@redhat.com>
Use cache type hash values only after type canonicalization is done
*when* we request that hash value. If we are computing the hash value
of struct list itself, then the temporary value of "struct list" is
zero. But then once we are done computing the hash value of "struct
list", that value becomes non-zero.
Hence, the hash value of a type depends on when that value is
computed.
But then if we want to cache that hash value and re-use it later,
which value should we cache? Definitely not the zero value!
So in other words, we can use (and thus cache) the hash value of a
given type T only after the hash values of all types which use T have
been computed.
To satisfy that condition, we decide to use the (cached) hash value of
each type only after we've computed all the hash values of all types
of the system.
So, during type canonicalization, when a type T is canonicalized, this
patch stores the hash value of T. But then it's only when all types
are canonicalized that the hashing code is allowed to re-use the
cached value of types.
This fixes the issues of spurious type differences introduced when the
same type was read either from DWARF or from abixml. Those
differences where introduced by differences in the order of hashing
types which sub-types refer to themselves. The patch also updates
regression tests accordingly.
* src/abg-dwarf-reader.cc (read_debug_info_into_corpus): Before we
read debug info and build the IR, set a flag in the environment
saying that type canonicalization isn't finished yet. But then,
after type canonicalization is done, flip that flag to say that
type canonicalization is done.
* src/abg-reader.cc (read_corpus_from_input): Likewise.
* src/abg-ir.cc (type_base::get_canonical_type_for): Once a type
has been canonicalized, cache its hash value.
* src/abg-hash.cc (type_base::dynamic_hash::operator()): If type
canonicalization has been done and if the type has a cached value,
use that one.
* tests/data/test-read-dwarf/test2.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2015-09-07 Dodji Seketeli <dodji@redhat.com>
Introduce the concept of environment
* include/abg-ir.h: Adjust note about memory management.
(class environment): Declare new class.
(translation_unit::translation_unit): Take an environment in
parameter.
(translation_unit::{g,s}et_environment): Declare new member
functions.
(type_or_decl_base::{g,s}et_environment): Likewise.
(type_or_decl_base::{get_cached_hash_value,
set_cached_hash_value}): Change the name of
decl_base::peek_hash_value() and decl_base::set_hash() here into
these and move them here.
(type_or_decl_base::hashing_started): Move
decl_base::hashing_started() here.
({g,s}et_environment_for_artifact): Declare new functions.
(class decl_base): Move member functions hashing_started(),
peek_hash_value() and set_hash() on to the type_or_decl_base base
class.
(scope_decl::scope_decl): Initialize the virtual member
type_or_decl_base().
(type_decl::{get_void_type_decl,
get_variadic_parameter_type_decl}): Remove these static member
functions. They are now non-static member functions of the new
environment type.
* src/abg-ir.cc (class environment_setter): New internal class.
(get_canonical_types_map): Remove. This now becomes a member
function of the environment type.
(class usage_watchdog): Remove.
(usage_watchdog_{s,w}ptr): Remove these typedefs.
(get_usage_watchdog_wptr, ref_usage_watchdog)
(maybe_cleanup_type_system_data): Remove these functions.
(translation_unit::priv::usage_watchdog_): Remove data member.
(translation_unit::priv::env_): New data member.
(translation_unit::priv::priv): Take an environment and initialize
the new env_ data member. Do not initialize the removed
usage_watchdog_.
(translation_unit::translation_unit): Take an environment
parameter.
(translation_unit::get_global_scope): Set the environment of a new
global scope.
(translation_unit::{g,s}et_environment): New accessors.
(translation_unit::bind_function_type_life_time): Set the
environment of the function type.
(struct environment::priv): New class.
(environment::{environment, ~environment, get_canonical_types_map,
get_variadic_parameter_type_decl, canonicalization_is_done}): New
member functions.
(struct type_or_decl_base::priv): New class.
(type_or_decl_base::{type_or_decl_base, hashing_started,
get_cached_hash_value, set_cached_hash_value, set_environment,
get_environment, traverse}): New member functions.
({s,g}get_environment_for_artifact): New functions.
(decl_base::priv::{hash_, hashing_started}): Remove.
(decl_base::priv::priv): Adjust.
(decl_base::decl_base): In the copy constructor, initialize the
virtual base type_or_decl_base. Do not initialize hash_ and
hashing_started data member that got removed.
(decl_base::{hashing_started, peek_hash_value, set_hash}): Remove
member functions.
(strip_typedef): Set the environment of the new type which has its
typedefs stripped off. Adjust the call to type_or_void().
(scope_decl::{add, insert}_member_decl): Set the environment of
the new member decl to the environment of its scope.
(synthesize_type_from_translation_unit)
(synthesize_function_type_from_translation_unit): Set the
environment for the newly synthesized type. Adjust calls to
type_or_void().
(type_or_void): Take an environment in parameter. Get the void
type from the environment.
(get_canonical_types_map): Remove.
(type_base::get_canonical_type_for): Get the canonical types map
from the environment, not from a global variable.
(type_decl::{get_void_type_decl,
get_variadic_parameter_type_decl}): Remove.
(pointer_type_def::pointer_type_def): Adjust call to type_or_void.
(reference_type_def::reference_type_def): Likewise.
(function_decl::parameter::get_pretty_representation): Get the
variadic parameter type decl from the environment.
(class_decl::priv::classes_being_compared_): Remove static data
member.
(class_decl::priv::{mark_as_being_compared,
unmark_as_being_compared, comparison_started): Use the "classes
being compared" map from the environment.
(class_decl::base_spec::get_hash): Adjust.
(keep_type_alive): Get the alive types array from the environment)
not from a global variable anymore.
(get_next_string): Put the counter in thread-local storage.
* src/abg-hash.cc (scope_decl::hash::operator())
(function_decl::hash::operator()): Do not handle caching (here).
* include/abg-corpus.h (corpus::{g,s}et_environment): Declare new
accessors.
* src/abg-corpus.cc (corpus::priv::env): New data member.
(corpus::priv::priv): Initialize it.
(corpus::corpus): Take an environment in parameter.
(corpus::{g,s}et_environment): Define new member functions
(corpus::add): Set the environment of the newly added translation
unit, if it's not set already set. In any case, assert that the
translation unit must use the same environment as the corpus.
* include/abg-dwarf-reader.h (create_read_context)
(read_corpus_from_elf): Take an environment parameter.
({s,g}et_debug_info_root_path, {s,g}et_environment): Declare new
functions.
* src/abg-dwarf-reader.cc (read_context::{env_,
offline_callbacks_}): New data members.
(read_context::read_context): Initialize them.
(read_context::clear_per_translation_unit_data): Do not touch the
void type declaration, it doesn't belong to the translation unit.
(read_context::{env, offline_callbacks}): New accessors.
(read_context::{create_default_dwfl}): New member function.
(read_context::dwfl_handle): Add a setter overload.
({s,g}et_debug_info_root_path): Define new accessors.
(create_default_dwfl, create_dwfl_sptr, create_default_dwfl_sptr):
Remove these.
(build_translation_unit_and_add_to_ir): Adjust to pass the
environment to the newly created translation unit.
(build_function_decl): Adjust to pass the environment to the
created function and parameter types. Get variadic parameter type
node from the current environment, not from a global variable.
And do not try to canonicalize function types here.
(read_debug_info_into_corpus): Set the environment of the newly
created corpus.
(build_ir_node_for_void_type): Get the void type node from the
current environment, rather than from a global variable.
(create_read_context): Take the environment in parameter.
Create the default dwarf front end library handle using the new
member function of the read context. Set the current environment
used by the reader.
(read_corpus_from_elf): Take an environment in
parameter. Overhaul. This is now simpler.
(has_alt_debug_info): Adjust the call to create_read_context() to
make it pass an empty environment.
* include/abg-fwd.h (class environment): Forward declare.
* include/abg-reader.h (read_translation_unit_from_file)
(read_translation_unit_from_buffer)
(read_translation_unit_from_istream)
(read_corpus_from_native_xml): Take an environment in parameter.
* src/abg-reader.cc (read_context::m_env): New data member.
(read_context::read_context): Initialize it.
(read_context::{get_environment, set_environment}): New data
member.
(read_translation_unit): Set environment of the new translation
unit.
(read_corpus_from_input): Set the environment of the new corpus.
(read_translation_unit_from_file)
(read_translation_unit_from_buffer)
(read_translation_unit_from_istream, read_corpus_from_native_xml):
Take an environment in parameter.
(build_function_parameter): Get variadic parameter type from the environment.
* src/abg-comparison.cc (compute_diff): Add asserts in all the
overloads to ensure that the artifact being compared come from the
same environment.
* tests/print-diff-tree.cc (main): Create an env for the ABI
artifacts to use.
* tests/test-abidiff.cc (main): Likewise.
* tests/test-diff-dwarf.cc (main): Likewise.
* tests/test-ir-walker.cc (main): Likewise.
* tests/test-read-dwarf.cc (main): Likewise.
* tests/test-read-write.cc (main): Likewise.
* tools/abicompat.cc (main): Likewise.
* tools/abidiff.cc (main): Likewise.
* tools/abidw.cc (main): Likewise.
* tools/abilint.cc (main): Likewise.
* tools/abipkgdiff.cc (main): Likewise.
2015-09-07 Dodji Seketeli <dodji@redhat.com>
Fix redundant const qualifier stripping
* include/abg-ir.h (operator&, operator~): Add overloaded bitwise
operators for qualified_type_def::CV.
* src/abg-ir.cc (operator&, operator~): Define them.
* src/abg-dwarf-reader.cc (maybe_strip_qualification): Fix
comment. If there are multiple qualifiers, only strip the const
one.
(build_ir_node_from_die): Once we've built a qualified type, if
the 'const' qualifier is stripped, then add the new (stripped)
type to the set of new types.
2015-09-05 Dodji Seketeli <dodji@redhat.com>
Fix wording in README
* README: Fix wording.
2015-09-02 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-hash.cc (class_decl::hash::operator()): Remove some dead
code.
* src/abg-ir.cc (equals): In the overload for class_decl,
re-indent.
2015-09-02 Dodji Seketeli <dodji@redhat.com>
Re-arrange some regression tests order
* tests/Makefile.am: Run runtestreaddwarf and
runtestcanonicalizetypes at the beginning.
2015-09-02 Dodji Seketeli <dodji@redhat.com>
Bug 18904 - Fix support for C++ rvalue references
* src/abg-comparison.cc (reference_diff::has_changes): Just
compare the references, rather than assuming that the change can
only be on underlying types.
(reference_diff::report): Describe lvalue/rvalue changes for
references.
* src/abg-ir.cc (reference_type_def::reference_type_def): Properly
set the name for an rvalue reference.
(equals): For references, compare lvalue-ness too.
(reference_type_def::get_qualified_name): Properly set rvalue
reference names.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-liba.so:
New test input.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-libb.so:
New test input.
* tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
New test reference output.
* tests/data/Makefile.am: Add the new files to source
distribution.
* tests/test-diff-filter.cc (in_out_specs): Run the new tests.
2015-09-02 Dodji Seketeli <dodji@redhat.com>
More type degradation fixes (from DWARF to abixml)
* include/abg-fwd.h (get_type_scope): Declare new function.
* src/abg-hash.cc (var_decl::hash::operator()): Do not cache the
hash because that can alter the hash computing of a larger type
which embeds a var decl as a member declaration. This is
especially true if the var decl indirectly references the larger
type. The only way to cache the value of a var decl would be to
wait after all canonical types have been computed. We'd then seal
all types. After that sealing happens, we can cache var decls
starting from the top-level ones.
(function_decl::hash::operator()): Likewise.
* src/abg-ir.cc (get_type_scope): Define new functions.
* src/abg-reader.cc (read_is_declaration_only): Declare this
function earlier.
(typedef const_types_map_it): Adjust this to make it point to a
map of string and vector of types, as opposed to a map to string
and type as it was before.
(typedef types_map_it): New typedef.
(read_context::map_id_and_node): Map a type id to the last
xmlNodePtr that represent a *declaration*. That gives more leeway
to the declaration resolution code to choose the right definition
later. Otherwise, there are cases where the wrong definition. By
wrong definition, I mean a definition that is different from the
one chosen by the DWARF reading code, for a given declaration.
Basically for a given ABI corpus, a type declaration resolve to
the first definition seen in the corpus.
(read_context::get_all_type_decls): Define new member function.
(read_context::types_equal): Use qualified names only if both
types have a scope.
(read_context::key_type_decl): Now a given ID is associated to
*all* the declarations and definition that have that ID.
(read_translation_unit_from_input): Make sure the current corpus
node points to the right node.
(build_class_decl): Resolve class declarations to the first
definition seen in the corpus. Key a type decl before reading its
members as a reading a member can request the current decl. No
need to try and canonicalize a member type, as build_class_decl()
does that already.
* tests/data/test-read-dwarf/test16-pr18904.so: New test binary
input.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: New test
output reference.
* tests/test-read-dwarf.cc: Run the test above.
* tests/data/Makefile.am: Add the new test input to source
distribution.
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
2015-08-30 Dodji Seketeli <dodji@redhat.com>
Bug 18892 - type degradation from DWARF to abixml on libtsan.so
* src/abg-reader.cc (read_context::maybe_canonicalize_type): Late
canonicalize enum types.
(build_enum_type_decl): Read the linkage name of the enum type.
* src/abg-writer.cc (write_enum_type_decl): Emit the linkage name
of the enum type.
* tests/data/test-read-dwarf/test15-pr18892.so: New binary test
input.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: New test
output reference.
* tests/data/Makefile.am: Add the new test inputs above to source
distribution.
* tests/test-read-dwarf.cc (in_out_specs): Run the two tests above.
2015-08-30 Dodji Seketeli <dodji@redhat.com>
Bug 18893 - type degradation from dwarf to abixml on libGLU.so
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
consider that virtual member functions disqualify a class from
being declaration-only.
* src/abg-hash.cc (var_decl::hash::operator()): Do not cache the
result of hashing before we are done building the type of the
var_decl.
(function_decl::hash::operator()): Likewise, do not cache the
result of hashing before we are done building the type of the
function_decl.
* src/abg-reader.cc (build_class_decl): Build the link between a
class declaration and its definition. If there are several
definitions of a class in the corpus, keep just one.
* src/abg-writer.cc (write_class_is_declaration_only): Emit the
link between a class declaration and its definition.
(write_class_decl): Emit a class declaration even if it has a
definition. The definition is going to be emitted
separately.
* tests/data/test-read-dwarf/test14-pr18893.so: New binary test
input.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: New test
reference output.
* tests/data/Makefile.am: Add the new test input files to source
distribution.
* tests/test-read-dwarf.cc (in_out_specs): Run the new tests.
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
2015-08-30 Dodji Seketeli <dodji@redhat.com>
Use common canonicalization oracle when reading class type from dwarf
* src/abg-dwarf-reader.cc (build_ir_node_from_die):
(maybe_canonicalize_type): Move the specific logic that was in
build_ir_node_from_die (for class types) here.
2015-08-30 Dodji Seketeli <dodji@redhat.com>
Fix crash in file type guessing
* src/abg-tools-utils.cc (string_ends_with): Handle the case where
the string suffix is longer than the string itself.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Bug 18894 - Fix representation of enumerators in abixml format
* include/abg-ir.h (enum_type_decl::enumerator::get_value()):
Change the type of this from size_t to ssize_t.
* src/abg-ir.cc (enum_type_decl::enumerator::get_value): Do the
same on the definition side.
(non_canonicalized_subtype_detector::visit_begin): If a type
refers to itself, late canonicalize it to have a similar hashing
result as what the abixml reader does.
* src/abg-reader.cc (build_enum_type_decl): Use ssize_t to read
the value of enumerators.
* tests/data/test-read-dwarf/test13-pr18894.so.abi: New test input.
* tests/data/Makefile.am: Add the new test inputs above to source
distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add new test inputs.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Detect vtable changes from member function changes
* include/abg-ir.h (class_decl::{has_virtual_base, has_vtable}):
Declare new member functions.
* src/abg-comp-filter.cc (has_virtual_mem_fn_change): New overload
for function_decl_diff.
(has_virtual_mem_fn_change): In the overload for diff*, support
virtual member function changes detection for function_decl_diff*.
* src/abg-comparison.cc (function_decl_diff::report): Detect and
report changes to a vtable by looking a changes that can happen to
a given member function.
(corpus_diff::report): Detect and report changes to vtables by
looking at changes change to member functions.
* tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt:
New text input.
* tests/data/test-diff-dwarf/test29-vtable-changes-v{0,1}.cc: Source
code of new test input binaries.
* tests/data/test-diff-dwarf/test29-vtable-changes-v{0,1}.o: New
test input binaries.
* tests/data/test-diff-dwarf/test30-vtable-changes-report-0.txt:
New text input.
* tests/data/test-diff-dwarf/test30-vtable-changes-v{0,1}.cc: New
test input.
* tests/data/test-diff-dwarf/test30-vtable-changes-v{0,1}.o: New
test input binaries.
* tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt:
New test input.
* tests/data/test-diff-dwarf/test31-vtable-changes-v{0,1}.cc:
Source code of new test input binary.
* tests/data/test-diff-dwarf/test31-vtable-changes-v{0,1}.o: New
test input binary.
* tests/data/Makefile.am: Add the new test input files above to
source distribution.
* tests/test-diff-dwarf.cc (in_out_specs): Consume the new test
inputs above.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Do not hash or compare virtual member functions as par of classes
* src/abg-ir.cc (equals): When comparing two classes, do not
compare their virtual member functions.
* src/abg-hash.cc (class_decl::hash::operator()): Do not hash
virtual member functions when hashing a class.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-ir.cc (qualified_type_def::get_qualified_name): Fix
typos in comments.
(class_decl::member_class_template::operator==): Add comments.
(operator==): Add comment for the overload of
class_decl::member_class_template_sptr.
(function_tdecl::operator==): Add comments.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Adjust many reference output for the non-regression test suite
* tests/data/test-abidiff/test-enum0-report.txt: Adjust.
* tests/data/test-abidiff/test-enum1-report.txt: Adjust.
* tests/data/test-abidiff/test-qual-type0-report.txt: Adjust.
* tests/data/test-abidiff/test-struct0-report.txt: Adjust.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-write/test17.xml: Adjust.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Make test-read-dwarf.cc and test-read-write.cc abidiff the ABIs
* tests/test-read-dwarf.cc (main): Use abidiff to compare the
input elf file with the XML emitted. That should yield the empty
set.
* tests/test-read-write.cc (main): Likewise, use abidiff to
compare the input abixml file with the one that is emitted.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Add a new --noout option to abidw
* tools/abidw.cc (options::noout): New data member.
(options::options): Initialize it.
(display_usage): Add a usage string for the new option.
(parse_command_line): Parse the new option.
(main): If --noout is provided, do not emit the XML form.
* doc/manuals/abidw.rst: Document the new option.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Add a --no-architecture option to abidiff
* tools/abidiff.cc (options::no_arch): New data member.
(options::options): Initialize it.
(display_usage): Display a help string for the new options.
(parse_command_line): Parse the new options.
(main): If --no-architecture is provided, set the corpus
architecture to "".
* doc/manuals/abidiff.rst: Document the new options.
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Read abixml as a whole file and fix lots discrepancies with dwarf
* src/abg-reader.cc (class read_context): Move data member at
the top of the class like what is done elsewhere in the code
base.
(read_context::m_corp_node): New data member.
(read_context::read_context): Initialize it.
(read_context::{get,set}_corpus_node): New accessors.
(read_context::map_id_and_node): Accept that a node id previously
defined is defined again. In that case we just remember the first
mapping id -> xml-node. That seems to work for now.
(read_context::get_translation_unit): Fix the logic.
(read_context::m_wip_types_map): Rename
read_context::m_wip_classes_map into this.
(read_context::clear_wip_types_map): Rename
read_context::clear_wip_classes into this.
(read_context::mark_type_as_wip): Rename
read_context::mark_class_as_wip into this.
(read_context::unmark_type_as_wip): Rename
read_context::unmark_type_as_wip into this.
(read_context::is_wip_type): Rename read_context::is_wip_class
into this.
(read_context::types_equal): New member function.
(read_context::clear_per_translation_unit_data): Do not clear
anything anymore as the previous data that were per-tu are now
per-corpus.
(read_context::clear_per_corpus_data): Clear here the previous
data that were per-tu.
(read_context::maybe_canonicalize_type): Add a new force_delay
flag that forces the type to be late-canonicalized. Also force
late-canonicalize references, pointers, qualified-type and typedef
because they must be canonicalized once they've been added to
their context; but then this function might be called too early,
before they are added to their context.
(read_context::type_id_new_in_translation_unit): Remove this
member function.
(read_translation_unit_from_input): Be able to either use the
xmlTextReader interface, or get the current 'abi-instr' xml
element node. If using the xmlTextReader interface, use it to
move to the 'abi-instr' node, expand it and then use that. In
either case, call read_translation_unit() with the 'abi-instr' xml
element node.
(read_translation_unit): Take an 'abi-instr' XML element in
argument now, use that to read the translation unit, as opposed to
using the xmlTextReader interface we where using before to walk
the sub-tree of the abi-instr xml node.
(read_context::get_scope_for_node): If the scope is a new
translation unit, then build the new translation unit.
(read_symbol_db_from_input): Take the function and variable symbol
data bases, and read the current xml element node (do not use the
xmlTextReader interface anymore) to populate the function and
variable symbols.
(read_elf_needed_from_input): Do not use the xmlTextReader
interface anymore. Rather, use the current xml element node, look
for the 'elf-needed' xml element node and use it to populate the
set of elf dependencies.
(read_corpus_from_input): Rework to expand the contents of the
corpus node and use the result, rather than just exclusively
relying on the xmlTextReader interface.
(build_function_parameter): Build a proper IR node for variadic
parameters. Build function type node *after* having built all the
parameters IR, so that parameter indexing is the same as what is
done in the DWARF reader. Also, if the function is not being
added to its context yet, then delay the canonicalizing of its
type, just like what is done by the DWARF reader.
(build_qualified_type_decl, build_pointer_type_def)
(build_reference_type_def, build_enum_type_decl, build_type_decl):
Adjust. Do not enforce anymore that the ID of this type be new in
the current TU. Delay canonicalizing if the type is not being
added to its context. For typedefs, use an adapted way of
checking the consistency of the underlying type.
(build_array_type_def): Do not enforce anymore that the ID of this
type be new in the current TU. Support the fact that the array
might not have any DW_AT_byte_size attribute. Force late
canonicalizing if the array is not being added to its context.
(build_class_decl): Adjust. Reuse the
read_context::maybe_canonicalize_type() function rather than
trying to determine locally when to canonicalize.
(build_template_tparameter): Adjust
2015-08-29 Dodji Seketeli <dodji@redhat.com>
Fix handling of class declaration during DWARF reading
*virtual* member functions, data members, base classes or a
DW_AT_byte_size as being conditions for being defined.
* src/abg-dwarf-reader.cc (read_context::decl_only_classes_map_):
Remove this data member.
(read_context::{declaration_only_classes_to_force_defined,
schedule_declaration_only_class_for_forced_resolution}): Remove
these member functions.
(read_context::resolve_declaration_only_classes): Do not force
resolution of class declaration.
(build_class_type_and_add_to_ir): Do not schedule classes for
forced-resolution when they are used as base classes. The
presence of a member function is not enough to make the class be
defined. It needs to be a virtual member function.
2015-08-28 Dodji Seketeli <dodji@redhat.com>
Fix important hashing issues
* src/abg-hash.cc (class_decl::hash::operator()): Do not force
base classes to have definitions anymore. GCC and Clang (at
least) some time emits debug info in which the definition of some
base classes are missing, especially when those base classes have
vtables. In that case, the definition of the class might it's in
the binary where the vtable is emitted, which might not be the
binary we are looking at. So let's relax the assertion we had
here for base classes. For hashing virtual member functions,
directly walk the virtual member functions by looking at
class_decl::get_virtual_mem_fns() rather than walking all
member functions and looking for the virtual ones. This is a
speed optimization but it also helps during debugging.
2015-08-28 Dodji Seketeli <dodji@redhat.com>
Fix template comparison operators
* include/abg-ir.h (function_tdecl::operator==): Introduce a new
virtual member operator that takes a function_tdecl&.
* src/abg-ir.cc
(class_decl::member_function_template::operator==): Avoid the
static cast in the overload for member_base. In the overload for
member_class_template, avoid infinite recursion.
(function_tdecl::operator==): In the overload for decl_base, do
not do the real work here in the overload for decl_base Rather,
the real work is done in the new overload for function_tdecl, and
all other overloads call that one.
2015-08-28 Dodji Seketeli <dodji@redhat.com>
Use size/alignment of class definition when requested on declaration
* include/abg-ir.h (type_base::{set_size_in_bits,
set_alignment_in_bits}): Make these member functions virtual.
(class_decl::{set_size_in_bits, get_size_in_bits,
get_alignment_in_bits, set_alignment_in_bits}): Declare these
virtual member functions.
* src/abg-ir.cc (class_decl::{set_size_in_bits, get_size_in_bits,
get_alignment_in_bits, set_alignment_in_bits}): Define these
virtual functions.
2015-08-28 Dodji Seketeli <dodji@redhat.com>
Fix type lookup algorithm
* src/abg-ir.cc (find_next_delim_in_cplus_type): Define new static
function.
(fqn_to_components): Use the new function above to break up a
fully qualified name into components, rather than the too simple
string::find_first_of() we were using previously.
(lookup_node_in_scope): If the found type (class) is a
declaration-only and if it has a definition, then return it.
2015-08-26 Dodji Seketeli <dodji@redhat.com>
Make decl hashing always take qualified name into account
* src/abg-hash.cc (decl_base::hash::operator()(const decl_base&)):
Always hash the qualified name of the decl.
2015-08-26 Dodji Seketeli <dodji@redhat.com>
Accept base classes which types are compatible with class type
* include/abg-fwd.h (is_compatible_with_class_type): Declare a new
overload.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Rather
than requiring that base classes be of class type, just require
that they be compatible with class types.
* src/abg-ir.cc (is_compatible_with_class_type): Define a new
overload.
2015-08-26 Dodji Seketeli <dodji@redhat.com>
Harden function_decl::get_pretty_representation()
* src/abg-ir.cc (function_decl::get_pretty_representation): Make
sure the function type is a member function before calling
get_member_function_is_{virtual,ctor,dtor,const}.
2015-08-25 Dodji Seketeli <dodji@redhat.com>
Don't cache type qualified name before canonicalization
* src/abg-ir.cc (decl_base::{get_qualified_parent_name,
get_qualified_name}): Use the qualified name cache only if the
type is fully built, i.e, when its canonical type is present.
(qualified_type_def::get_qualified_name): Likewise.
(pointer_type_def::get_qualified_name): Likewise.
(reference_type_def::get_qualified_name): Likewise.
(array_type_def::get_qualified_name): Likewise.
2015-08-22 Dodji Seketeli <dodji@redhat.com>
Misc style cleanups
* configure.ac: Fix some spelling typos.
* src/abg-tools-utils.cc (guess_file_type): Fix indentation.
* tests/test-diff-pkg.cc (int_out_specs): Add some vertical spaces
for better legibility.
* tools/abidiff.cc (main): Add a missing space.
* tools/abipkgdiff.cc (extract_deb): Fix a typo in the comment.
2015-08-22 Dodji Seketeli <dodji@redhat.com>
Make abipkgdiff compare tar archives containing binaries
* config.h.in (WITH_TAR): New configuration preprocessor macro.
* configure.ac: Add a new --enable-tar option. It's turned on
automatically if the tar program is found in the PATH. Adjust the
build configuration report to add the tar archive support.
* include/abg-tools-utils.h (string_ends_with): Declare new
function.
(enum file_type): Add a new FILE_TYPE_TAR enumerator.
* src/abg-tools-utils.cc (string_ends_with): Define new function.
(operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
enumerator.
(guess_file_type): Detect UStar format file by reading its magic
number. Detect compressed tar files based on the file path
extension.
* tools/abipkgdiff.cc (extract_tar): Define new function.
(extract_package): Handle tar packages.
(main): Handle tar archives.
* tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
enumerator.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
test input tarballs.
* tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
reference.
* tests/data/Makefile.am: Add the new test data file above to
source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
2015-08-22 Dodji Seketeli <dodji@redhat.com>
Misc style fixes in abipkgdiff
* include/abg-tools-utils.h (enum file_type): Fix the comment for
for the FILE_TYPE_DEB enumerator.
* tools/abipkgdiff.cc (main): Fix the style of the conditions.
Also, fix the text emitted.
2015-08-22 Dodji Seketeli <dodji@redhat.com>
Make abipkgdiff compare directories containing binaries
* include/abg-tools-utils.h (enum file_type): Add a new
FILE_TYPE_DIR enumerator.
* src/abg-tools-utils.cc (operator<<(ostream&, file_type)):
Support serialization of the new FILE_TYPE_DIR enumerator.
(guess_file_type): Detect that the path given is a directory.
* tools/abipkgdiff.cc (package::package): If the package is a
directory, then set its extracted directory path to the path of
the directory.
(package::erase_extraction_directory): Do not erase the extraction
directory if the package is a directory provided by the user.
(extract_package): If the package is a directory provided by the
user, then there is nothing to extract.
(main): If the first package is a directory, then the second one
should be a directory as well.
* tools/abidiff.cc (main): Support directories as input.
* tools/abilint.cc (main): Likewise.
* tests/data/test-diff-pkg/dirpkg-0-dir{1,2}/libobj-v0.so: New
binary test inputs.
* test/data/test-diff-pkg/dirpkg-0-report-0.txt: New input test
file.
* tests/data/test-diff-pkg/dirpkg-1-dir{1,2}/obj-v0.cc: Source
code of the binary test inputs above.
* tests/data/Makefile.am: Add the new files above to the source
distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add the new test input
files above to the set of tests this harness has to run over.
2015-08-22 Dodji Seketeli <dodji@redhat.com>
[dwarf reader] Support reference types without explicit DW_AT_byte_size
* src/abg-dwarf-reader.cc (build_reference_type): If the type DIE
has no DW_AT_byte_size, assume the type size is the translation
unit's address size.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
2015-08-21 Dodji Seketeli <dodji@redhat.com>
[dwarf reader] Support pointer types without explicit DW_AT_byte_size
* abg-dwarf-reader.cc (build_pointer_type_def): If the type DIE
has no DW_AT_byte_size, assume the type size is the translation
unit's address size.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
2015-08-21 Dodji Seketeli <dodji@redhat.com>
make abipkgdiff compile with GCC 4.4.7
* tools/abipkgdiff.cc (package::extracted_packages_parent_dir):
The string holding the dir name is no more __thread, as this won't
compile with GCC 4.4.7
2015-08-21 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-dwarf-reader.cc (read_context::die_type_map): Fix typo
in the comment.
* src/abg-ir.cc (peel_typedef_type): Fix typo in the comment.
* src/abg-reader.cc
(read_context::perform_late_type_canonicalizing): Fix a type in
the comment.
2015-08-21 Dodji Seketeli <dodji@redhat.com>
Make get_pretty_representation work on method types
* include/abg-fwd.h (is_method_type): Declare new overloads for
naked pointers.
(get_method_type_name): Declare new functions.
(get_pretty_representation): Declare new overloads for
method_type.
* src/abg-ir.cc (get_function_type_name): If the function type is
a method type, handle it as such.
(get_method_type_name): Define new functions.
(get_pretty_representation): If the function type is a method
type, handle it as such.
(get_pretty_representation): Define new overloads for method_type
and pointer/reference to method_type.
(is_method_type): Add overloads for naked pointers.
2015-08-21 Dodji Seketeli <dodji@redhat.com>
Hash a class declaration the same as its definition
* src/abg-hash.cc (class_decl::hash::operator()(const class_decl&)):
If the class declaration has a definition, hash its definition
instead. Otherwise, if the class declaration has no definition,
just return a zero hash, like what we were doing before.
* src/abg-reader.cc (read_context::maybe_canonicalize_type): Do
not early canonicalize method types because most of the time, when
this function is called, the method hasn't been added to its
parent class yet. So wait until late before canonicalizing.
* src/abg-writer.cc (write_class_is_declaration_only): Do not emit
the "is-declaration-only" property if the declaration has a
definition.
(write_class_decl): If the class declaration has a definition,
emit the definition instead.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-write/test18.xml: Likewise.
* tests/data/test-read-write/test20.xml: Likewise.
* tests/data/test-read-write/test21.xml: Likewise.
2015-08-20 Dodji Seketeli <dodji@redhat.com>
Add a --stats to abidiff and abidw
* include/abg-dwarf-reader.h (get_show_stats)
(set_show_stats): New accessors for a new "show_stats" property of
the dwarf reader context.
* src/abg-dwarf-reader.cc: Include iostream to use std::cerr.
(dwarf_reader::show_stats_): New data member.
(dwarf_reader::dwarf_reader): Initialize it.
(dwarf_reader::show_stats)
(get_show_stats)
(set_show_stats): Define new accessors.
(dwarf_reader::die_type_map): Add const overload to this accessor.
(dwarf_reader::lookup_type_from_die_offset): Make this accessor
const.
(dwarf_reader::add_late_canonicalized_types_stats): New member
function.
(dwarf_reader::perform_late_type_canonicalizing): Emit the
statistics about late-canonicalized types if the user asked for
it.
* tools/abidiff.cc (options::show_stats): New data member.
(options::options): Initialize it.
(display_usage): Document it.
(parse_command_line): Parse the new --stats option.
(main): Create a dwarf reader context, set the show_stats to it
and then use that context to read the corpora before diffing them.
* tools/abidw.cc (options::show_stats): New data member.
(options::options): Initialize it.
(display_usage): Document it.
(parse_command_line): Parse the new --stats option.
(main): Set the show_stats to the dwarf reader context before
using it.
* doc/manuals/abidiff.rst: Update the manual.
* doc/manuals/abidw.rst: Update the manual.
2015-08-19 Dodji Seketeli <dodji@redhat.com>
Canonicalize all types that got scheduled for late canonicalization
* src/abg-dwarf-reader.cc
(read_context::canonicalize_types_scheduled): Canonicalize all
types scheduled for late canonicalization.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
2015-08-19 Dodji Seketeli <dodji@redhat.com>
Propagate canonical type of a class definition to its declaration
* src/abg-ir.cc: (canonicalize): Propagate the canonical type of
the type definition to its declaration.
(class_decl::set_definition_of_declaration): Likewise.
2015-08-19 Dodji Seketeli <dodji@redhat.com>
Make type_has_non_canonicalized_subtype() tighter
* include/abg-fwd.h (is_typedef, is_pointer_type)
(is_reference_type): Declare new overloads.
(peel_typedef_type): Renamed get_typedef_underlying_type into
this.
(peel_pointer_type, peel_reference_type)
(peel_typedef_pointer_or_reference_type): Declare new functions.
* src/abg-ir.cc (peel_typedef_type): Renamed
get_typedef_underlying_type into this.
(is_typedef, is_pointer_type, is_reference_type): Define new
overloads.
(peel_pointer_type, peel_reference_type)
(peel_typedef_pointer_or_reference_type): Define new functions.
(non_canonicalized_subtype_detector::has_non_canonical_type_):
Make the type of this data member be a type_base*, not a bool.
This is so that we can return the first non-canonicalized subtype
of the type we are looking at.
(non_canonicalized_subtype_detector::non_canonicalized_subtype_detector):
Adjust the data member initialization.
(non_canonicalized_subtype_detector::visit_begin): Add an overload
for function_decl*, to avoid looking into non-virtual member
functions.
In the overload for type_base*, peel typedefs, pointers and
reference of each sub-type that has no canonical type, to see if
refers to the type we are actually walking. If yes, then keep
going.
(type_has_non_canonicalized_subtype): Return the non-canonicalized
sub-type found.
* src/abg-comparison.cc (type_suppression::suppresses_diff):
Adjust for the get_typedef_underlying_type -> peel_typedef_type
renaming.
2015-08-19 Dodji Seketeli <dodji@redhat.com>
Make decl_base::get_qualified_name() work when decl context changes
* include/abg-ir.h (class decl_base): Make class scope_decl a
friend of decl_base.
(type_base::priv_): Make this protected, rather than private.
* src/abg-ir.cc (scope_decl::add_member_decl)
(scope_decl::insert_member_decl): Reset the cache of the result of
decl_base::get_qualified_name().
* tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
2015-08-18 Dodji Seketeli <dodji@redhat.com>
Bug 18844 - assert failure in abidw at abg-dwarf-reader.cc:6537
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Schedule declaration-only class resolution before the class
appears as usable as to other types being built.
* tests/data/test-read-dwarf/test12-pr18844.so: Add a new binary
test input.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: The reference
ABI XML output for the binary above.
* tests/data/Makefile.am: Add the new test inputs above to the
source distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add the new test inputs
above to the set of input this test harness has to run over.
2015-08-18 Dodji Seketeli <dodji@redhat.com>
Fix a little glitch in the test suite
* test-read-dwarf.cc (in_out_specs): Emit the output of the test11
to output/test-read-dwarf/test11-pr18828.so.abi, not
output/test-read-dwarf/test10-pr18828.so.abi.
2015-08-18 Dodji Seketeli <dodji@redhat.com>
Escape XML property names that were not escaped before
* src/abg-writer.cc (write_namespace_decl, write_typedef_decl)
(write_var_decl): Escape the XML characters that are forbidden in
XML properties, and that are emitted as value of the 'name'
property.
2015-08-15 Dodji Seketeli <dodji@redhat.com>
Bug 18828 - Handle force-resolving of multiple declarations-only of the same type
* src/abg-dwarf-reader.cc
(read_context::resolve_declaration_only_classes): Accept that a
class that needs to be force-resolved might have been declared
several times. In that case, some instances of that
declaration-only class might have already been resolved (or
completed).
* tests/data/test-read-dwarf/test11-pr18828.so: New binary input.
It comes from bug https://sourceware.org/bugzilla/show_bug.cgi?id=18828.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: The reference
output for the binary above.
* tests/data/Makefile.am: Add the test input files above to source
distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add the test inputs
above to the set of input this test harness has to run over.
2015-08-15 Dodji Seketeli <dodji@redhat.com>
Avoid declaring a type several times in the same TU in the XML format
* src/abg-writer.cc (write_context::{record_type_id_as_emitted,
record_type_as_emitted, type_id_is_emitted, type_is_emitted,
clear_emitted_types_map}): New member functions.
(write_context::m_emitted_type_id_map): New data member.
(write_translation_unit): Clear the per-translation unit map of
emitted types. Do not emit a type that has already been emitted
in this translation unit.
(write_namespace_decl): Do not emit a type that has already been
emitted in this translation unit.
(write_type_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_array_type_def, write_typedef_decl, write_class_decl)
(write_type_tparameter, write_template_tparameter): Record the
type we've just written as having been written out.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust as
duplicated declarations got removed.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Misc style fixes in the XMLABI writer
* src/abg-writer.cc (write_context): Align data members.
(write_translation_unit): Remove useless horizontal white spaces.
(write_decl, write_qualified_type_def, write_pointer_type_def)
(write_reference_type_def, write_array_type_def)
(write_enum_type_decl, write_typedef_decl, write_class_decl)
(write_type_tparameter): Use the *_sptr typedefs rather than the
longer form of shared_ptr<sometype> in function signatures.
(write_enum_type_decl): In this function in particular, indent a
line properly.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Fix typos in abipkgdiff
* tools/abipkgdiff.cc (display_usage): s/pompare/compare. Give a
better help message for --help.
(extract_rpm): Insert a space after the path of the package being
extracted, when emitting a verbose message.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Install the manpage for abipkgdiff
* doc/manuals/Makefile.am (section1_manpages): Add abipkgdiff.1 to
the set of manpages to be install into section 1.
2015-08-12 Dodji Seketeli <dodji@redhat.com>
Bug 18818 - abidw aborts on a class with a non-complete base class
* src/abg-dwarf-reader.cc
(read_context::decl_only_classes_to_force_defined_map_): New data
member.
(read_context::declaration_only_classes_to_force_defined): New
accessors.
(read_context::schedule_declaration_only_class_for_forced_resolution):
New member function.
(build_class_type_and_add_to_ir): If a base class is a
declaration-only class then mark it as needing to be force-defined
*if* it's still not defined at the end of the abi corpus loading.
(read_context::resolve_declaration_only_classes): If
declaration-only classes that need to force-defined are present
and not defined (when we reach the end of the ABI corpus) then
force-define them as empty classes.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so: New test
binary input file. This comes from a user binary submitted to bug
https://sourceware.org/bugzilla/show_bug.cgi?id=18818. The
original URL to the binary is
https://sourceware.org/bugzilla/attachment.cgi?id=8518.
* tests/data/test-read-dwarf/test9-pr18818-clang.so: New binary
input file. This comes from the same bug report as above. The
original URL to the binary is
https://sourceware.org/bugzilla/attachment.cgi?id=8511.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: New
reference output file.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/Makefile.am: Add the new files above to the source
distribution.
* tests/test-read-dwarf.cc (in_out_specs): Add the test inputs
above the set of tests input this harness has to run over.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Update the abipkgdiff manual to say that .deb files are now supported
* doc/manuals/abipkgdiff.rst: Say that .deb fiel are now supported
by abipkgdiff.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Update comment about the supported formats in abipkgdiff
* tools/abipkgdiff.cc: Now that .deb packages are supported, say
it.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Make the support of RPM and DEB package formats conditional
* config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
* configure.ac: Add --enable-{rpm,deb} switches. Check for
rpm2cpio and cpio programs, unless --disable-rpm was provided. If
they are found and if --enable-rpm=auto was provided, then
consider that --enable-rpm=yes was provided. In that case, set
the WITH_RPM macro to 1. Otherwise, undefine that macro.
Similarly, check for dpkg unless --disable-deb was provided. If
it's found and if --enable-deb=auto was provided, consider that
--enable-deb=yes was provided. In that case, set the WITH_DEB
macro to 1. Otherwise, undefine that macro. Define the
ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
rpm resp. deb support is enabled. Emit a notice about the rpm and
deb features being enabled or not, at the end of the configure
process.
* tests/test-diff-pkg.cc: Include the config.h header.
(in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
guard deb tests by the WITH_DEB macro.
* tools/abipkgdiff.cc: Include the config.h header.
(extract_rpm): Guard this function definition with the WITH_RPM
macro.
(extract_deb): Guard this function definition with the WITH_DEB
macro.
(extract_package): Guard the handling of rpm packages with the
WITH_RPM macro and the handling of deb package with the WITH_DEB
macro. If a package not-support package format is encountered,
emit an appropriate error message and error out.
2015-08-07 Matthias Klose <doko@debian.org>
Add support for .deb files to abipkgdiff
* include/abg-tools-utils.h (file_type): Add FILE_TYPE_DEB.
* tools/abipkgdiff.cc (extract_deb): New.
(extract_package, main): Handle FILE_TYPE_DEB.
* src/abg-tools-utils.cc (operator<<): Handle FILE_TYPE_DEB.
(guess_file_type): Detect FILE_TYPE_DEB.
* tools/abidiff.cc (main): Handle FILE_TYPE_DEB.
* tools/abilint.cc (main): Handle FILE_TYPE_DEB.
* tests/data/test-diff-pkg/libsigc++-2.0-0c2a-dbgsym_2.4.0-1_amd64.ddeb:
Input debian debug info package; to be compared by the test
harness runtestdiffpkg.
* tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64.deb:
Input debian package; to be compared by the test harness
runtestdiffpkg.
* tests/data/test-diff-pkg/libsigc++-2.0-0v5-dbgsym_2.4.1-1ubuntu2_amd64.ddeb:
Input debug info package
* tests/data/test-diff-pkg/libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64.deb:
Input debian package; to be compared by the test harness
runtestdiffpkg.
* tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt:
Reference output for the comparison of the packages above.
* tests/data/Makefile.am: Add the new files above to the source distribution.
* tests/test-diff-pkg.cc (in_out_specs): Add the input packages
above to the set of files to be compared by this test harness.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Add configure check for rm and mkdir used by abipkgdiff
* configure.ac: Add configure checks for rm and mkdir used by
abipkgdiff.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Fix a comment in configure.ac
* configure.ac: Fix a comment.
2015-08-14 Dodji Seketeli <dodji@redhat.com>
Do not remove api and website source files by accident
* doc/Makefile.am: Do not remove the entirety of the build dir of
doxygen for the apidoc and the website as these can be also the
source dirs. Rather, remove that is under the html/ sub-directory
of the build dir, as this is always generated by doxygen.
2015-08-13 Dodji Seketeli <dodji@redhat.com>
Add an abipkgdiff --fail-no-dbg command line option
* tools/abipkgdiff.cc (options::fail_if_no_debug_info): New data
member.
(options::options): Initialize it.
(display_usage): Document it.
(compare): If the user asked for it, fail if the we couldn't file
the debug info for the corpus files being compared.
2015-08-13 Dodji Seketeli <dodji@redhat.com>
Add -h and -d option shortcuts to abidw
* tools/abidw.cc (display_usage): Added a documentation string.
(parse_command_line): Parse the new -h and -d shortcuts.
* doc/manuals/abidw.rst: Update the manual.
2015-08-13 Dodji Seketeli <dodji@redhat.com>
Add a -h option shortcut to abidiff
* tools/abidiff.cc (display_usage): Add documentation for the new
switch.
(parse_command_line): Parse the -h option.
* doc/manuals/abidiff.rst: Update the manual.
2015-08-13 Dodji Seketeli <dodji@redhat.com>
Add a -h shortcup to abipkgdiff --help
* tools/abipkgdiff.cc (display_usage): Document the -h shortcut.
(parse_command_line): Parse the -h shortcut to --help.
2015-08-09 Dodji Seketeli <dodji@redhat.com>
Bug 18791 - libabigail fails to read the output of abidw
* src/abg-reader.cc (read_context::get_scope_for_node): Take an
access_specifier output parameter to set the access specifier of
the current node in its scope. Update the function to set the
access_specifier.
(read_context::build_or_get_type_decl): Adjust to set the access
specifier of the type we are building, in case it's a member type.
* tests/data/test-abidiff/test-PR18791-v{0,1}.so.abi: New test input files.
* tests/data/test-abidiff/test-PR18791-report0.txt: New test
output reference.
* tests/data/Makefile.am: Add the new test material to the source
distribution.
* tests/test-abidiff.cc (specs): Add the new test inputs to the set of
input files this test harness has to run over.
2015-08-09 Dodji Seketeli <dodji@redhat.com>
Fix a thinko in language support de-serialization
* src/abg-ir.cc (string_to_translation_unit_language): Fix
thinko. What was I thinking ...
2015-08-06 Dodji Seketeli <dodji@redhat.com>
Add --no-added-syms to abipkgdiff
* tools/abipkgdiff.cc (options::show_added_syms): New data member.
(options::options): Initialize it.
(parse_command_line): Parse the new --no-added-syms option and set
the options::show_added_syms flag accordingly.
(display_usage): Add a help string for the new option.
(set_diff_context_from_opts): Set the diff context according to
the state of the new options::show_added_syms flag.
* doc/manuals/abipkgdiff.rst: Add manual entry for the new
--no-added-syms options.
* tests/data/test-diff-pkg/test-rpm-report-5.txt: New test
reference input file.
* tests/data/Makefile.am: Add the new file above to source
distribution.
* tests/test-diff-pkg.cc (InOutSpec::prog_options): New data
member.
(in_out_specs): Adjust. Add a new input to run the test again
with --no-added-syms.
(main): Adjust to pass the program options contained in
InOutSpec::prog_options to abipkgdiff.
fixup! Add --no-added-syms to abipkgdiff
2015-08-06 Dodji Seketeli <dodji@redhat.com>
Update diff stats when added symbols are removed from change report
* include/abg-comparison.h (diff_context_wptr)
(corpus_diff::diff_stats_sptr): New typedefs.
(corpus_diff::diff_stats::diff_stats): Make this constructor take
a diff_context_sptr. Make the default constructor private.
* src/abg-comparison.cc (corpus_diff::diff_stats::priv::ctxt_):
New data member. This is a weak pointer to a diff_context.
(corpus_diff::diff_stats::priv::priv): Take a diff_context_sptr
and initialize the weak pointer ctxt_ to it.
(corpus_diff::diff_stats::priv::ctxt): New accessor to the
diff_context hold by the diff_stats.
(corpus_diff::diff_stats::{num_removed_func_filtered_out,
num_added_func_filtered_out, num_removed_vars_filtered_out,
num_added_vars_filtered_out, num_removed_func_syms_filtered_out,
num_added_func_syms_filtered_out,
num_removed_var_syms_filtered_out,
num_added_var_syms_filtered_out}): If the user asked for the added
[or removed] variables/functions/symbols to be ignored, the
accessors for the number of filtered added/removed variables/functions/symbols
return the total number of added/removed
variables/functions/symbols; that is, say that *all* added/removed
variables/functions/symbols got filtered out.
(corpus_diff::priv::diff_stats_): Turn this data member into a
[shared] pointer to diff_stats.
(corpus_diff::priv::filters_and_suppr_applied_): Remove this data
member. Now that diff_stats_ is a pointer, we don't need this
boolean anymore.
(corpus_diff::apply_filters_and_suppressions_before_reporting):
Adjust to the fact that filters_and_suppr_applied_ is gone, and
that diff_stats_ is now a pointer.
(corpus_diff::report): Control un-referenced added symbols
reporting with
diff_context::show_added_symbols_unreferenced_by_debug_info()
2015-07-31 Dodji Seketeli <dodji@redhat.com>
Make applying supp specs through pointer access look through typedefs
* include/abg-comparison.h (type_suppression::suppresses_type):
Declare new member function.
(get_typedef_diff_underlying_type_diff): Declare new function.
* include/abg-fwd.h (get_typedef_underlying_type): Likewise.
* src/abg-comparison.cc (type_suppression::suppresses_type):
Define new member function.
(get_typedef_diff_underlying_type_diff): Define new function.
(type_suppression::suppresses_diff): After looking through the
different kind of access methods, use the new
type_suppression::suppresses_type(), rather than doing lots of
stuff ourselves here. But then, if the suppression doesn't apply
to the subjects of the diff, look through typedefs and try to
apply the suppression again.
* src/abg-ir.cc (get_typedef_underlying_type): Define new
function.
* tests/data/test-diff-suppr/libtest25-typedef-v{0,1}.so: New
binary test input files.
* tests/data/test-diff-suppr/test25-typedef-v{0,1}.c: Source code
for the binary test input files above.
* tests/data/test-diff-suppr/test25-typedef-report-{0, 1}.txt: New test
input files.
* tests/data/test-diff-suppr/test25-typedef-suppr-0.txt: New test
input file.
* tests/data/Makefile.am: Add the new test material to the source
distribution.
* tests/test-diff-suppr.cc (in_out_specs): Add the test inputs
above to the set of test inputs this harness has to run over.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Make abipkgdiff erase the *parent* directory of temporary files
* tools/abipkgdiff.cc
(erase_created_temporary_directories_parent): New static function.
(compare): After comparison, erase the temporary parent directory
as well.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Make the name of the removed variable section be consistent
* src/abg-comparison.cc (corpus_diff::report): Introduce the
section of removed variables with the string "Removed variable",
rather than with the string "Deleted variable".
* tests/data/test-abicompat/test2-var-removed-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test18-suppr-removed-var-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test18-suppr-removed-var-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test18-suppr-removed-var-report-5.txt: Likewise.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Consider default symbol versions when computing added/removed fns/vars
* include/abg-corpus.h (corpus::{lookup_function_symbol,
lookup_variable_symbol}): Take a elf_symbol::version object,
rather than a string representing the version. Add an overload
that takes an elf_symbol.
* src/abg-corpus.cc (find_symbol_by_version): New static function.
(corpus::{lookup_function_symbol, lookup_variable_symbol}): Take a
elf_symbol::version object, rather than a string representing the
version. Add an overload that takes an elf_symbol. If the looked
up symbol has no version and if the corpus contains a symbol with
the same name and with a default version, then return that latter
symbol if the corpus doesn't contain a symbol with the same name
and empty version.
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Adjust.
(corpus_diff::priv::ensure_lookup_tables_populated): Before
deciding that a symbol has been added, if the symbol has a default
version, make sure no symbol with the same name and without
version was present in the former corpus. Similarly, before
deciding that a symbol has been removed, if the symbol has no
version, make sure the latter corpus has no symbol with the same
name and with a default version.
* tests/data/test-diff-dwarf/test12-report.txt: Adjust. The
function should not be considered as added, because its symbol
(and version) was already present in the former DSO.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Fix a thinko in removed variables detection
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): Once we have
computed a set of potentially deleted variables that turned out to
contain variables that were actually *NOT* deleted, really take
these into account by removing these false positives from the set
of deleted *variables*. We were trying to delete these from the
set deleted *functions*; woops, I guess this was a copy & paste
error.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Fix logic of type_has_non_canonicalized_subtype()
* src/abg-ir.cc (type_has_non_canonicalized_subtype): Once the
type has been traversed, just test if the visitor has accumulated
the 'has_non_canonical_type' property.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Fix style issues
* include/abg-ir.h (struct ir_node_visitor): Fix the wording of
the comment of this type.
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Fix the
filling of the text of the comment of the code that chooses to
perform early canonicalizing.
2015-07-24 Dodji Seketeli <dodji@redhat.com>
Adding member type doesn't reset declaration-only-ness of a class
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Adding a new member type shouldn't remove the
declaration-only-ness of the class.
2015-07-22 Dodji Seketeli <dodji@redhat.com>
Extract all packages for a given run of abipkgdiff under the same temp dir
* tools/abipkgdiff.cc (package::{<all data members>}): Make the
data members be private. Make their names end with an underscore.
(package::extracted_package_parent_dir_path): Remove.
(package::extracted_package_dir_path): Rename into
package::extracted_dir_path_.
(package::extracted_packages_parent_dir): New static member
function, accessor.
(package::package): Adjust to the new names of the data members.
Call the new package::extracted_package_parent_dir() static member
function to initial the package::extracted_dir_path_ data member.
(package::{path, extracted_dir_path, type, is_debug,
path_elf_file_sptr_map, debug_info_package}): New accessors for
the data members.
(package::{erase_extraction_directory,
erase_extraction_directories}): Adjust.
(erase_created_temporary_directories)
(create_maps_of_package_content)
(extract_package_and_map_its_content, prepare_packages, compare)
(main): Adjust.
2015-07-22 Dodji Seketeli <dodji@redhat.com>
Add a --keep-tmp-files option to abipkgidff
* tools/abipkgdiff.cc (options::keep_tmp_files): New data member.
(options::options): Initialize it.
(display_usage): Display a usage string for the new
--keep-tmp-files option.
(parse_command_line): Parse the new --keep-tmp-files option.
(compare): Do not erase temporary directories if the users asked so.
* doc/manuals/abipkgdiff.rst: Document the new --keep-tmp-files
options.
2015-07-21 Dodji Seketeli <dodji@redhat.com>
Show linkage names in abipkgdiff output
* doc/manuals/abipkgdiff.rst: Document the new --no-linkage-name
options.
* tools/abipkgdiff.cc (options::show_linkage_names): New data
member.
(options::options): Initialize it.
(display_usage): Display a usage string for --no-linkage-name.
(parse_command_line): Parse the --no-linkage-name option.
(set_diff_context_from_opts): Set the diff context accordingly.
* tests/data/test-diff-pkg/test-rpm-report-0.txt: Adjust.
2015-07-21 Dodji Seketeli <dodji@redhat.com>
Add --no-added-binaries to abipkgdiff
* tools/abipkgdiff.cc (options::show_added_binaries): New data
member.
(options::options): Initialize it.
(display_usage): Add a help string for --no-added-binaries.
(parse_command_line): Parse the new --no-added-binaries option.
(compare): Do not show added binaries if the user doesn't want to.
* doc/manuals/abipkgdiff.rst: Document the new --no-added-binaries
option.
2015-07-21 Dodji Seketeli <dodji@redhat.com>
make abipkgdiff return a proper exit code
* tools/abipkgdiff.cc (compare): Return an instance
abigail::tools_utils::abidiff_status, just like what we do in
abidiff.
* doc/manuals/abipkgdiff.rst: Document the new exit code.
2015-07-21 Dodji Seketeli <dodji@redhat.com>
Fix logic of determining if changes happened in abidiff
* tools/abidiff.cc (main): Simplify the logic when determining if
the comparison between two corpora yields worthwhile changes.
2015-07-21 Dodji Seketeli <dodji@redhat.com>
Add a new corpus_diff::has_net_changes() entry point
* include/abg-comparison.h (corpus_diff::has_net_changes): Declare
new member function.
* src/abg-comparison.cc (corpus_diff::has_net_changes): Define it.
2015-07-20 Dodji Seketeli <dodji@redhat.com>
Fix type synthesis to fix abicompat weak mode
* include/abg-fwd.h
(synthesize_type_from_translation_unit): Declare new function.
(synthesize_function_type_from_translation_unit): Make the
translation_unit parameter non-const because the function needs to
bind the life time of the synthesized function to the life time of
the translation unit. Make this function be a friend of
abigail::ir::translation_unit.
(synthesize_function_type_from_translation_unit):
* src/abg-ir.cc (translation_unit::priv::synthesized_types_): New
data member.
(synthesize_type_from_translation_unit): Define new function.
(synthesize_function_type_from_translation_unit): Make the
translation_unit parameter non-const. If the return is void, then
take that in account carefuly. Rather than just looking up the
type of parameters and return value, synthesize them too,
especially when they are qualified types. Bind the life time of
the synthesized function type to the lifetime of the translation
unit.
* tests/data/test-abicompat/test7-fn-changed-report-1.txt: New
test reference output.
* tests/test-abicompat.cc (in_out_spec): Run the harness on the
exisiting test7-fn-changed-app and libtest7-fn-changed-libapp-v1
but in weak mode this time.
2015-07-20 Dodji Seketeli <dodji@redhat.com>
Clean up the output of abicompat weak mode
* tools/abicompat.cc (perform_compat_check_in_weak_mode): Remove
disgracious vertical spaces in the wording.
* tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust.
* tests/data/test-abicompat/test6-var-changed-report-0.txt: Adjust.
2015-07-20 Sinny Kumari <sinny@redhat.com>
Display --suppressions|--suppr option in help usage
* tools/abipkgdiff.cc (display_usage): Print
--suppressions|--suppr <path> option in help usage
2015-07-20 Dodji Seketeli <dodji@redhat.com>
Fix computing the set of exported functions and varible symbols
* src/abg-ir.cc (elf_symbol::get_name_and_version_from_id): Always
set the version and name of the symbol.
* src/abg-corpus.cc
(corpus::exported_decls_builder::{keep_wrt_id_of_fns_to_keep,
keep_wrt_id_of_vars_to_keep}): Reset the symbol name *and* version
before passing it. This is redundant with the fix in
elf_symbol::get_name_and_version_from_id() that always set the
symbol name and version now, but I felt it makes it easier to
understand the fix overall.
* tests/data/test-abicompat/libtest7-fn-changed-libapp-v{0,1}.so:
New test input binaries.
* tests/data/test-abicompat/test7-fn-changed-app: Likewise.
* tests/data/test-abicompat/test7-fn-changed-{app, libapp-v0,
libapp-v1}.c: Source code of the binary test inputs above.
* * tests/data/test-abicompat/test7-fn-changed-{libapp-v0,
libapp-v1}.h: Likewise.
* tests/data/test-abicompat/test7-fn-changed-report-0.txt: Test
input.
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-abicompat.cc (int_out_specs): Add the test inputs
above to the set of inputs this test harness has to run over.
2015-07-20 Dodji Seketeli <dodji@redhat.com>
Fix the wording of description of abipkgdiff.cc again
* tools/abipkgdiff.cc: Fix the wording again.
2015-07-20 Dodji Seketeli <dodji@redhat.com>
Remove use of tmpnam from abilint
* include/abg-tools-utils.h (abigail::tools_utils::temp_file):
Declare new type.
(abigail::tools_utils::temp_file_sptr): New typedef.
* src/abg-tools-utils.cc (temp_file::priv): Define new type.
(temp_file::{temp_file, is_good, get_path, get_stream, create}):
Define new member functions.
* tools/abilint.cc (main): Do not use tmpnam anymore. Use the new
abigail::tools_utils::temp_file type instead.
2015-07-20 Dodji Seketeli <dodji@redhat.com>
Try to avoid a race condition when abipkgdiff extracts packages.
* include/abg-tools-utils.h (get_random_number)
(get_random_number_as_string): Declare new functions.
* src/abg-tools-utils.cc (get_random_number)
(get_random_number_as_string): Define them.
* tools/abipkgdiff.cc
(package::extracted_package_parent_dir_path): New data member.
(package::package): Initialize
package::extracted_package_parent_dir_path to
<tmpdir>/<randomname>, with randomname being a random number
represented as a string.
(extract_rpm): Make sure to create a hierarchy of directories, not
just a directory.
2015-07-19 Dodji Seketeli <dodji@redhat.com>
Fix the wording of the description of the abipkgdiff.cc file
* tools/abipkgdiff.cc: Fix the wording of the description.
2015-07-19 Dodji Seketeli <dodji@redhat.com>
Fix the --suppressions manual doc for abidiff
* doc/manuals/abidiff.rst: Talk about the --suppr shortcut of the
--suppressions option.
2015-07-19 Dodji Seketeli <dodji@redhat.com>
On changed fn, show symbol info when name is different from linkage name in C
* include/abg-ir.h (translation_unit::language): New enum type.
(translation_unit::{get_language, set_language}): Declare new
accessors.
(translation_unit_language_to_string)
(string_to_translation_unit_language, is_c_language)
(is_cplus_plus_language): Declare new functions.
* src/abg-ir.cc (translation_unit::priv::language_): New data
member.
(translation_unit::priv::language_): Initialize it.
(translation_unit::{set_language, get_language}): Define new
member functions.
(translation_unit_language_to_string)
(string_to_translation_unit_language, is_c_language)
(is_cplus_plus_language): Define new functions.
* src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): New
static function.
(build_translation_unit_and_add_to_ir): Read the language of the
translation unit.
* src/abg-comparison.cc (corpus_diff::report): When reporting a
change in a function sub-type, if we are in C language translation
unit, if the function name is different from its linkage name,
even if the symbol doesn't have any alias, show symbol
information.
* src/abg-reader.cc (read_translation_unit_from_input): Read the
'language' property of the translation unit, if present.
* src/abg-writer.cc (write_translation_unit): Write the 'language'
property to the translation unit, if present.
* tests/data/test-read-dwarf/test0.abi: Adjust for the new
'language' property of the 'abi-instr' element.
* tests/data/test-read-dwarf/test1.abi: Likewise.
* tests/data/test-read-dwarf/test2.so.abi: Likewise.
* tests/data/test-read-dwarf/test3.so.abi: Likewise.
* tests/data/test-read-dwarf/test4.so.abi: Likewise.
* tests/data/test-read-dwarf/test5.o.abi: Likewise.
* tests/data/test-read-dwarf/test6.so.abi: Likewise.
* tests/data/test-read-dwarf/test7.so.abi: Likewise.
* tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
Likewise.
2015-07-19 Dodji Seketeli <dodji@redhat.com>
Add --suppressions to abipkgdiff
* tools/abipkgdiff.cc (options::suppressions): New data member.
(set_diff_context_from_opts): Set the suppression specifications
provided by the user to the diff context.
(parse_command_line): Parse the --suppressions and --suppr command
line options.
* doc/manuals/abipkgdiff.rst: Document the --suppressions and
--suppr options.
2015-07-18 Dodji Seketeli <dodji@redhat.com>
Support file_name_regexp and soname_regexp in supp-specs
* include/abg-comparison.h (suppression_base::priv_): Make this
pimpl member protected.
(suppression_base::set_file_name_regex_str)
(get_file_name_regex_str, get_soname_regex_str)
(set_soname_regex_str): Declare new accessors.
(function_suppression::{suppresses_function,
suppresses_function_symbol}): Take a diff_context_sptr.
(variable_suppression::{suppresses_variable,
suppresses_variable_symbol}): Take a diff_context_sptr.
* src/abg-comparison.cc
(suppression_base::priv::{file_name_regex_str_, file_name_regex_,
soname_regex_str_, soname_regex_}): Define new data members.
(suppression_base::priv::get_file_name_regex_str)
(get_soname_regex_str): Define new member functions.
(suppression_base::set_file_name_regex_str)
(get_file_name_regex_str, get_soname_regex_str)
(set_soname_regex_str): Define new accessors.
(type_suppression::suppresses_diff): Evaluate file_name_regexp and
soname_regexp.
(read_type_suppression): Fix the reading of the "label" property.
Read the file_name_regexp and soname_regexp properties.
(function_suppression::{suppresses_function,
suppresses_function_symbol): Take a diff_context_sptr parameter.
Evaluate file_name_regexp and soname_regexp properties.
(function_suppression::suppresses_diff): Adjust for the api change
of function_suppression::suppresses_function().
(read_function_suppression): Read the file_name_regexp and
soname_regexp properties.
(variable_suppression::suppresses_variable): Take a
diff_context_sptr parameter and evaluate file_name_regexp and
soname_regexp properties.
(variable_suppression::suppresses_variable_symbol): Likewise.
(variable_suppression::suppresses_diff): Adjust for the api change
of variable_suppression::suppresses_variable().
(read_variable_suppression): Read the file_name_regexp and
soname_regexp properties.
(function_is_suppressed, variable_is_suppressed): Take a
diff_context_sptr parameter.
(corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars):
Adjust.
* doc/manuals/libabigail-concepts.rst: Document file_name_regexp
and soname_regexp in the manual.
* tests/data/test-diff-suppr/libtest24-soname-v{0,1}.so: New test
binary input files.
* tests/data/test-diff-suppr/test24-soname-report-{0,4}.txt: New
test input files.
* tests/data/test-diff-suppr/test24-soname-suppr-{0,4}.txt:
Likewise.
* tests/data/test-diff-suppr/test24-soname-v{0,1}.cc: Source code
of the binary test input files above.
* tests/data/Makefile.am: Add the new test material above to
source distribution.
* tests/test-diff-suppr.cc (in_out_spec): Add the new test inputs
to the set of tests this harness has to run over.
2015-07-18 Dodji Seketeli <dodji@redhat.com>
Fix possible crash in suppression evaluation
* src/abg-comparison.cc (type_suppression::suppresses_diff): When
evaluating the reach_kind property, do not crash on diff nodes
that are pointer_diff or reference_diff to something else but a
type diff.
2015-07-17 Dodji Seketeli <dodji@redhat.com>
Fix '--' being rendered as '-' in html manuals
* doc/manuals/abicompat.rst: Quote options as verbatim.
* doc/manuals/abidiff.rst: Likewise.
* doc/manuals/abidw.rst: Likewise.
* doc/manuals/abilint.rst: Likewise.
* doc/manuals/abipkgdiff.rst: Likewise.
2015-07-17 Dodji Seketeli <dodji@redhat.com>
Fix the --verbose option
* tools/abipkgdiff.cc (compare): In the elf_file overload, do not
emit an error message when a binary could not be analyzed unless
--verbose was provided.
2015-07-16 Dodji Seketeli <dodji@redhat.com>
Cleanup the output for added/removed binaries
* tools/abipkgdiff.cc (compare): In the overload for packages,
indent the content of the "Removed binaries" and "Added binaries"
paragraphs.
2015-07-16 Dodji Seketeli <dodji@redhat.com>
Avoid redundant diff report messages by default.
* tools/abipkgdiff.cc (options::show_redundant_changes): New data
member.
(options::options): Initialize it.
(display_usage): Add a help string for the --redundant command
Line option.
(set_diff_context_from_opts): New static function.
(compare): Take the options variable. Set the diff context from
the options, especially if we should show redundant changes or
not. Use that diff context when comparing ABIs.
(parse_command_line): Parse the new --redundant command line
switch.
* doc/manuals/abipkgdiff.rst: Document the new --redundant option.
2015-07-16 Dodji Seketeli <dodji@redhat.com>
Support comparing only shared libraries
* tools/abipkgdiff.cc (options::compare_dso_only): New data
member.
(options::options): Initialize it.
(display_usage): Display a little help string for it.
(create_maps_of_package_content): Take the option variable. Do
not compare non-dso files if the --dso-only option was provided.
(extract_package_and_map_its_content, prepare_packages, compare):
Take the option variable.
(parse_command_line): Parse the new --dso-only option.
* doc/manuals/abipkgdiff.rst: Add documentation for the new
--dso-only option.
2015-07-15 Dodji Seketeli <dodji@redhat.com>
Comment functions and types of abipkgdiff
* src/abg-dwarf-reader.cc (get_soname_of_elf_file): Better wording
of the apidoc of this function.
* tools/abipkgdiff.cc (verbose, elf_file_paths): Add apidoc for
these global variables.
(struct options, ): Add apidoc for these types.
(options::{erase_extraction_directory,
erase_extraction_directories}, display_usage, extract_rpm)
(erase_created_temporary_directories, extract_package)
(file_tree_walker_callback_fn, compare)
(create_maps_of_package_content)
(extract_package_and_map_its_content, prepare_packages, compare)
(parse_command_line): Add apidoc for these functions.
2015-07-16 Sinny Kumari <sinny@redhat.com>
Add regression tests for abipkgdiff tool
* tests/Makefile.am: Build new runtestdiffpkg regression test
* tests/data/Makefile.am: Add new test files to source
* tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64.rpm:
Test data for abipkgdiff tool
* tests/data/test-diff-pkg/dbus-glib-0.80-3.fc12.x86_64.rpm: Likewise
* tests/data/test-diff-pkg/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm:
Likewise
* tests/data/test-diff-pkg/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm:
Likewise
* tests/data/test-diff-pkg/test-rpm-report-0.txt: Expected test output
* tests/data/test-diff-pkg/test-rpm-report-1.txt: Likewise
* tests/data/test-diff-pkg/test-rpm-report-2.txt: Likewise
* tests/data/test-diff-pkg/test-rpm-report-3.txt: Likewise
* tests/data/test-diff-pkg/test-rpm-report-4.txt: Likewise
* tests/test-diff-pkg.cc: New file
2015-07-15 Dodji Seketeli <dodji@redhat.com>
Add a manual for abipkgidiff
* doc/manuals/abipkgdiff.rst: New manual file.
* doc/manuals/libabigail-tools.rst: Refer to the manual for
abipkgdiff.
* doc/manuals/Makefile.am: Add the new manual file to source
distribution.
* doc/manuals/conf.py: Add the manual for abipkgdiff to section 1.
2015-07-15 Dodji Seketeli <dodji@redhat.com>
Comment functions and types of abipkgdiff
* src/abg-dwarf-reader.cc (get_soname_of_elf_file): Better wording
of the apidoc of this function.
* tools/abipkgdiff.cc (verbose, elf_file_paths): Add apidoc for
these global variables.
(struct options, ): Add apidoc for these types.
(options::{erase_extraction_directory,
erase_extraction_directories}, display_usage, extract_rpm)
(erase_created_temporary_directories, extract_package)
(file_tree_walker_callback_fn, compare)
(create_maps_of_package_content)
(extract_package_and_map_its_content, prepare_packages, compare)
(parse_command_line): Add apidoc for these functions.
2015-07-15 Dodji Seketeli <dodji@redhat.com>
Various style fixes
* abipkgdiff.cc (get_soname_of_elf_file): Fix spacing.
* tools/abipkgdiff.cc (elf_file_paths): Make this global variable
static.
(extract_rpm): Rename parameter pkg_path name into package_path.
2015-07-15 Dodji Seketeli <dodji@redhat.com>
Remove the last direct fiddling with ELF from abipkgdiff.cc
* abg-dwarf-reader.h (enum elf_type): Move this declaration here
from abipkgdiff.cc to here.
(get_type_of_elf_file): Declare this new function.
(get_soname_from_elf): Change this to take a path to the elf file
rather than a Elf* handler. So now to use this, the user doesn't
have to get her hand dirty with elfutils.
* src/abg-dwarf-reader.cc (get_soname_from_elf): Change this to
take a path to the elf file rather than a Elf* handler.
(elf_file_type): Move this static function here, from
abipkgdiff.cc.
(get_type_of_elf_file): New function. This has been factorized
out of create_maps_of_package_content() in abipkgdiff.cc.
* tools/abipkgdiff.cc (class elf_file): Changed struct elf_file
into this. Make the default constructor private.
(elf_file::elf_file): Change the constructor to just take the path
to the elf_file. The base name, soname and elf file type are now
computed from the path file, in the constructor. This makes
instantiation much much easier from the point of view of the user
of the type.
(struct abi_diff): Renamed struct abi_changes into this.
(abi_diff::has_changes): Define new member function.
(abi_diffs): Remove this global variable.
(package::package): Remove the elf file type from the set of
parameters of this constructor. Rather, compute that elf file
type from the path to the elf file, in the constructor. Again,
this eases the use of the type.
(elf_file_type): Remove this from here, as it got moved to
abg-dwarf-reader.cc.
(compare): In the elf_file overload, return true if the comparison
yields ABI changes.
(create_maps_of_package_content): Do not fiddle with elfutils
stuff here. Rather, just instantiate elf_file and the analyzing
of the file magically happens.
(compare): Make the package overload take an abi_diff as output
parameter, rather than populating a global variable in return.
(compare): Add an other overload for package that doesn't take the
abi_diff as output parameter and write it in terms of the previous
one.
(main): Adjust as the instantiation of package is now simpler.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Add a --verbose option to abipkgdiff
* tools/abipkgdiff.cc (verbose): Add a new global variable.
(package::erase_extraction_directory, extract_rpm, compare)
(create_maps_of_package_content): Emit verbose information.
(parse_command_line): Parse the --verbose option.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Use the library to implement ABI comparison in abipkgdiff
* tools/abipkgdiff.cc (compare): In the overload for elf_file, use
abigail::comparison::compute_diff() to compare the ABI of two
corpora. The corpora themselves is read using
abigail::dwarf_reader::read_corpus_from_elf(). This cleans up the
output of the tool because nothing is emitted to standard output
if the two ABI corpora compares equal.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Fix several string passing issues in abipkgdiff.cc
* tools/abipkgdiff.cc (elf_file::elf_file): Pass the strings by
reference. Also, change the order of the parameters; all the
strings are passed first, then the elf_type is passed last.
(package::package): Likewise, pass the strings by reference, not
by value.
(create_maps_of_package_content): Adjust for the change in
parameters order of elf_file::elf_file.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Only try to compare DSOs or executable binaries in abipkgdiff
* tools/abipkgdiff.cc (compare): In the overload for packages,
only compare binaries that are DSO or executable.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Avoid flushing the output stream in abipkgdiff.cc
* tools/abipkgdiff.cc (extract_package)
(create_maps_of_package_content, compare, main): Avoid flushing
the output stream arbitrarily.
2015-07-08 Sinny Kumari <sinny@redhat.com>
Move get_soname() function to abg-dwarf-reader.h/cc
* include/abg-dwarf-reader.h (get_soname_from_elf): Declare
new function
* src/abg-dwarf-reader.cc (get_soname_from_elf): Define new
function
* tools/abipkgdiff.cc (get_soname): Remove function
(pkg_diff): Call get_soname_from_elf() instead of get_soname()
2015-07-07 Dodji Seketeli <dodji@redhat.com>
Important organizational changes in abipkgdiff.cc
* Avoid using shortened names when the line is not too long.
* Use shared_ptr when possible.
* When a function parameter is not meant to be nil, do not pass it
as a pointer; rather, pass it as a reference.
* Avoid doing things that can "fail" in a destructor; e.g, spawning
a process. Also, it's not common practise to cleanup a resource in a
type destructor, when that resource has not been created in one of the
member functions of the type. It eases maintenance when resource
creation and cleanup is performed at the same logical level.
* tools/abipkgdiff.cc (option::package{1,2}): Rename
option::pkg{1,2} into this, to increase legibility.
(option::debug_package{1,2}): Likewise, rename
option::debug_pkg{1,2} into this.
(elf_file::~elf_file): Do not "delete this" in a destructor. This
leads to double free. It's when someone invokes the "delete"
operator on a pointer to the object that the destructor of the
object is executed automatically; so if in the destructor the
delete operator is called again, bad things are going to happen.
As the destructor is now empty, remove it altogether.
(elf_file_sptr): New typedef for shared_ptr<elf_file>.
(package::path): Rename package::pkg_path into this, for better
legibility.
(package::extracted_package_dir_path): Rename
package::extracted_pkg_dir_path into this.
(package::type): Rename package::pkg_type into this.
(package::is_debug_info): Rename package::is_debuginfo_pkg into
this.
(package::path_elf_file_sptr_map): Rename
package::dir_elf_files_map into this because this is a map of
path -> elf_file_sptr. Also, now the value of the map element is
a elf_file_sptr, no more an elf_file*.
(package::debug_info_package): Rename package::debuginfo_pkg into
this.
(package::package): Adjust for the changes above.
(package::{erase_extraction_directory,
erase_extraction_directories}): New member functions.
(elf_file_paths): Renamed dir_elf_files_path into this.
(erase_created_temporary_directories)
(create_maps_of_package_content)
(extract_package_and_map_its_content, prepare_packages): New
static functions.
(get_soname, elf_file_type, extract_rpm): Make this static.
(extract_package): Take a const package& rather than a
package_sptr to express that the function really expects a non-nil
object by reference (not by copy) and that the object won't be
modified. Using a reference removes the possibility that the
pointer could be nil, causing crashes in the code where
parameter->something was used. Now only parameter.something can
be used, so no crash possible there. This is more solid code.
(file_tree_walker_callback_fn): Rename callback() into this. It
makes the code more legible and kind of 'self-documented'. At
least you get the hint that this is a callback function for some
file tree walking (ftw) function. Adjust for the relevant names
renaming above.
(compare): Rename compute_abidiff into this; again, this increases
legibility; at least at the point of use of this function. Rename
compare_package() into a an overload of compare() as well.
compare_package() used to take a vector of packages. It was hard
to guess by reading the signature of the function, which element
of the vector is expected to be the first vector of the
comparison, which one is to be the second, etc. Now, this
function takes two packages, named first_package and
second_package. That is more "typed"; that is, the signature is
more meaningful. Greater legibility, hopefully. And in the body
of the function, the debug information packages are now accessed
using the package::debug_info_package data member. Again, this is
less surprising, I believe. Also, explicitly erase the temporary
files that were created during this comparison. All this
simplifies the logic of this function, hopefully.
(parse_command_line): Make this static. Add new --d1 and --d2
command line switches that are shortcuts of --debug-info-pkg1 and
--debug-info-pkg2. Adjust this function for the relevant name
changes above. Make lines be shorter than 80 characters.
(main): Do not create any vector of parameters anymore as the
compare_packages() function don't take any vector of parameter
anymore. Just instantiate first_package and second_package now.
Adjust for the relevant name changes above. This hopefully
simplifies the logic of this function.
2015-07-06 Dodji Seketeli <dodji@redhat.com>
Wording fixes in abipkgdiff.cc
* tools/abipkgdiff.cc (extract_package): Renamed extract_pkg into
this because shortening 'package' into 'pkg' provides no
legibility improvement.
(compare_packages): Renamed pkg_diff() into this, so that the name
of the function starts with a verb, and the shortened 'pkg' word
is renamed back to the 'package' word. This way, the code almost
reads like normal English sentences with verbs and complement,
thus enhancing legibility and easing latter maintenance.
(main): Adjust for the changes above.
2015-07-06 Dodji Seketeli <dodji@redhat.com>
Re-indent tools/abipkgdiff.cc
* tools/abipkgdiff.cc: Re-indent the file properly and fix some
white spacing here and there.
2015-07-06 Dodji Seketeli <dodji@redhat.com>
Some slight typo and wording fixes in abipkgdiff
* tools/abipkgdiff.cc (display_usage): Fixed the typo in
'bi-pacakge.' Also, refer to 'package', not to 'bi-package' that
is surprising to the user at first.
(compute_abidiff): Shorten the size of the introductory line.
2015-07-03 Dodji Seketeli <dodji@redhat.com>
Remove names of unused variables in callback()
* tools/abipkgdiff.cc (callback): Remove the name of parameters st
and flag.
2015-07-03 Dodji Seketeli <dodji@redhat.com>
Remove useless const from the declaration of extract_rpm()
* tools/abipkgdiff.cc (extract_rpm): Remove useless const qualifier.
2015-07-03 Dodji Seketeli <dodji@redhat.com>
End all branches of get_soname() finish with a return statement
* tools/abipkgdiff.cc (get_soname): Have just one return statement
at the end of this function.
2015-07-03 Dodji Seketeli <dodji@redhat.com>
Fix abipkgdiff compilation issues
* tools/abipkgdiff.cc (elf_file::elf_file): Initialize data member
in the same order as they were declared.
(package::package): Likewise.
2015-06-19 Sinny Kumari <sinny@redhat.com>
Exclude processing symlink, display removed/added binaries between two packages
* tools/abipkgdiff.cc (abi_changes): Declare new struct
(callback): Exclude symbloic link file for durther processing
(compute_abidiff): Consider SONAME if exists as key in map instead
of binary name, else binary as key. Also, print if removed/added
binaries exist between packages
2015-06-09 Sinny Kumari <sinny@redhat.com>
Stdout ABI changes if same binary found in both package
* tools/abipkgdiff.cc (compute_abidiff): New function
tools/abipkgdiff.cc (pkg_diff): Iterate through list of binaries
in both package directory and call compute_diff function if
same binary found in both file.
tools/abipkgdiff.cc (main): Also consider debug-info directories
avilable in debu-info packages.
2015-06-02 Sinny Kumari <sinny@redhat.com>
Save ELF files, their type and SONAME if exist for extracted packages
* tools/abipkgdiff.cc (elf_type): Declare new enum
(elf_file): Declare new struct
(package): Add member variable dir_elf_files_map
(get_soname): Define new function
(elf_file_type): Define new function
(extract_rpm): Iterate over extracted directory files
and filter ELF binary files along with their information
like name, soname, elf_type and save in dir_elf_files_map
2015-05-26 Sinny Kumari <sinny@redhat.com>
Extract packages(RPMs) into temporary directories for further processing
* tools/abipkgdiff.cc (struct package): Declare new struct
(package_sptr): Declare shared_ptr for struct package
(extract_rpm): Define new fuction to extract rpm package
(extract_pkg): Define new function to extract pacakge
(pkg_diff): Define new function to get ABI diff between
two packages
(main): Create new object of type pacakge for each binary
and debuginfo pacakge passed in commandline options
2015-05-21 Sinny Kumari <sinny@redhat.com>
Guess RPM file type
* include/abg-tools-utils.h (file_type): Added member
FILE_TYPE_RPM and FILE_TYPE_SRPM
(operator<<): New function declaration.
* src/abg-tools-utils.cc (file_type): Detect RPM and
SRPM file type
(operator<<): New function definition
* tools/abidiff.cc (main): Check for RPM and SRPM
file type as well.
* tools/abilint.cci (main): Check for RPM and SRPM file
type as well.
* tools/abipkgdiff.cc (main): Check whether input files
to abipkgdiff are valid RPM files or not.
2015-05-19 Sinny Kumari <sinny@redhat.com>
Initial skeleton of abipkgdiff tool
* tools/Makefile.am: Include abipkgdiff.cc in compilation and
generate abipkgdiff binary.
* tools/abipkgdiff.cc: New file
2015-07-16 Dodji Seketeli <dodji@redhat.com>
Support reading binaries that do not have a symbol table
* src/abg-dwarf-reader.cc
(read_context::find_symbol_table_section): Allow returning a nil
pointer to symbol table.
(read_context::lookup_elf_symbol_from_index): Return an empty elf
symbol if we got a nil pointer to symbol table.
(read_context::load_symbol_maps): If no symbol table is found then
consider that the symbol maps loading failed.
2015-07-16 Dodji Seketeli <dodji@redhat.com>
Remove extra vertical spaces from diff report
* src/abg-comparison.cc (class_diff::report): Do not emit new line
unless the diff is to be reported.
* tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Adjust.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Adjust.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt:
: Adjust.
2015-07-09 Dodji Seketeli <dodji@redhat.com>
Allow null types in type comparison again
* src/abg-comparison.cc (compute_diff): In the overload of
type_base_sptr accept nil types.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Handle the life time of the map of canonical types
* include/abg-ir.h (type_base::canonical_types_map_type): Move
this typedef into abg-ir.cc and out of the type_base namespace.
(type_base::get_canonical_types_map): Likewise.
* src/abg-ir.cc (canonical_types_map_type): New typedef that got
moved here from type_base::canonical_types_map_type.
(get_canonical_types_map): Likewise got moved here from
type_base::get_canonical_types_map. Made static in the process.
(class usage_watchdog): New type.
(usage_watchdog_sptr, usage_watchdog_wptr): New typedefs.
(get_usage_watchdog, get_usage_watchdog_wptr, ref_usage_watchdog)
(maybe_cleanup_type_system_data): New static functions.
(translation_unit::priv::usage_watchdog_): Add new data member.
(translation_unit::priv::priv): Get a reference on the usage
watchdog.
(translation_unit::priv::~priv): If the usage watchdog says that
the type system is not used, then cleanup the global data
logically owned by the type system.
* include/abg-dwarf-reader.h (read_corpus_from_elf): Make this
return a corpus and set the status by reference using a parameter.
* src/abg-dwarf-reader.cc (read_corpus_from_elf): Implement the
above.
* include/abg-reader.h (read_translation_unit_from_file)
(read_translation_unit_from_buffer)
(read_translation_unit_from_istream): Remove the overloads that do
not return a translation_unit_sptr and that pass it as a
parameter. Only keep the overloads that return a
translation_unit_sptr, forcing users of the API to own a proper
reference on the resulting translation_unit pointer. That is
important to handle the life time of the global data of the type
system that need to be cleared when the last translation unit is
de-allocated.
* src/abg-reader.cc (read_translation_unit_from_input): Make this
return a translation_unit_sptr.
(read_translation_unit_from_file)
(read_translation_unit_from_buffer)
(read_translation_unit_from_istream): Remove the overloads that do
not return a translation_unit_sptr and that pass it as a
parameter. Only keep the overloads that return a
translation_unit_sptr.
(read_to_translation_unit): Make this return a
translation_unit_sptr.
* tests/print-diff-tree.cc (main): Adjust.
* tests/test-diff-dwarf.cc (main): Likewise.
* tests/test-ir-walker.cc (main): Likewise.
* tests/test-read-dwarf.cc (main): Likewise.
* tests/test-read-write.cc (main): Likewise.
* tools/abicompat.cc (main): Likewise.
* tools/abidiff.cc (main): Likewise.
* tools/abidw.cc (main): Likewise.
* tools/abilint.cc (main): Likewise.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Add --d{1,2} shortcut options for --debug-info-dir{1,2} in abidiff
* tools/abidiff.cc (display_usage): Add the --d{1,2} to the help
strings.
(parse_command_line): Parse the new --d1 and --d2 options.
2015-07-08 Dodji Seketeli <dodji@redhat.com>
Factorize incompatible and subtype changes detection
* include/abg-comparison.h (corpus_diff::{has_incompatible_changes,
has_net_subtype_changes}): Declare new member functions.
* src/abg-comparison.cc (corpus_diff::{has_incompatible_changes,
has_net_subtype_changes}): Define them.
* abidiff.cc (main): Use the new member functions above.
2015-07-09 Dodji Seketeli <dodji@redhat.com>
Adjust some tests for output changes
* tests/data/test-abidiff/test-struct1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test10-report.txt: Likewise.
* tests/data/test-diff-dwarf/test11-report.txt: Likewise.
* tests/data/test-diff-dwarf/test13-report.txt: Likewise.
* tests/data/test-diff-filter/test2-report.txt: Likewise.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Likewise.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Likewise.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise.
2015-07-06 Dodji Seketeli <dodji@redhat.com>
Fix missing newlines in diff report
* src/abg-comparison.cc (class_diff::report): The overload of
represent() for instances of var_decl does not emit new lines. So
the caller must ensure a new line is emitted.
2015-07-02 Dodji Seketeli <dodji@redhat.com>
Support filtering out just one alias of a function
* include/abg-comparison.h (function_suppression::{get,
set}_allow_other_aliases): Declare new member functions.
* src/abg-comparison.cc
(function_suppression::priv::allow_other_aliases_): New data
member.
(function_suppression::priv::priv): Initialize it to 'true'.
(function_suppression::{get, set}_allow_other_aliases): Define new
member functions.
(read_function_suppression): Parse the new "allow_other_aliases"
property.
(function_suppression::suppresses_function): Update to evaluate
the new 'allow_other_aliases' property when there is a property to
match against some a symbol name of the function.
(corpus_diff::report): Fix the printing of function aliases when
printing sub-type changes to properly emit the plural of the word
'symbol' when the function has several aliases.
* include/abg-ir.h (elf_symbol::get_number_of_aliases): Declare
new member function.
* src/abg-ir.cc (elf_symbol::get_number_of_aliases): Define new
member function.
* doc/manuals/libabigail-concepts.rst: Update manual.
* tests/data/test-diff-dwarf/test5-report.txt: Adjust.
* tests/data/test-diff-suppr/libtest23-alias-filter-v0.so: New
test input.
* tests/data/test-diff-suppr/libtest23-alias-filter-v1.so: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-0.suppr: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-1.suppr: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-2.suppr: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-3.suppr: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-4.suppr: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-report-5.txt: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-v0.c: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-v1.c: Likewise.
* tests/data/test-diff-suppr/test23-alias-filter-version-script: Likewise.
* tests/data/Makefile.am: Add the new test stuff to source
distribution.
* tests/test-diff-suppr.cc (in_out_spec): Add the tests inputs
above to the list of input to run over.
2015-07-01 Dodji Seketeli <dodji@redhat.com>
Complete apidoc
* src/abg-ir.cc (elf_symbol::get_aliases_id_string): Finish the
incomplete apidoc for this member function.
2015-07-01 Dodji Seketeli <dodji@redhat.com>
Show aliases of functions with changed sub-types
* include/abg-ir.h (elf_symbol::get_aliases_id_string): Declare
new overload.
* src/abg-ir.cc (elf_symbol::get_aliases_id_string): Define new
overload.
* src/abg-comparison.cc (corpus_diff::report): For functions with
sub-type changes report their aliases. Do not do this if the
function is a constructor or destructor because these almost
always have aliases, at least with GCC and the developer most
certainly has not done anything special for that; she would thus
be uselessly surprised by that remote implementation detail.
* tests/data/test-diff-dwarf/test5-report.txt: Adjust test.
2015-06-25 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog file
* ChangeLog: Update automatically using 'make update-changelog'.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Misc typo fixes
* src/abg-comparison.cc
(corpus_diff::priv::{deleted, added}n_variable_is_suppressed): Fix
a typo.
* tests/data/test-diff-dwarf/test16-syms-only-v0.cc: Fix a typo in
the comments.
* tests/data/test-diff-dwarf/test16-syms-only-v1.cc: Likewise.
2015-06-22 Dodji Seketeli <dodji@redhat.com>
Apply suppression specifications to added and removed functions and variables
* include/abg-comparison.h (is_type_suppression)
(is_function_suppression): Declare new functions.
({function, variable}_suppression::change_kind): Declare new enum.
(function_suppression::{parse_change_kind, get_change_kind,
set_change_kind, suppresses_function,
suppresses_function_symbol}): Declare new member functions.
(variable_suppression::{parse_change_kind, get_change_kind,
set_change_kind, suppresses_variable, suppresses_variable,
suppresses_variable_symbol}): Declare new member functions.
(operator{&,|}): Declare new operators for
function_suppression::change_kind and
variable_suppression::change_kind enums.
(corpus_diff::diff_stats::{num_removed_func_filtered_out,
net_num_func_removed, num_added_func_filtered_out,
net_num_func_added, num_removed_vars_filtered_out,
net_num_vars_removed, num_added_vars_filtered_out,
net_num_vars_added, num_removed_func_syms_filtered_out,
num_added_func_syms_filtered_out, net_num_removed_func_syms,
net_num_added_func_syms, num_added_var_syms_filtered_out,
num_removed_vars_filtered_out, net_num_removed_var_syms,
net_num_added_var_syms}): Declare new member functions.
(corpus_diff::diff_stats::num_changed_vars_filtered_out): Renamed
corpus_diff::diff_stats::num_vars_filtered_out into this.
(corpus_diff::diff_stats::num_changed_func_filtered_out): Renamed
corpus_diff::diff_stats::num_func_filtered_out into this.
* src/abg-comparison.cc (is_type_suppression)
(is_function_suppression): Define new
function.
(function_suppression::priv::change_kind): New data member.
(function_suppression::priv): Initialize it.
(function_suppression::{parse_change_kind, get_change_kind,
set_change_kind, suppresses_function,
suppresses_function_symbol}): Define new member functions.
(operator{&,|}): Define new operators for the new
function_suppression::change_kind enum.
(function_suppression::suppresses_diff): Re-write this in terms of
the new function_suppression::suppresses_function() function.
(read_function_suppression): Support reading the new "change_kind"
property.
(variable_suppression::priv::change_kind_): New data member.
(variable_suppression::priv::priv): Initialize it.
(variable_suppression::{parse_change_kind, get_change_kind,
set_change_kind, suppresses_variable,
suppresses_variable_symbol}): Define new member functions.
(is_variable_suppression): Define new function.
(operator{&,|}): Define new operators for
variable_suppression::change_kind enum.
(variable_suppression::suppresses_diff): Re-write in terms of the
new variable_suppression::suppresses_variable function.
(read_variable_suppression): Support reading the new "change_kind"
property.
(corpus_diff::diff_stats::priv::{num_removed_func_filtered_out,
num_added_func_filtered_out, num_removed_vars_filtered_out,
num_added_vars_filtered_out, num_removed_func_syms_filtered_out,
num_added_func_syms_filtered_out,
num_removed_var_syms_filtered_out,
num_added_var_syms_filtered_out}): New data members.
(corpus_diff::diff_stats::priv::num_changed_func_filtered_out):
Renamed the data member num_func_filtered_out into this.
(corpus_diff::diff_stats::priv::num_changed_vars_filtered_out):
Renamed data member num_vars_filtered_out into this.
(corpus_diff::diff_stats::priv::priv): Initialize the new data
members.
(corpus_diff::diff_stats::{num_removed_func_filtered_out,
num_removed_func_filtered_out, net_num_func_removed,
net_num_func_added, num_added_func_filtered_out,
net_num_func_added, num_removed_vars_filtered_out,
num_removed_vars_filtered_out, net_num_vars_removed,
num_added_vars_filtered_out, net_num_vars_added,
num_removed_func_syms_filtered_out,
num_added_func_syms_filtered_out, net_num_removed_func_syms,
net_num_added_func_syms, num_added_var_syms_filtered_out,
num_removed_vars_filtered_out, net_num_removed_var_syms,
net_num_added_var_syms}): Define new member functions.
(corpus_diff::diff_stats::num_changed_func_filtered_out): Renamed
corpus_diff::diff_stats::num_func_filtered_out into this.
(corpus_diff::diff_stats::num_changed_vars_filtered_out): Renamed
corpus_diff::diff_stats::num_vars_filtered_out into this.
(corpus_diff::diff_stats::{net_num_func_changed,
net_num_vars_changed}): Adjust.
(corpus_diff::priv::{suppressed_deleted_fns_,
suppressed_added_fns_, suppressed_deleted_vars_,
suppressed_added_vars_, suppressed_added_unrefed_fn_syms_,
suppressed_deleted_unrefed_fn_syms_,
suppressed_added_unrefed_var_syms_,
suppressed_deleted_unrefed_fn_syms_}): New data members.
(corpus_diff::priv::{apply_suppressions_to_added_removed_fns_vars,
deleted_function_is_suppressed, added_function_is_suppressed,
deleted_variable_is_suppressed, added_variable_is_suppressed,
added_unrefed_fn_sym_is_suppressed,
deleted_unrefed_fn_sym_is_suppressed,
added_unrefed_var_sym_is_suppressed,
deleted_unrefed_var_sym_is_suppressed}): Define member functions.
(function_is_suppressed, variable_is_suppressed): Define new
functions.
(corpus_diff::priv::apply_filters_and_compute_diff_stats): Compute
stats for filtered added or removed functions, variables and their
symbols.
(corpus_diff::priv::emit_diff_stats): Emit diff stats for filtered
added or removed functions, variables and symbols.
(corpus_diff::report): Support suppressed reports about added or
removed functions, variables and symbols. Fixed a typo that was
in there for a while. Note that that fix requires updating some
regression tests, and the part of this patch that touches
regression tests does that.
(apply_suppressions): In the overload for corpus_diff, apply the
suppression to added or removed functions and variables.
* doc/manuals/libabigail-concepts.rst: Update this manual to
reflect the changes above. Also, perform an extensive cleanup of
the manual to introduce more section titles to make it easier to
navigate the document using the table of content.
* tests/data/test-abicompat/test2-var-removed-report-0.txt:
Adjust.
* tests/data/test-diff-dwarf/test0-report.txt: Likewise.
* tests/data/test-diff-dwarf/test12-report.txt: Likewise.
* tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt:
Likewise.
* tests/data/test-diff-dwarf/test19-soname-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test7-report.txt: Likewise.
* tests/data/test-diff-dwarf/test8-report.txt: Likewise.
* tests/data/test-diff-dwarf/test9-report.txt: Likewise.
* tests/data/test-diff-dwarf/test16-syms-only-report.txt: Likewise.
* tests/data/test-diff-dwarf/test17-non-refed-syms-report-0.txt:
Likewise.
* tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt:
Likewise.
* tests/data/test-diff-filter/test0-report.txt: Likewise.
* tests/data/test-diff-filter/test01-report.txt: Likewise.
* tests/data/test-diff-filter/test13-report.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-v0.o: Add new test
material.
* tests/data/test-diff-filter/test15-0-report.txt: Likewise.
* tests/data/test-diff-filter/test2-report.txt: Likewise.
* tests/data/test-diff-filter/test21-compatible-vars-report-0.txt:
Likewise.
* tests/data/test-diff-filter/test24-compatible-vars-report-1.txt:
Likewise.
* test-diff-suppr/test15-suppr-added-fn-v1.o: Likewise.
* test-diff-suppr/test15-suppr-added-fn-0.suppr: Likewise.
* test-diff-suppr/test15-suppr-added-fn-1.suppr: Likewise.
* test-diff-suppr/test15-suppr-added-fn-2.suppr: Likewise.
* test-diff-suppr/test15-suppr-added-fn-3.suppr: Likewise.
* test-diff-suppr/test15-suppr-added-fn-4.suppr: Likewise.
* test-diff-suppr/test15-suppr-added-fn-report-0.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-report-1.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-report-2.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-report-3.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-report-4.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-report-5.txt: Likewise.
* test-diff-suppr/test15-suppr-added-fn-v0.cc: Likewise.
* test-diff-suppr/test15-suppr-added-fn-v1.cc: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-v0.o: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-v1.o: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-0.suppr: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-1.suppr: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-2.suppr: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-3.suppr: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-4.suppr: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-report-0.txt: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-report-1.txt: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-report-2.txt: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-report-3.txt: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-report-4.txt: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-report-5.txt: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-v0.cc: Likewise.
* test-diff-suppr/test16-suppr-removed-fn-v1.cc: Likewise.
* test-diff-suppr/test17-suppr-added-var-v0.o: Likewise.
* test-diff-suppr/test17-suppr-added-var-v1.o: Likewise.
* test-diff-suppr/test17-suppr-added-var-0.suppr: Likewise.
* test-diff-suppr/test17-suppr-added-var-1.suppr: Likewise.
* test-diff-suppr/test17-suppr-added-var-2.suppr: Likewise.
* test-diff-suppr/test17-suppr-added-var-3.suppr: Likewise.
* test-diff-suppr/test17-suppr-added-var-4.suppr: Likewise.
* test-diff-suppr/test17-suppr-added-var-report-0.txt: Likewise.
* test-diff-suppr/test17-suppr-added-var-report-1.txt: Likewise.
* test-diff-suppr/test17-suppr-added-var-report-2.txt: Likewise.
* test-diff-suppr/test17-suppr-added-var-report-3.txt: Likewise.
* test-diff-suppr/test17-suppr-added-var-report-4.txt: Likewise.
* test-diff-suppr/test17-suppr-added-var-report-5.txt: Likewise.
* test-diff-suppr/test17-suppr-added-var-v0.cc: Likewise.
* test-diff-suppr/test17-suppr-added-var-v1.cc: Likewise.
* test-diff-suppr/test18-suppr-removed-var-v0.o: Likewise.
* test-diff-suppr/test18-suppr-removed-var-v1.o: Likewise.
* test-diff-suppr/test18-suppr-removed-var-0.suppr: Likewise.
* test-diff-suppr/test18-suppr-removed-var-1.suppr: Likewise.
* test-diff-suppr/test18-suppr-removed-var-2.suppr: Likewise.
* test-diff-suppr/test18-suppr-removed-var-3.suppr: Likewise.
* test-diff-suppr/test18-suppr-removed-var-4.suppr: Likewise.
* test-diff-suppr/test18-suppr-removed-var-report-0.txt: Likewise.
* test-diff-suppr/test18-suppr-removed-var-report-1.txt: Likewise.
* test-diff-suppr/test18-suppr-removed-var-report-2.txt: Likewise.
* test-diff-suppr/test18-suppr-removed-var-report-3.txt: Likewise.
* test-diff-suppr/test18-suppr-removed-var-report-4.txt: Likewise.
* test-diff-suppr/test18-suppr-removed-var-report-5.txt: Likewise.
* test-diff-suppr/test18-suppr-removed-var-v0.cc: Likewise.
* test-diff-suppr/test18-suppr-removed-var-v1.cc: Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v0.o: New
test input.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v1.o:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-0.suppr:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-1.suppr:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-2.suppr:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-3.suppr:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-4.suppr:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-1.txt:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-2.txt:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-3.txt:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-4.txt:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-5.txt:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v0.cc:
Likewise.
* tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v1.cc:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v0.o:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v1.o:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-0.suppr:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-1.suppr:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-2.suppr:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-3.suppr:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-4.suppr:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-1.txt:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-2.txt:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-3.txt:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-4.txt:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-5.txt:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v0.cc:
Likewise.
* tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v1.cc:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-v0.o:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-v1.o:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-0.suppr:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-1.suppr:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-2.suppr:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-3.suppr:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-4.suppr:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-1.txt:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-2.txt:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-3.txt:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-4.txt:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-5.txt:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-v0.cc:
Likewise.
* tests/data/test-diff-suppr/test21-suppr-added-var-sym-v1.cc:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v0.o:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v1.o:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-0.suppr:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-1.suppr:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-2.suppr:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-3.suppr:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-4.suppr:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-1.txt:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-2.txt:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-3.txt:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-4.txt:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v0.cc:
Likewise.
* tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v1.cc:
Likewise.
* tests/data/Makefile.am: Add the new test materials above to source
distribution.
* tests/test-diff-suppr.cc (in_out_specs): Add the new tests
material above to the list of test inputs this harness has to run
over.
2015-06-22 Dodji Seketeli <dodji@redhat.com>
Do not compare static data members when comparing types
* include/abg-ir.h (class_decl::get_non_static_data_members):
Declare new data members.
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Only look at
non-static data members.
(compute_diff): In the overload for class_decl, only compare
non-static data members.
* src/abg-hash.cc (class_decl::hash::operator()): Do not hash
static data members members hashing a class_decl.
* src/abg-ir.cc (class_decl::priv::data_members_): New data
member.
(class_decl::priv::priv): When initializing data members, store
the non-static data members on the side, in the new
class_decl::priv::non_static_data_members_ data member.
(class_decl::get_non_static_data_members): Define member function.
(class_decl::add_data_member): Store the non-static data members
on the side in class_decl::priv::non_static_data_members_.
(equals): In the overload for class_decl, do not take in account
static data members when running the comparison.
* tests/data/test-diff-dwarf/test7-report.txt: Adjust.
* tests/data/test-diff-filter/test12-report.txt: Adjust.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Add a --suppr short alias to the --suppressions option of abidiff
* tools/abidiff.cc (display_usage): Add a help string for the new
--suppr option.
(parse_command_line): Support the --suppr option which is an alias
for --suppressions.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Enable large file support
* configure.ac: Call the AC_SYS_LARGEFILE autoconf macro.
* config.h.in: Update.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Do not build zip archive support by default
* configure.ac: By default, unconditionally disable the
zip-archive support.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Put the man pages of the binaries in section 1
* doc/manuals/Makefile.am(section1_manpages, section7_manpages):
Two new variables to contain the man page names per section.
(manpages): Set this variable to $section1_manpages and $section7_manpages.
(install-man-and-info-doc): In this rule, create the destination
directories for section 1 and 7 and copy the right man pages in
their right directory.
* doc/manuals/conf.py (man_pages): Generate the binary man pages
into section 1 and the libabigail man page into section 7.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Sort deleted/added variables and symbols before emitting report
* src/abg-comparison.cc (sort_string_var_ptr_map)
(sort_string_elf_symbol_map): Define new static functions.
(var_comp, elf_symbol_comp): Define new comparison functors.
(corpus_diff::report): Sort the deleted variables, added
variables, deleted function symbols, added function symbols,
deleted variable symbols, and added variable symbols before
walking them to emit reports.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Remove useless white space
* src/abg-comparison.cc (sort_string_parm_map): Remove trailing
white space from comment.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Bug 18580 - abidw ignores --out-file
* tools/abidw.cc (main): Take the argument of --out-file into
account when emitting the serialized form of the ABI.
2015-06-23 Dodji Seketeli <dodji@redhat.com>
Fix a thinko in the comparison code
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Ensure that when a
member function is wrongly considered as being added, then either
the new member function doesn't have a symbol name (linkage name)
or it has one, and it was already present in the first version of
the binary.
# Veuillez saisir le message de validation pour vos
modifications. Les lignes # commençant par '#' seront ignorées, et
un message vide abandonne la validation. # Sur la branche
fix-master # Votre branche est à jour avec 'origin/master'. # #
Modifications qui seront validées : # modified:
src/abg-comparison.cc # # Modifications qui ne seront pas validées
: # modified: tools/abidw.cc # # Fichiers non suivis: # abidw.abi
# build/ # depcomp # missing # patch-edited.txt # patch.txt #
prtests/ # test-driver # # ------------------------ >8
------------------------ # Ne touchez pas à la ligne ci-dessus #
Tout se qui suit sera éliminé.
diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index 14208f5..ef7c6c9 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -7419,8 +7419,8 @@ class_diff::ensure_lookup_tables_populated(void) const
inserted_member_fns().begin();
i != inserted_member_fns().end();
++i)
- if (i->second->get_symbol()
- && f->lookup_function_symbol(i->second->get_symbol()->get_name(),
+ if (!i->second->get_symbol()
+ || f->lookup_function_symbol(i->second->get_symbol()->get_name(),
i->second->get_symbol()->get_version().str()))
to_delete.push_back(i->first);
2015-06-07 Dodji Seketeli <dodji@redhat.com>
Build libabigail tests with position-independent code
* tests/Makefile.am: Add -fPIC to the compile flags.
2015-06-07 Dodji Seketeli <dodji@redhat.com>
Build libabigail tools as position-independent code
* tools/Makefile.am: Compile the binaries here with -fPIC. Note
that the library libabigail.la is built with libtool which already
takes care of this, so no need to worry about this for
libabigail.la.
2015-06-07 Dodji Seketeli <dodji@redhat.com>
Update ChangeLog file
* ChangeLog: Update this automatically by typing make
update-changelog.
2015-06-07 Dodji Seketeli <dodji@redhat.com>
Avoid infinite loop in elf_symbol::get_alias_from_name()
* src/abg-ir.cc (elf_symbol::get_alias_from_name)
(elf_symbol::get_alias_which_equals): Test for the next alias
pointing to the main symbol, in the loop exit condition.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Change the linkage name only when necessary
* include/abg-ir.h (elf_symbol::get_alias_from_name): Declare new
member function.
* src/abg-ir.cc (elf_symbol::get_alias_from_name): Define it.
* src/abg-dwarf-reader.cc (build_var_decl, build_function_decl):
Once the linkage name is supposed to contain the value of the
DW_AT_linkage_name attribute, set it the name of the underlying
symbol only if value of DW_At_linkage_name is missing or different
from the names of all the aliases of the underlying symbol.
* tests/data/test-read-dwarf/test2.so.abi: Adjust.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Various white space cleanups
* include/abg-comparison.h: Remove various useless vertical white
spaces.
* tests/test-diff-dwarf.cc (in_out_spec): Fix indentation of some
entries.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Fix various comments here and there
* src/abg-comparison.cc
(diff_context::set_or_get_canonical_diff_for, compute_diff)
(redundancy_marking_visitor::visit_begin): Fix comment in these
functions.
* src/abg-ir.cc (elf_symbol::is_variable): Likewise.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Add missing apidoc to elf_symbol type
* src/abg-ir.cc (elf_symbol::{elf_symbol, get_name, set_name,
get_type, set_type, get_binding, set_binding, get_version,
is_defined, is_public, is_function, is_variable}): Add missing
apidoc to these member functions.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Cleanup logic in class_diff::ensure_lookup_tables_populated()
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Remove the code that
tries to lookup allegedly added functions from the set of deleted
ones, by using the pretty printed name of the function. Handling
the case of a function decl not correctly tied to it symbol is
handled my generically a bit later in this function.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Report possible changes in the set of aliases of a symbol.
* src/abg-comparison.cc (function_decl_diff::report): Report
a change in the aliases of the symbols of a function; note that
everything else but have stayed equal in the function.
2015-06-04 Dodji Seketeli <dodji@redhat.com>
Report vtable changes in top-level function change reports
* src/abg-comparison.cc (function_decl_diff::report): Report about
virtual-ness and vtable offset changes.
* tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt:
New test input file.
* tests/data/test-diff-dwarf/test28-vtable-changes-v{0,1}.o: New
test input binaries.
* tests/data/test-diff-dwarf/test28-vtable-changes-v{0,1}.cc:
Source code of the input binaries above.
* tests/data/Makefile.am: Add the new test input above to source
distribution.
* tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
above to the list of input this test harness has to run over.
2015-06-03 Dodji Seketeli <dodji@redhat.com>
Support new 'accessed_through' suppression property
* include/abg-comparison.h (enum type_suppression::reach_kind):
Define new enum.
(type_suppression::{get_consider_reach_kind,
set_consider_reach_kind, get_reach_kind,
mark_last_diff_visited_per_class_of_equivalence,
clear_last_diffs_visited_per_class_of_equivalence,
get_last_visited_diff_of_class_of_equivalence}): Declare new
member functions.
* src/abg-comparison.cc (diff_has_ancestor_filtered_out)
(read_suppression_reach_kind): Define static function.
(type_suppression::priv::{consider_reach_kind_, reach_kind_}):
Define new data members.
(type_suppression::priv::priv): Take a new reach_kind parameter.
(type_suppression::type_suppression): Adjust to new prototype of
priv constructor.
(type_suppression::{get_consider_reach_kind,
set_consider_reach_kind, get_reach_kind, set_reach_kind}): Define
new member functions.
(type_suppression::suppresses_diff): Interpret the result of
type_suppression::get_reach_kind() to determine if the suppression
specification suppresses a given diff node.
(read_type_suppression): Support reading the content of the
"accessed_through" property.
(diff_context::priv::last_visited_diff_node_): New data member.
(diff_context::{mark_last_diff_visited_per_class_of_equivalence,
clear_last_diffs_visited_per_class_of_equivalence,
get_last_visited_diff_of_class_of_equivalence}): Define new data
members.
(redundancy_marking_visitor::visit_begin): So if the current diff
node has already been visited, but if the previously visited node
has been filtered out, then do not mark this node as being
redundant. And mark the current diff node as being the last
visited one in its class of equivalence.
(categorize_redundancy): Clear the map of diff nodes visited per
class of equivalence.
* doc/manuals/libabigail-concepts.rst: Document the new
'accessed_through' property.
* tests/data/test-diff-suppr/test13-suppr-through-pointer-0.suppr:
New test input data.
* tests/data/test-diff-suppr/test13-suppr-through-pointer-report-{0,1}.txt:
Likewise.
* tests/data/test-diff-suppr/libtest13-suppr-through-pointer-v{0,1}.so:
New test input binaries.
* tests/data/test-diff-suppr/test13-suppr-through-pointer-v{0,1}.cc:
Source code of the test input binaries above.
* tests/data/test-diff-suppr/test14-suppr-non-redundant-0.suppr:
New test input data.
* tests/data/test-diff-suppr/test14-suppr-non-redundant-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test14-suppr-non-redundant-v{0,1}.o:
New test input binaries.
* tests/data/test-diff-suppr/test14-suppr-non-redundant-v{0,1}.cc:
Source code of the binaries above.
2015-06-03 Dodji Seketeli <dodji@redhat.com>
Fix redundancy marking for change of types used directly
* include/abg-comparison.h (pointer_map): Make this be a map of
{size_t, size_t} pairs, rather than {size_t, bool}, so that each
pointer in the map can be associated to another one.
(diff_context::diff_has_been_visited): Return the pointer to the
first diff node of the equivalence class that has been visited.
* src/abg-comparison.cc (is_pointer_diff, is_reference_diff)
(is_reference_or_pointer_diff, is_fn_parm_diff, is_base_diff)
(is_child_node_of_function_parm_diff, is_child_node_of_base_diff):
Define new static functions.
(diff_context::diff_has_been_visited): Return the pointer to the
first diff node of the equivalence class that has been visited.
(diff_context::mark_diff_as_visited): Save the pointer to the
first diff node of a given class of equivalence that has been
visited.
(redundancy_marking_visitor::visit_begin): If a diff node is a
child node of a function parameter diff or base diff node and if
it's not a pointer or reference diff node, then do not mark it as
redundant. Also, make sure to not mark the first diff node of a
given class of equivalence that has been visited, as redundant;
only the other subsequent nodes should be marked redundant; we
were hitting this case because of an optimization that makes
equivalent class diff nodes to share their private (pimpl) data.
* tests/data/test-diff-filter/test29-finer-redundancy-marking-v{0,1}.o:
New test input binaries.
* tests/data/test-diff-filter/test29-finer-redundancy-marking-v{0,1}.cc:
Source code of the new test input binaries above.
* tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.txt:
New test input.
* tests/data/Makefile.am: Add the new test material above to the
source distribution.
* tests/test-diff-filter.cc (in_out_specs): Make this test harness
run over the additional test input above.
* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
2015-06-02 Dodji Seketeli <dodji@redhat.com>
Fix detection of local changes in base classes
* abg-ir.cc (equals): In the overload of class_decl::base_spec, if
the underlying class carries changes, then do not flag these
changes as local for the class_decl::base_spec.
* tests/data/test-diff-dwarf/test27-local-base-diff-v{0,1}.o: New
test input binaries.
* tests/data/test-diff-dwarf/test27-local-base-diff-v{0,1}.cc: Source
code for the test input binaries above.
* tests/data/test-diff-dwarf/test27-local-base-diff-report.txt:
New test input.
* tests/data/Makefile.am: Add the test inputs above to source
distribution.
2015-06-02 Dodji Seketeli <dodji@redhat.com>
Fix symbols comparison
* include/abg-ir.h (elf_symbol_wptr): New typedef.
(elf_symbol): Make the constructors and assignment operator
private. The type can neither be copied nor created with the new
operator.
(elf_symbol::create): New static member function.
(elf_symbol::{get_main_symbol, get_next_alias, add_alias}):
Adjust.
( compute_aliases_for_elf_symbol): Likewise.
(elf_symbol::operator=): Make this private.
(elf_symbol::get_alias_which_equals): Declare new member function.
* src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
Adjust.
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Adjust.
* src/abg-corpus.cc
(corpus::priv::build_unreferenced_symbols_tables): Likewise.
* include/abg-dwarf-reader.h (lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf): Adjust.
* src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_elf_hash_tab)
(lookup_symbol_from_symtab, lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf)
(lookup_public_variable_symbol_from_elf): Adjust.
(read_context::lookup_elf_symbol_from_index): Likewise.
(read_context::lookup_elf_fn_symbol_from_address): Likewise.
(read_context::lookup_elf_var_symbol_from_address): Likewise.
(read_context::lookup_public_function_symbol_from_elf): Likewise.
(read_context::lookup_public_variable_symbol_from_elf): Likewise.
(read_context::load_symbol_maps): Likewise.
(build_var_decl, build_function_decl): Likewise.
* src/abg-ir.cc (elf_symbol::priv::{main_symbol_, next_alias_}):
Change the type of these from elf_symbol* to elf_symbol_wptr.
(elf_symbol::priv::priv): Adjust.
(elf_symbol::{create, get_alias_which_equals}): Define new functions.
(textually_equals): Likewise.
(elf_symbol::{get_main_symbol, is_main_symbol, get_next_alias,
add_alias}): Adjust to return or take elf_symbol_sptr type, rather
than a elf_symbol* one.
(elf_symbol::{get_aliases_id_string, does_alias}): Adjust.
(compute_alias_for_elf_symbol): Likewise.
(elf_symbol::operator==): Two symbols A and B are now equal if A
has at least one alias that is textually equal to B.
(equals): In the overload for function_decls, in the part where we
compare the decl_base part of the functions without considering
their decl names, we now also omit considering their linkage
names, because we compared they symbols before.
* tools/abisym.cc (main): Adjust.
* tests/data/test-diff-dwarf/test12-report.txt: Adjust.
* tests/data/test-diff-dwarf/test12-report.txt: Adjust.
* tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test8-report.txt: Adjust.
* tests/data/test-diff-filter/test10-report.txt: Adjust.
* tests/data/test-diff-filter/test13-report.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
* tests/data/test-diff-filter/test20-inline-report-0.txt: Adjust.
* tests/data/test-diff-filter/test20-inline-report-1.txt: Adjust.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
2015-04-22 Dodji Seketeli <dodji@redhat.com>
Support specifying data member insertion in suppressions
* include/abg-comparison.h (type_suppression::insertion_range):
Declare new type.
(type_suppression::insertion_ranges): Declare new typedef.
(type_suppression::{s,g}et_data_member_insertion_ranges): Declare
new member functions.
(is_integer_boundary, is_fn_call_expr_boundary): Declare new
functions.
(type_suppression::insertion_range::{boundary, integer_boundary,
fn_call_expr_boundary}): Define new types.
* src/abg-comparison.cc:
(struct type_suppression::insertion_range::priv): New type.
(type_suppression::insertion_range::{insertion_range, begin,
end}): Define new member functions.
(type_suppression::priv::insertion_ranges_): Add data member.
(type_suppression::{s,g}et_data_member_insertion_ranges): Define
new member functions.
(type_suppression::insertion_range::boundary::priv): Define new
type.
(type_suppression::insertion_range::boundary::{boundary,
~boundary}): Define new member functions.
(type_suppression::insertion_range::integer_boundary::priv):
Define new type.
(type_suppression::insertion_range::integer_boundary::{integer_boundary,
as_integer, operator int, ~integer_boundary}): Define member
functions.
(type_suppression::insertion_range::fn_call_expr_boundary::priv):
Define new type.
(type_suppression::insertion_range::fn_call_expr_boundary::{fn_call_expr_boundary,
as_function_call_expr, operator ini::function_call_expr_sptr}):
Define new member functions.
(type_suppression::insertion_range::{create_integer_boundary,
type_suppression::insertion_range::create_fn_call_expr_boundary,
type_suppression::insertion_range::eval_boundary}): Define new
member functions.
(is_integer_boundary, is_fn_call_expr_boundary): Define new
functions.
(read_type_suppression, read_function_suppression)
(read_variable_suppression): Support the new kinds of
property-related types. Aslo, in read_type_suppression, support
the new properties has_data_member_inserted_at,
has_data_member_inserted_between and
has_data_members_inserted_between.
(type_suppression::suppresses_diff): If we are looking at a type
diff node that has inserted data members, evaluate the insertion
ranges of the current type_suppression and see if they match the
inserted data members.
* include/abg-ini.h (property, simple_property, property_value)
(string_property_value, tuple_property_value, function_call_expr):
Declare new types.
(property_sptr, property_value_sptr, string_property_value_sptr)
(tuple_property_value_sptr): Declare new typedefs.
(is_string_property_value, is_tuple_property_value)
(is_simple_property, is_tuple_property, read_function_call_expr):
Declare new functions.
* src/abg-ini.cc (char_is_white_space, char_is_comment_start)
(char_is_delimiter, char_is_property_value_char)
(char_is_section_name_char, char_is_property_name_char)
(char_is_comment_start, char_is_white_space)
(remove_trailing_white_spaces, is_string_property_value)
(is_tuple_property_value, is_simple_property, is_tuple_property)
(write_property_value, char_is_function_name_char)
(char_is_function_argument_char): Define new functions.
(property::priv, tuple_property_value::priv)
(simple_property::priv, tuple_property::priv): Define new types.
(property::{property, get_name, set_name, ~property}): Define new
member functions.
(struct property_value::priv): Define new type.
(property_value::{property_value, get_kind, operator const
string&(), ~property_value}): Define new member functions.
(struct string_property_value::priv): Define new type.
(string_property_value::{string_property_value, set_content,
as_string, operator string()}, ~string_property_value): Define new
member functions.
(tuple_property_value::{tuple_property_value, get_value_items,
~tuple_property_value, as_string}): Likewise.
(simple_property::{simple_property, get_value, set_value,
~simple_property}): Likewise.
(tuple_property::{tuple_property, set_value, get_value}):
Likewise.
(config::section::find_property): Adjust return type.
(read_context::{char_is_delimiter, char_is_property_value_char,
char_is_section_name_char, char_is_property_name_char,
char_is_comment_start, char_is_white_space}): Remove these from
here as they got moved them to be non-member functions above.
(read_context::read_property_value): Return a property_value_sptr
and do not take any parameter anymore.
(read_context::{read_string_property_value,
read_tuple_property_value, read_function_name,
read_function_argument, read_function_call_expr}): Define new
member functions.
(read_context::read_property): Adjust return type. Also, change to read
the different new kinds of properties values.
(function_call_expr::priv): Define new type.
(function_call_expr::{function_call_expr, get_name,
get_arguments}): New member functions.
(read_context::read_section): Adjust.
(write_property, write_section): Adjust.
* tests/data/test-diff-suppr/libtest{11,12}-add-data-member-v{0,1}.so:
New test input binaries.
* tests/data/test-diff-suppr/test{11,12}-add-data-member-{0,1}.suppr:
New input suppression files.
* tests/data/test-diff-suppr/test11-add-data-member-{2,3,4}.suppr:
Add new test input files.
* tests/data/test-diff-suppr/test{11,12}-add-data-member-report-{0,1}.txt:
New reference output files.
* tests/data/test-diff-suppr/test12-add-data-member-report-2.txt:
Likewise.
* tests/data/test-diff-suppr/test{11,12}-add-data-member-v{0,1}.cc:
Source code for the new binaries above.
* tests/test-diff-suppr.cc (in_out_specs): Add new test inputs.
* tests/data/Makefile.am: Add the new test related files above to
source distribution.
* doc/manuals/libabigail-concepts.rst: Document the new properties
has_data_member_inserted_at, has_data_member_inserted_between and
has_data_members_inserted_between.
2015-05-24 Dodji Seketeli <dodji@redhat.com>
Make indexes of function parameters start at 1
* src/abg-ir.cc (function_type::function_type): Starts the index
of the parameters at 1, unless the firs parameter is an artificial
one, in which case it starts at 0.
* tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-dwarf/test1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test10-report.txt: Adjust.
* tests/data/test-diff-dwarf/test11-report.txt: Adjust.
* tests/data/test-diff-dwarf/test13-report.txt: Adjust.
* tests/data/test-diff-dwarf/test15-enum-report.txt: Adjust.
* tests/data/test-diff-dwarf/test2-report.txt: Adjust.
* tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt: Adjust.
* tests/data/test-diff-dwarf/test4-report.txt: Adjust.
* tests/data/test-diff-dwarf/test6-report.txt: Adjust.
* tests/data/test-diff-dwarf/test7-report.txt: Adjust.
* tests/data/test-diff-dwarf/test8-report.txt: Adjust.
* tests/data/test-diff-filter/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test01-report.txt: Adjust.
* tests/data/test-diff-filter/test1-report.txt: Adjust.
* tests/data/test-diff-filter/test10-report.txt: Adjust.
* tests/data/test-diff-filter/test13-report.txt: Adjust.
* tests/data/test-diff-filter/test14-0-report.txt: Adjust.
* tests/data/test-diff-filter/test14-1-report.txt: Adjust.
* tests/data/test-diff-filter/test16-report-2.txt: Adjust.
* tests/data/test-diff-filter/test16-report.txt: Adjust.
* tests/data/test-diff-filter/test17-0-report.txt: Adjust.
* tests/data/test-diff-filter/test17-1-report.txt: Adjust.
* tests/data/test-diff-filter/test18-report.txt: Adjust.
* tests/data/test-diff-filter/test19-enum-report-1.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
* tests/data/test-diff-filter/test22-compatible-fns-report-0.txt: Adjust.
* tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt: Adjust.
* tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Adjust.
* tests/data/test-diff-filter/test25-cyclic-type-report-1.txt: Adjust.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Adjust.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Adjust.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Adjust.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Adjust.
* tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Adjust.
* tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Adjust.
* tests/data/test-diff-filter/test3-report.txt: Adjust.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
* tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Adjust.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Adjust.
* tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Adjust.
* tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Adjust.
* tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Adjust.
* tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Adjust.
* tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Adjust.
* tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Adjust.
* tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Adjust.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Adjust.
2015-05-22 Dodji Seketeli <dodji@redhat.com>
Some wording fixes to doc/manuals/libabigail-concepts.rst
* doc/manuals/libabigail-concepts.rst: Some light wording fixes.
2015-05-24 Dodji Seketeli <dodji@redhat.com>
Type read from DWARF don't have alignment information
* src/abg-dwarf-reader.cc (build_type_decl)
(build_class_type_and_add_to_ir, build_pointer_type_def)
(build_reference_type, build_function_decl): Set the alignment for
native types, class, reference and function type to zero,
effectively meaning that they don't have alignment information.
* src/abg-hash.cc (var_decl::hash::operator): Take the hash value
of the data member context in account when computing the hash
value of a given data member.
* tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt:
Adjust.
* tests/data/test-diff-dwarf/test10-report.txt: Likewise.
* tests/data/test-diff-dwarf/test13-report.txt: Likewise.
* tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt: Likewise.
* tests/data/test-diff-dwarf/test8-report.txt: Likewise.
* tests/data/test-diff-dwarf/test9-report.txt: Likewise.
* tests/data/test-diff-filter/test13-report.txt: Likewise.
* tests/data/test-diff-filter/test6-report.txt: Likewise.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Likewise.
* tests/data/test-read-dwarf/test0.abi: Likewise.
* tests/data/test-read-dwarf/test1.abi: Likewise.
* tests/data/test-read-dwarf/test2.so.abi: Likewise.
* tests/data/test-read-dwarf/test3.so.abi: Likewise.
* tests/data/test-read-dwarf/test4.so.abi: Likewise.
* tests/data/test-read-dwarf/test5.o.abi: Likewise.
* tests/data/test-read-dwarf/test6.so.abi: Likewise.
* tests/data/test-read-dwarf/test7.so.abi: Likewise.
* tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Likewise.
2015-05-06 Dodji Seketeli <dodji@redhat.com>
Better name ID function parameters
* src/abg-ir.cc (function_decl::parameter::get_name_id): Make this
be "parameter-<index>".
2015-05-06 Dodji Seketeli <dodji@redhat.com>
Better detection of parameter sub-type changes
* include/abg-fwd.h (type_has_sub_type_changes): Declare new
function.
* src/abg-ir.cc (type_has_sub_type_changes): Define it.
* src/abg-comparison.cc (fn_parm_diff::report): Use the new
function type_has_sub_type_changes() instead of just looking at
name changes.
* tests/data/test-diff-dwarf/test4-report.txt: Adjust this
reference test output.
2015-05-06 Dodji Seketeli <dodji@redhat.com>
Fix a potential crash when comparing variadic parameters again
* src/abg-comparison.cc (redundancy_marking_visitor::visit_begin):
Avoid flagging diffs of variadic parameter *types* as redundant as
well.
2015-05-06 Dodji Seketeli <dodji@redhat.com>
Add debugging function for function parameters
* include/abg-ir.h
(function_decl::parameter::get_pretty_representation): Declare new
virtual member function.
* src/abg-ir.cc
(function_decl::parameter::get_pretty_representation): Define it.
2015-05-06 Dodji Seketeli <dodji@redhat.com>
Add comments
* src/abg-dwarf-reader.cc (build_function_decl): Add comments when
building the function parameters.
2015-05-06 Dodji Seketeli <dodji@redhat.com>
Add a debugging function for type_or_decl_base*
* include/abg-fwd.h (get_pretty_representation): Declare new
overload for type_or_decl_base*.
* src/abg-ir.cc (get_pretty_representation): Define it and express
the previous overload for type_or_decl_base_sptr in terms of this
new one.
2015-05-05 Dodji Seketeli <dodji@redhat.com>
Return a reference to smart pointer for the void type node
* src/abg-ir.h (type_decl::get_void_type_decl): Return a reference
to the smart pointer initially returned.
* src/abg-ir.cc (type_decl::get_void_type_decl): Likewise.
2015-05-05 Dodji Seketeli <dodji@redhat.com>
Bug 18342 - Segmentation fault while comparing functions with variadic parameters
* include/abg-fwd.h (is_array_type): New overload for a naked
pointer.
* include/abg-ir.h (type_decl::get_variadic_parameter_type_decl): Declare new
static function.
* src/abg-ir.cc (is_array_type): Define new function overload for
naked pointers
(type_decl::get_variadic_parameter_type_decl): Define new static
function.
* src/abg-dwarf-reader.cc (build_function_decl): The type of
variadic parameter is now a special type_decl.
* include/abg-comparison.h (is_diff_of_variadic_parameter_type)
(is_diff_of_variadic_parameter): New function declarations.
* src/abg-comparison.cc (is_diff_of_variadic_parameter_type)
(is_diff_of_variadic_parameter): Define new functions.
(compute_diff): Refuse to return a NULL
diff for types. Assert that the parameters are non-NULL.
(report_size_and_alignment_changes): We are comparing arrays only
if the two parameters are arrays.
(fn_parm_diff::fn_parm_diff): Refuse that type diff for this diff
node is non empty.
(fn_parm_diff::report): Strengthen an assert. Cleanup a comment.
(redundancy_marking_visitor::visit_begin): Do not mark function
type and variadic parms diff nodes as redundant for local changes.
* tests/data/test-diff-dwarf/libtest26-added-parms-before-variadic-v{0,1}.so:
New test input binaries.
* tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt:
New test output reference.
* tests/data/test-diff-dwarf/test26-added-parms-before-variadic-v{0,1}.c:
Source code of the new test input binaries above.
* tests/data/Makefile.am: Add the new test stuff to source
distribution.
* tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs
above to the set of input to run this test harness over.
2015-04-24 Dodji Seketeli <dodji@redhat.com>
Fix archive writing support
* configure.ac: Require libzip 0.10.1 at least.
* src/abg-writer.cc (archive_write_ctxt::serialized_tus): Make
this be a list<string>, rather than a vector<string>.
(create_archive_write_context): Truncate the archive if it exists
already.
(write_translation_unit_to_archive): Do not use the deprecated
zip_add() function anymore. Rather, use zip_file_add().
* tests/test-write-read-archive.cc (main): Double check if the
translation unit we read is empty or not.
2015-04-22 Dodji Seketeli <dodji@redhat.com>
Use a better wording for the COPYING file
* COPYING: Update to a more complete description.
2015-04-20 Dodji Seketeli <dodji@redhat.com>
Update licence texts
* COPYING: Of course we know the licence we want to use now :-)
* COPYING-GPLV3: Add the text of GPLv3.
* Makefile.am: Add the file COPYING-GPLV3 above to source
distribution.
2015-04-15 Dodji Seketeli <dodji@redhat.com>
18252 - Added parameters are not properly sorted
* src/abg-comparison.cc (sort_string_parm_map): Define new static
function.
(struct parm_comp): Define new type.
(function_type_diff::priv::{sorted_deleted_parms_,
sorted_added_parms_}): New data members that hold sorted
deleted/added parameters.
(function_type_diff::ensure_lookup_tables_populated): Initialize
the two new data members above.
(function_type_diff::report): For the report of parameters that
got added/removed, use the sorted set of added/removed parameters
above.
* tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt:
New test input.
* tests/data/test-diff-dwarf/libtest24-added-fn-parms-v{0,1}.so:
Likewise.
* tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt:
Likewise.
* tests/data/test-diff-dwarf/libtest25-removed-fn-parms-v{0,1}.so:
Likewise.
* tests/data/test-diff-dwarf/test24-added-fn-parms-v{0,1}.c:
Likewise.
* tests/data/test-diff-dwarf/test25-removed-fn-parms-v{0,1}.c:
Likewise.
* tests/data/Makefile.am: Add the new test material above to the
source distribution.
2015-04-14 Dodji Seketeli <dodji@redhat.com>
Misc reporting fixes/improvements
* src/abg-comparison.cc (distinct_diff::report): Remove spurious
vertical space before reporting size and alignment changes here.
(represent): In the variables/data member overload, report type
changes first. Then the other changes.
(report_size_and_alignment_changes): Make this report array size
changes too. Also, make some small adjustments about how type
size/alignment changes are introduced.
(array_diff::report): Now that report_size_and_alignment_changes()
supports size change reporting, just use that function rather than
doing it here.
(corpus_diff::report): Consistently add a space between each
changed function report. Prefix changed variables with a [C],
just like for functions.
* tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
* tests/data/test-abicompat/test5-fn-changed-report-0.txt: Likewise.
* tests/data/test-abicompat/test6-var-changed-report-0.txt: Likewise.
* tests/data/test-abidiff/test-qual-type0-report.txt: Likewise.
* tests/data/test-abidiff/test-struct0-report.txt: Likewise.
* tests/data/test-abidiff/test-struct1-report.txt: Likewise.
* tests/data/test-abidiff/test-var0-report.txt: Likewise.
* tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test0-report.txt: Likewise.
* tests/data/test-diff-dwarf/test1-report.txt: Likewise.
* tests/data/test-diff-dwarf/test10-report.txt: Likewise.
* tests/data/test-diff-dwarf/test11-report.txt: Likewise.
* tests/data/test-diff-dwarf/test13-report.txt: Likewise.
* tests/data/test-diff-dwarf/test15-enum-report.txt: Likewise.
* tests/data/test-diff-dwarf/test2-report.txt: Likewise.
* tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test3-report.txt: Likewise.
* tests/data/test-diff-dwarf/test6-report.txt: Likewise.
* tests/data/test-diff-dwarf/test7-report.txt: Likewise.
* tests/data/test-diff-dwarf/test8-report.txt: Likewise.
* tests/data/test-diff-dwarf/test9-report.txt: Likewise.
* tests/data/test-diff-filter/test0-report.txt: Likewise.
* tests/data/test-diff-filter/test01-report.txt: Likewise.
* tests/data/test-diff-filter/test1-report.txt: Likewise.
* tests/data/test-diff-filter/test10-report.txt: Likewise.
* tests/data/test-diff-filter/test11-report.txt: Likewise.
* tests/data/test-diff-filter/test13-report.txt: Likewise.
* tests/data/test-diff-filter/test14-0-report.txt: Likewise.
* tests/data/test-diff-filter/test14-1-report.txt: Likewise.
* tests/data/test-diff-filter/test15-0-report.txt: Likewise.
* tests/data/test-diff-filter/test15-1-report.txt: Likewise.
* tests/data/test-diff-filter/test16-report-2.txt: Likewise.
* tests/data/test-diff-filter/test16-report.txt: Likewise.
* tests/data/test-diff-filter/test17-0-report.txt: Likewise.
* tests/data/test-diff-filter/test17-1-report.txt: Likewise.
* tests/data/test-diff-filter/test18-report.txt: Likewise.
* tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
* tests/data/test-diff-filter/test2-report.txt: Likewise.
* tests/data/test-diff-filter/test20-inline-report-1.txt: Likewise.
* tests/data/test-diff-filter/test21-compatible-vars-report-0.txt: Likewise.
* tests/data/test-diff-filter/test22-compatible-fns-report-0.txt: Likewise.
* tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt: Likewise.
* tests/data/test-diff-filter/test24-compatible-vars-report-1.txt: Likewise.
* tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Likewise.
* tests/data/test-diff-filter/test25-cyclic-type-report-1.txt: Likewise.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Likewise.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Likewise.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise.
* tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
* tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
* tests/data/test-diff-filter/test3-report.txt: Likewise.
* tests/data/test-diff-filter/test6-report.txt: Likewise.
* tests/data/test-diff-filter/test9-report.txt: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Likewise.
* tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-8.txt: Likewise.
* tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Likewise.
2015-04-10 Dodji Seketeli <dodji@redhat.com>
Make abidiff and abicompat return meaningful exit codes
* doc/manuals/abicompat.rst: Update documentation for abicompat
exit codes.
* doc/manuals/abidiff.rst: Likewise for abidiff exit codes.
* include/abg-tools-utils.h (enum abidiff_status): Declare new
enum.
(operator{|,&,|=}): Declare new operators for the new enum
abidiff_status.
(abidiff_status_has_error, abidiff_status_has_abi_change)
(abidiff_status_has_incompatible_abi_change): Declare new
functions.
* src/abg-tools-utils.cc (operator{|,&,|=}): Define these new
operators.
(abidiff_status_has_error, abidiff_status_has_abi_change)
(abidiff_status_has_incompatible_abi_change): Define new
functions.
* tests/test-diff-filter.cc (main): Adjust for the new exit code
of abidiff.
* tests/test-diff-suppr.cc (main): Likewise.
* tests/test-abicompat.cc (main): Likewise.
* tools/abicompat.cc (enum abicompat_status): Remove.
(operator{|,&,|=}): Remove these operators for enum
abicompat_status.
(perform_compat_check_in_normal_mode)
(perform_compat_check_in_weak_mode): Return abidiff_status instead
of abicompat_status. Adjust therefore.
(main): Adjust to return abidiff_status now, instead of a just
zero for all non-error cases.
* tools/abidiff.cc (main): Likewise.
2015-04-01 Dodji Seketeli <dodji@redhat.com>
Add support for abicompat weak mode
* include/abg-fwd.h (class type_or_decl_base): Forward declare
this.
(is_decl, is_type, is_function_type, get_name, get_type_name)
(get_function_type_name, get_pretty_representation)
(lookup_function_type_in_corpus, lookup_type_in_translation_unit)
(lookup_function_type_in_translation_unit)
(synthesize_function_type_from_translation_unit)
(hash_type_or_decl): New function declarations.
* src/abg-corpus.cc (lookup_type_in_corpus)
(lookup_function_type_in_corpus): Define new functions.
* include/abg-ir.h
(translation_unit::lookup_function_type_in_translation_unit):
Declare new friend function.
(class type_or_decl_base): Declare this.
(operator==(const type_or_decl_base&, const type_or_decl_base&)):
Declare new operator.
(operator==(const type_or_decl_base_sptr&, const
type_or_decl_base_sptr&)): Likewise.
(class {decl_base, type_base}): Make these class inherit
type_or_decl_base.
(decl_base::get_member_scopes): New const overload.
(bool operator==(const function_decl::parameter_sptr&,
const function_decl::parameter_sptr&)): New operator.
(function_type::get_parameters): Remove the non-const overload.
(function_type::get_pretty_representation): Declare new member
function.
(method_type::get_pretty_representation): Likewise.
* src/abg-ir.cc (bool operator==(const type_or_decl_base&, const
type_or_decl_base&)): Define new equality operator.
(bool operator==(const type_or_decl_base_sptr&, const
type_or_decl_base_sptr&)): Likewise.
(strip_typedef): Do not expect canonicalized types anymore. Now
the system accepts (and expects) canonicalized types in certain
cases. For instance, non-complete types and aggregated types that
contain non-complete sub-types.
(get_name, get_function_type_name, get_type_name)
(get_pretty_representation, is_decl, is_type, is_function_type)
(lookup_function_type_in_translation_unit)
(synthesize_function_type_from_translation_unit)
(lookup_type_in_scope, lookup_type_in_translation_unit): Define
new functions or new overloads.
(bool operator==(const function_decl::parameter_sptr&,
const function_decl::parameter_sptr& r)): Define
new operator.
(function_type::get_parameters): Remove non-const overload.
(function_type::get_pretty_representation): Define new function.
(function_type::traverse): Adjust.
(method_type::get_pretty_representation): Likewise.
(function_decl::get_pretty_representation): Avoid emitting the
type of cdtors.
(hash_type_or_decl): Define new function.
* include/abg-dwarf-reader.h (create_read_context)
(read_corpus_from_elf): Take a new 'read_all_types' flag.
* src/abg-dwarf-reader.cc (read_context::load_all_types_): New
flag.
(read_context::read_context): Initialize it.
(read_context::canonical_types_scheduled): If some types still
have non-canonicalized sub-types, then do not canonicalize them.
(read_context::load_all_types): New member functions.
(build_function_decl): Do not represent void return type like
empty type anymore, rather, represent it like a void type node.
(build_ir_node_from_die): When asked, load all types
including those that are not reachable from an exported
declaration.
(create_read_context, read_corpus_from_elf): Take a new
'load_all_types' flag and honour it.
* src/abg-reader.cc (read_context::type_is_from_translation_unit):
Support looking up function types in the current translation unit,
now that we now how to lookup function types.
* include/abg-comparison.h (diff_context::{has_diff_for, add_diff,
set_canonical_diff_for, set_or_get_canonical_diff_for,
get_canonical_diff_for}): Make these take instances of
type_or_decl_base_sptr, instead of decl_base_sptr.
(diff::diff): Likewise.
(diff::{first_subject, second_subject}): Make these return
type_or_decl_base_sptr instead of decl_base_sptr.
(type_diff_base::type_diff_base): Make these take instances of
type_or_decl_base_sptr instead of decl_base_sptr.
(distinct_diff::distinct_diff): Likewise.
(distinct_diff::{first, second}): Make these return
type_or_decl_base_sptr instead of decl_base_sptr.
(distinct_diff::entities_are_of_distinct_kinds): Make these take
instances of type_or_decl_base_sptr instead of decl_base_sptr.
(class function_type_diff): Create this new type. It's a
factorization of the function_decl_diff type.
* src/abg-comparison.cc ():
* src/abg-comp-filter.cc ({harmless, harmful}_filter::visit):
Adjust as diff::{first,second}_subject() now returns a
type_or_decl_base_sptr, no more a decl_base_sptr.
(decls_type, decls_diff_map_type): Remove these typedefs and replace it with ...
(types_or_decls_type, types_or_decls_diff_map_type): ... these.
(struct {decls_hash, decls_equals): Remove these type sand replace them with ...
(struct {types_or_decls_hash, types_or_decls_equals}): ... these.
({type_suppression, variable_suppression}::suppresses_diff):
Adjust.
(diff_context::priv::decls_diff_map): Replace this with ...
(diff_context::priv::types_or_decls_diff_map): ... this.
(diff_context::{has_diff_for, add_diff, get_canonical_diff_for,
set_canonical_diff_for, set_or_get_canonical_diff_for}): Take
type_or_decl_base_sptr instead of decl_base_sptr.
(diff::priv::{first, second}_subject): Make the type of these be
type_or_decl_base_sptr, no more decl_base_sptr.
(diff::priv::priv): Adjust for the subjects of the diff being of
type type_or_decl_sptr now, no more decl_base_sptr.
(diff_less_than_functor::operator()(const diff_sptr, const
diff_sptr) const): Adjust.
(diff::diff): djust for the subjects of the diff being of type
type_or_decl_sptr now, no more decl_base_sptr.
(diff::{first,second}_subject): Make the type of these be
type_or_decl_base_sptr, no more decl_base_sptr.
(report_size_and_alignment_changes): Likewise.
(type_diff_base::type_diff_base): Make the type of this be
type_or_decl_base_sptr instead of type_base_sptr.
(distinct_diff::distinct_diff): Make this take instances of
type_or_decl_base_sptr instead of decl_base_sptr.
(distinct_diff::{first, second, entities_are_of_distinct_kinds}):
Likewise.
(distinct_diff::has_changes): Simplify logic.
(distinct_diff::report): Adjust.
(compute_diff_for_types): Add an additional case to support the
new function_type.
(report_size_and_alignment_changes): Make this take instances of
type_or_decl_base_sptr instead of decl_base_sptr.
(class_diff::priv::member_type_has_changed): Return an instance of
type_or_decl_base_sptr rather than a decl_base_sptr.
(class_diff::report): Adjust.
(diff_comp::operator()(const diff&, diff&) const): Adjust.
(enum function_decl_diff::priv::Flags): Remove.
(function_decl_diff::priv::{first_fn_flags_, second_fn_flags_,
fn_flags_changes_}): Remove.
(function_decl_diff::priv::{fn_is_declared_inline_to_flag,
fn_binding_to_flag}): Remove.
(function_decl_diff::{deleted_parameter_at,
inserted_parameter_at}): Remove.
(function_decl_diff::ensure_lookup_tables_populated): Empty this.
(function_decl_diff::chain_into_hierarchy): Adjust.
(function_decl_diff::function_decl_diff): This now only takes the
subjects. It's body is now empty.
(function_decl_diff::{return_type_diff, subtype_changed_parms,
removed_parms, added_parms, type_diff}): Remove these member
functions.
(function_decl_diff::type_diff): Define new member function.
(function_decl_diff::report): Simplify logic by using the
reporting of the child type diff node.
(compute_diff): Likewise, in the overload for function_decl_sptr
simplify logic by using the child type diff object.
(function_type_diff::priv): Define new type.
(function_type_diff::{function_type_diff,
ensure_lookup_tables_populated, deleted_parameter_at,
inserted_parameter_at, finish_diff_type, first_function_type,
second_function_type, return_type_diff, subtype_changed_parms,
removed_parms, added_parms, get_pretty_representation,
has_changes, has_local_changes, report, chain_into_hierarchy}):
Define new functions.
(compute_diff): Define new overload for function_type_sptr.
* tools/abicompat.cc (options::weak_mode): New data member.
(options::options): Initialize it.
(enum abicompat_status): New enum
(abicompat_status operator|(abicompat_status, abicompat_status))
(abicompat_status& operator|=(abicompat_status &, abicompat_status))
(abicompat_status operator&(abicompat_status, abicompat_status)):
New operators to manipulate the abicompat_status enum.
(display_usage): Add help string for the new --weak-mode option.
(parse_command_line): Add the new --weak-mode command line
argument. If the tool is called with just the application and one
library then assume that we are in the weak mode.
(perform_compat_check_in_normal_mode): Define new function, factorized
from what was in the main function.
(perform_compat_check_in_weak_mode): Define new function.
(struct {fn,var}_change): Define new types.
(main): Use perform_compat_check_in_weak_mode() and
perform_compat_check_in_normal_mode().
* tools/abidiff.cc (main): Adjust.
* tools/abidw.cc: (options::load_all_types): Add new data member.
(options::options): Initialize it.
(display_usage): New help string for --load-all-types.
(parse_command_line): Support the new --load-all-types option.
(main): Adjust and honour the --load-all-types option.
* tools/abilint.cc (main): Adjust.
* doc/manuals/abicompat.rst: Update documentation for the new weak
mode. Also provide stuff that was missing from the examples
provided.
* doc/manuals/abidw.rst: Update documentation for the new
--load-all-types option.
* tests/print-diff-tree.cc (main): Adjust.
* tests/test-diff-dwarf.cc (main): Likewise.
* tests/test-read-dwarf.cc (main): Likewise.
* tests/data/test-abicompat/test0-fn-changed-app: Recompile this.
* tests/data/test-abicompat/libtest5-fn-changed-libapp-v{0,1}.so:
New new test input binaries
* tests/data/test-abicompat/test5-fn-changed-app: Likewise.
* tests/data/test-abicompat/test6-var-changed-app: Likewise.
* tests/data/test-abicompat/libtest6-var-changed-libapp-v{0,1}.so:
Likewise.
* tests/data/test-abicompat/test5-fn-changed-report-0.txt:
Reference output for one test above.
* tests/data/test-abicompat/test6-var-changed-report-0.txt:
Likewise.
* tests/data/test-abicompat/test5-fn-changed-app.cc: Source file
for a binary above.
* tests/data/test-abicompat/test5-fn-changed-libapp-v{0,1}.{h,cc}:
Likewise.
* tests/data/test-abicompat/test6-var-changed-libapp-v{0,1}.{cc,h}:
Likewise.
* tests/data/test-abicompat/test6-var-changed-app.cc: Likewise.
* tests/data/Makefile.am: Add the test related files above to the
source distribution.
* tests/test-abicompat.cc (in_out_spec): Add the new test input
above to the list of inputs to feed to this test harness.
(main): Support taking just the app and one library.
* tests/data/test-read-dwarf/test{0, 1, 2.so, 3.so, 5.o,
8-qualified-this-pointer.so,}.abi: Adjust for void type being
really emitted now, as opposed to just being an empty type.
2015-04-01 Dodji Seketeli <dodji@redhat.com>
18186 - Assertion in abigail::ir::class_decl::hash::operator()
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): When
the size of the class is provided then the class is complete, no
matter if this function called to update the class or to build it
for the first time.
2015-03-31 Sinny Kumari <sinny@redhat.com>
Check if EM_AARCH64, EM_TILEPRO and EM_TILEGX macros are defined in elf.h
* config.h.in: Generated autoheader by configure.ac
for added macros
* configure.ac: Defining HAVE_EM_AARCH64_MACRO,
HAVE_EM_TILEPRO_MACRO and HAVE_EM_TILEGX_MACRO to check
whether EM_AARCH64, EM_TILEPRO and EM_TILEGX macros are defined
in elf.h or not
* src/abg-dwarf-reader.cc (e_machine_to_string): Look for
EM_AARCH64, EM_TILEPRO and EM_TILEGX macros only
if they are defined in elf.h
2015-03-30 Dodji <dodji@ks305400.kimsufi.com>
PR libabigail/18180
* src/abg-hash.cc (class_decl::hash::operator()(const class_decl&)
const): Return zero only for class declarations that are not
resolved.
* tests/data/test-read-write/test20.xml: Fix the output to make a
class definition to reference its declaration, when there was a
forward declaration for it.
2015-03-30 Dodji Seketeli <dodji@redhat.com>
18179 - abidiff crashes on libcangjie
* include/abg-fwd.h (lookup_class_type_in_corpus)
(lookup_class_type_in_translation_unit): Declare new functions.
* src/abg-ir.cc (lookup_class_type_in_translation_unit): Define
new function.
(get_node, convert_node_to_decl): Define new specializations for
the class_decl type.
* src/abg-corpus.cc (lookup_class_type_in_corpus): Define new
function.
* src/abg-dwarf-reader.cc
(read_context::resolve_declaration_only_classes): Lookup class
types specifically.
2015-03-30 Dodji Seketeli <dodji@redhat.com>
Forgot to initialize a data member
* src/abg-reader.cc (read_context::read_context): Initialize the
new m_exported_decls_builder_ data member.
2015-03-30 Dodji Seketeli <dodji@redhat.com>
18166 - Abidiff fails with internal on Libtirpc ABI in XML format
* src/abg-reader.cc (read_context::m_exported_decls_builder_): New
data member.
(read_context::read_context): Initialize it.
(read_context::{type_is_from_translation_unit,
get_exported_decls_builder, set_exported_decls_builder,
maybe_add_fn_to_exported_decls, maybe_add_fn_to_exported_decls,
type_id_new_in_translation_unit}): New member functions.
(read_context::clear_per_translation_unit_data): Clear id->xml
node map here ...
(read_context::clear_per_corpus_data): ... not here.
(read_context::walk_xml_node_to_map_type_ids): Only walk the
sub-tree we are asked to walk.
(read_translation_unit_from_input): Cleanup.
(read_corpus_from_input): Wire populating of exported declarations
of the current corpus.
(build_function_decl, build_var_decl): Populate exported
declarations of the current corpus here.
(build_type_decl, build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def)
(build_array_type_def, build_enum_type_decl, build_type_decl)
(build_template_tparameter): Adjust assert on ID to make sure
it's the first type it's being defined in the current translation
unit.
* tests/data/test-abidiff/test-corpus0-report0.txt: New test
reference output.
* tests/data/test-abidiff/test-corpus0-v{0,1}.so.abi: New test
input.
* tests/test-abidiff.cc (specs): Add the test inputs above to the
list of inputs over which to run the test harness.
(main): Support reading corpora too, as this test harness was
reading just translation units before.
(tests/data/Makefile.am): Add test material above to source
distribution.
2015-03-19 Dodji Seketeli <dodji@redhat.com>
Update the CONTRIBUTING file
* CONTRIBUTING: How to check out the web pages.
2015-03-19 Dodji Seketeli <dodji@redhat.com>
Update website documentation
* doc/website/mainpage.txt: Update the web page.
2015-03-18 Dodji Seketeli <dodji@redhat.com>
Cleanup type canonicalizing logic
* src/abg-ir.cc (type_base::get_canonical_type_for): Cleanup the
logic here. Basically since we are not trying to cache the result
of type hashing anymore, this can be simpler.
2015-03-18 Dodji Seketeli <dodji@redhat.com>
Fix redundancy propagation on node with filtered local changes
*NOT* take in account the categories inherited from its children
nodes. That way, it's possible to know if the *local changes* of a
given node have been filtered out.
* include/abg-comparison.h (diff::{get_local_category,
add_to_local_category, add_to_local_and_inherited_categories,
remove_from_local_category, set_local_category,
is_filtered_out_wrt_non_inherited_categories,
has_local_changes_to_be_reported}): Declare new member functions.
* src/abg-comp-filter.cc ({harmless, harmful}_filter::{visit,
visit_end}): Update local category too.
* src/abg-comparison.cc (diff::priv::local_category_): Add new
data member.
(diff::priv::priv): Initialize it.
(diff::priv::is_filtered_out): Add new member function. This is
factorized out of diff::is_filtered_out().
(diff::is_filtered_out): Re-write in terms of
diff::priv::is_filtered_out().
(diff::{get_local_category, add_to_local_category,
add_to_local_and_inherited_categories, remove_from_local_category,
set_local_category, is_filtered_out_wrt_non_inherited_categories,
has_local_changes_to_be_reported}): Define new member functions.
(suppression_categorization_visitor::visit_begin): Update local
categories too.
(redundancy_marking_visitor::visit_end): If all of the children
nodes of the a diff node N are redundant and if N has filtered-out
local changes, then N is redundant too.
* tests/data/test-diff-filter/libtest28-redundant-and-filtered-children-nodes-v{1,2}.so:
New binary test inputs.
* tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-v{0,1}.cc:
Source code for the binary test inputs above.
* tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-{0,1}.txt:
New test output references.
* tests/test-diff-filter.cc (in_out_specs): Add the test inputs
above to the set of inputs this test harness has to run over.
* tests/data/Makefile.am: Add the test materials above to the
source distribution.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Various style cleanups
* src/abg-hash.cc (class_decl::hash::operator()(const class_decl&
t) const): Fix comment.
* src/abg-ir.cc (lookup_node_in_scope): Likewise.
(class_decl::add_base_specifier): Use base_spec_sptr rather than
shared_ptr<base_spec>.
(class non_canonicalized_subtype_detector): Fix comment.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Make is_global_scope() return a pointer to the global scope
* include/abg-fwd.h (is_global_scope): Return a global_scope*.
* src/abg-ir.cc (is_global_scope): Likewise.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Add a useful assert in the comparison engine
* src/abg-comparison.cc (qualified_type_diff::report): Assert that
if the qualified type diff node has changes to be reported and no
local change, then its child node must have changes to be
reported.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Fix diff report about non-static data members.
* src/abg-comparison.cc
(class_diff::priv::{get_deleted_non_static_data_members_number,
get_inserted_non_static_data_members_number}): Define new member
functions.
(class_diff::reports): Use the new functions above. Also, add
forgotten new lines where they belong.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Do not cache hash values in decl_base::get_hash
* src/abg-ir.cc (decl_base::get_hash): Do not cache the hash
value.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Do not miss early non-complete type resolution when it's possible
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): A type
that has its size defined is not non-complete. Same if it has a
method or a member type.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Delay non-complete class type resolution up to end of corpus reading
* include/abg-fwd.h (lookup_type_in_corpus): Declare new function.
* src/abg-corpus.cc (lookup_type_in_corpus): Define new function
here.
* include/abg-ir.h (function_types_type): Declare new typedef.
(translation_unit::get_canonical_function_type): Remove member function.
(translation_unit::bind_function_type_life_time): Declare new
member function.
(classes_type): New typedef.
* src/abg-ir.cc
(translation_unit::priv::canonical_function_types_): Remove data
member.
(translation_unit::priv::function_types): New data member.
(translation_unit::get_canonical_function_type): Remove this
function definition.
(translation_unit::bind_function_type_life_time): New function
definition.
(lookup_node_in_scope): Ensure that the type returned is
complete.
* src/abg-dwarf-reader.cc (string_classes_map): New typedef.
(read_context::decl_only_classes_map_): New data member.
(read_context::declaration_only_classes): New accessor.
(read_context::{maybe_schedule_declaration_only_class_for_resolution,
is_decl_only_class_scheduled_for_resolution,
resolve_declaration_only_classes, current_elf_file_is_executable,
current_elf_file_is_dso}): Define new member functions.
(read_context::clear_per_translation_unit_data): Do not clear the
data structures that associate DIEs to decls/types or that contain
the types to canonicalize here. Rather, clear them ...
(read_context::clear_per_corpus_data): ... here instead.
(read_context::build_translation_unit_and_add_to_ir): Do not
perform late type canonicalizing here. Rather, do it ...
(read_debug_info_into_corpus): ... here instead. And before that,
call read_context::clear_per_corpus_data() and the new
read_context::resolve_declaration_only_classes() here.
(build_class_type_and_add_to_ir): Schedule the non-complete types
for resolution to complete types. Assert that base classes that
are non-complete are scheduled to be completed.
(build_function_decl): Do not try to canonicalize function types
this early, systematically. Now, all the non-complete types needs
to be completed before starting canonicalizing. So let function
types go through the normal processes of deciding when to
canonicalize them. But then, bind the life time of the function
type to the life time of the current translation unit.
(maybe_canonicalize_type): If a class type is non-complete,
schedule it for late canonicalizing.
* src/abg-hash.cc (class_decl::hash::operator()(const class_decl&)
const): During hashing, a base class should be complete.
* src/abg-reader.cc
(read_context::clear_per_translation_unit_data): Do not clear
id/xml node, and type maps here. Rather, clear it ...
(read_context::clear_per_corpus_data): ... here instead.
(read_translation_unit_from_input): Do not perform late
canonicalizing here. Rather, do it ...
(read_corpus_from_input): ... here. Also, call the new
read_context::clear_per_corpus_data() here.
(build_function_decl): Do not canonicalize function types here so
early. Rather, bind the life time of the function type to the
life time of the translation unit.
* src/abg-writer.cc (write_translation_unit): Do not clear the
type/ID map here.
* tests/data/test-read-dwarf/test2.so.abi: Adjust test input.
2015-03-17 Dodji Seketeli <dodji@redhat.com>
Add --no-architecture option to abidw
* tools/abidw.cc (options::write_architecture): New flag.
(options::options): Initialize it.
(display_usage): Add usage string for the new --no-architecture
option.
(parse_command): Parse the new --no-architecture command line
option.
(main): Ignore the architecture name if required by the user.
2015-03-13 Dodji Seketeli <dodji@redhat.com>
We shouldn't build qualified types with empty underlying type
* src/abg-ir.cc (qualified_type_def::qualified_type_def): Assert
that we shouldn't build qualified types with empty underlying
type.
2015-03-13 Dodji Seketeli <dodji@redhat.com>
Add an overload for is_type() that takes naked pointers
* include/abg-fwd.h (is_type): Declare new overload that takes a
naked pointer.
* src/abg-ir.cc (is_type): Define new overload that takes a naked
pointer.
2015-03-13 Dodji Seketeli <dodji@redhat.com>
Declaration-only classes shouldn't have canonical types
* include/abg-fwd.h (keep_type_alive): Declare new function.
* src/abg-ir.cc (strip_typedef): Simplify logic. Support types
that are not canonicalized.
(type_base::get_canonical_type_for): For declaration-only classes,
return an empty canonical class, forcing the class to be compared
structurally.
(keep_type_alive): Define new function.
* src/abg-hash.cc ({decl_base, type_decl, scope_type_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl,
class_decl::member_class_template, class_decl, type_tparameter,
template_tparameter, }::hash::operator()): Do not cache the
computed hash.
2015-03-13 Dodji Seketeli <dodji@redhat.com>
Fix redundancy categorization propagation
* src/abg-comparison.cc (redundancy_marking_visitor::visit_end):
Consider the cases of changes that are a filtered out.
* tests/data/test-diff-filter/libtest27-redundant-and-filtered-children-nodes-v{0,1}.so:
New test binaries to use as test input.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-{0,1,2}.txt:
New test result baselines.
* tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-v{0,1}.cc:
Source code for the test input binaries above.
* tests/test-diff-filter.cc (in_out_spec): Add the binaries to the
test inputs used for this test harness.
* tests/data/Makefile.am: Add the new test material above to the
distribution.
2015-03-13 Dodji Seketeli <dodji@redhat.com>
Fix thinko in has_virtual_mem_fn_change().
* src/abg-comp-filter.cc (has_virtual_mem_fn_change): Fix thinko.
2015-03-13 Dodji Seketeli <dodji@redhat.com>
From inside the comparison engine re-use IR's equality operators
* include/abg-ir.h (operator==(scope_decl_sptr, scope_decl_sptr)):
Declare.
(operator==(type_decl_sptr, type_decl_sptr)): Likewise.
(operator==(enum_type_decl_sptr, enum_type_decl_sptr)): Likewise.
* src/abg-comparison.cc (diff_length_of_decl_bases)
(diff_length_of_type_bases): Remove these static functions.
(class_diff::has_changes): Re-use the comparison operator for
class_decl_sptr.
(type_decl_diff::has_changes): Re-use the comparison operator for
type_decl_sptr.
* src/abg-ir.cc (operator==(scope_decl_sptr, scope_decl_sptr)):
Define.
(operator==(type_decl_sptr, type_decl_sptr)): Likewise.
(operator==(enum_type_decl_sptr, enum_type_decl_sptr)): Likewise.
2015-03-11 Dodji Seketeli <dodji@redhat.com>
Remove unnecessary vertical white space from diff report
* src/abg-comparison.cc (class_diff::report): When reporting
virtual member functions make sure to emit the newline only if one
report for member function has already been emitted.
2015-03-10 Dodji Seketeli <dodji@redhat.com>
Cleanup array_type_def::is_infinite
* src/abg-ir.cc (array_type_def::is_infinite): Style cleanup.
2015-03-10 Dodji Seketeli <dodji@redhat.com>
Make a function static as it oughts to be
* src/abg-ir.cc (get_type_representation): Make this static.
2015-03-10 Dodji Seketeli <dodji@redhat.com>
Canonicalize function types
* src/abg-dwarf-reader.cc (build_function_decl): Call
maybe_canonicalize_type to canonicalize the function type.
2015-03-10 Dodji Seketeli <dodji@redhat.com>
Use more naked pointers when comparing function types
* src/abg-ir.cc (equals): In the overload for function types, use
more naked pointers, less smart pointers.
2015-03-10 Dodji Seketeli <dodji@redhat.com>
Pass a bunch of smart pointers by reference
* include/abg-fwd.h (get_member_is_static, is_member_function)
(get_member_function_is_ctor, set_member_function_is_ctor)
(get_member_function_is_dtor, set_member_function_is_dtor)
(get_member_function_is_const, set_member_function_is_const)
(get_member_function_vtable_offset)
(set_member_function_vtable_offset)
(get_member_function_is_virtual): Declare the smart pointer
parameter of these as being passed by reference.
* include/abg-ir.h (get_member_access_specifier)
(get_member_is_static, get_member_access_specifier)
(set_member_function_is_ctor, set_member_function_is_const)
(set_member_function_vtable_offset): Likewise, for these friend
declarations to the decl_base type.
* src/abg-ir.cc (get_member_access_specifier)
(get_member_is_static, is_member_function)
(get_member_function_is_ctor, set_member_function_is_ctor)
(get_member_function_is_dtor, set_member_function_is_dtor)
(get_member_function_is_const, set_member_function_is_const)
(get_member_function_vtable_offset)
(set_member_function_vtable_offset)
(get_member_function_is_virtual): In these definitions, the smart
pointer parameter is passed by reference.
2015-03-10 Dodji Seketeli <dodji@redhat.com>
Make decl_base::get_context_rel() return a naked pointer
* include/abg-fwd.h (set_member_is_static): Add an overload that
takes the member as a reference to a smart pointer.
(set_member_function_{is_dtor, is_ctor, is_const, vtable_offset,
is_virtual}): Pass the member function as a reference.
(set_member_function_is_const, set_member_function_is_virtual):
Pass the member function as a non-const reference.
* include/abg-ir.h (decl_base::get_context_rel): Return a naked
pointer.
(set_member_is_static, set_member_function_is_virtual): Adjust
this friend declaration.
(set_member_access_specifier): Add an overload that takes a
reference to the member. Pass a reference to smart pointer to the
other overload.
(set_member_function_is_{is_ctor,is_dtor,is_const,is_virtual,vtable_offset}):
Take a non-const reference to function_decl.
* src/abg-ir.cc (decl_base::get_context_rel): Likewise.
(equals(const decl_base&, const decl_base&, change_kind*)):
Adjust.
(equals(const var_decl&, const var_decl&, change_kind*)):
Likewise.
(get_member_access_specifier, get_member_is_static)
(set_data_member_offset, get_data_member_offset)
(set_data_member_is_laid_out, get_data_member_is_laid_out)
(get_member_function_is_ctor, set_member_function_is_ctor)
(get_member_function_is_dtor, set_member_function_is_dtor)
(get_member_function_is_const, set_member_function_is_const)
(get_member_function_vtable_offset)
(set_member_function_vtable_offset)
(get_member_function_is_virtual, set_member_function_is_virtual):
Likewise.
(set_member_access_specifier): Add an overload that takes a
reference to decl_base.
(set_member_is_static, set_member_function_{is_dtor, is_ctor,
is_const, vtable_offset, is_virtual}): Pass the member function as
a reference.): Add an overload that takes the member as a
reference, and write the older overload in terms of the new one.
2015-03-09 Dodji Seketeli <dodji@redhat.com>
Make overloads of decl_base::get_qualified_name() return a reference
* incude/abg-ir.h (decl::get_{qualified_name,
qualified_parent_name}): Return a reference to a string rather
than a copy of a string.
(qualified_type_def::get_qualified_name): Likewise.
(reference_type_def::get_qualified_name): Likewise.
(array_type_def::get_qualified_name): Likewise.
(class enum_type_decl::enumerator): Make this is an out-of-line
pimpled class implementation.
(enum_type_decl::enumerator::{get, set}_enum_type): Declare new
method.
(enum_type_decl::enumerator::get_qualified_name): Change this so
that it doesn't take the name of the enum type anymore.
* src/abg-comparison.cc (enum_diff::report): Adjust for
enum_type_decl::enumerator::get_qualified_name() not taking the
name of the enum type anymore.
* src/abg-ir.cc (decl_base::get_qualified_parent_name): Return a
reference to string.
(decl_base::get_qualified_name): Likewise.
(decl_base::get_qualified_name(string&)): Use the new verson of
decl_base::get_qualified_name() that returns a reference.
({qualified_type_def, pointer_type_def, reference_type_def,
array_type_def}::get_qualified_name()): Return a string reference.
({qualified_type_def, pointer_type_def, reference_type_def,
array_type_def}::get_qualified_name(string& qualified_name)
const): Use the new qualified_type_def::get_qualified_name() that
returns a string reference.
(class enum_type_decl::priv): New type.
(enum_type_decl::{get_underlying_type, get_enumerators}): Adjust.
(enum_type_decl::{enumerator::enumerator, enumerator::operator==,
enumerator::get_name, enumerator::get_qualified_name,
enumerator::set_name, enumerator::get_value,
enumerator::set_value, enumerator::get_enum_type,
enumerator::set_enum_type}): Define methodes out-of-line here.
2015-02-24 Dodji Seketeli <dodji@redhat.com>
Harden strip_typedef
* src/abg-ir.cc (strip_typedef): Consider that the underlying type
can be void.
2015-02-24 Dodji Seketeli <dodji@redhat.com>
When reading DWARF set member type access where the type is built
* include/abg-fwd.h (is_class(decl_base*)): Return a class_decl*
rather than just a bool.
* abg-ir.cc (is_class(decl_base*)): Return a class_decl* rather
than just a bool. Simplify the implementation.
* src/abg-dwarf-reader.cc
(maybe_set_member_type_access_specifier): Define new static
function.
(build_ir_node_from_die): Remove the is_member_type flag. When
building member types set their access specifier. Simplify the
logic of detecting that a type is a member type; basically
delegate taht to the new maybe_set_member_type_access_specifier().
(build_class_type_and_add_to_ir): Do not try to set the member
type access specifiers anymore.
(build_qualified_type, build_pointer_type, build_reference_type)
(build_typedef_type, build_var_decl, build_function_decl): Adjust.
2015-02-24 Dodji Seketeli <dodji@redhat.com>
Fix enum_diff::has_changes()
* src/abg-comparison.cc (enum_diff::has_changes): Just use the
normal comparison operator to compare the two enums here. It's
fast now.
2015-02-23 Dodji Seketeli <dodji@redhat.com>
Build the set of exported decls directly during DWARF loading
* include/abg-ir.h ({var,function}_decl::get_id): Return a
reference.
* src/abg-ir.cc ({var,function}_decl::get_id): Return a reference
to the string rather than copying it over.
* include/abg-corpus.h (class corpus::exported_decls_builder):
Declare new type.
(corpus::{sort_functions, sort_variables,
maybe_drop_some_exported_decls, get_exported_decls_builder}):
Declare new methods.
* src/abg-corpus.h (corpus::exported_decls_builder::priv): Define
new type.
(class symtab_build_visitor_type): Remove this type that is
useless now.
(corpus::exported_decls_builder::{exported_decls_builder,
exported_functions, exported_variables,
maybe_add_fn_to_exported_fns, maybe_add_var_to_exported_vars}):
Define new functions.
(corpus::priv::is_public_decl_table_built): Remove this data
member. It's now useless.
(corpus::priv::priv): Adjust.
(corpus::priv::build_public_decl_table): Remove this member
function. It's now useless.
(corpus::{priv::build_unreferenced_symbols_tables, get_functions,
get_variables}): No need to build the public decls table here.
It's already built by the time the corpus is read from DWARF now.
(corpus::{sort_functions, sort_variables,
maybe_drop_some_exported_decls, get_exported_decls_builder}):
Define new member functions.
* src/abg-dwarf-reader.cc (read_context::exported_decls_builder):
New data member.
(read_context::read_context): Initialize it.
(read_context::{exported_decls_builder,
maybe_add_fn_to_exported_fns, maybe_add_var_to_exported_vars}):
Define new member functions.
(read_debug_info_into_corpus): Get the the new
'exported_decls_builder' object from the corpus and stick it into
the read context so the DWARF reading code can use it to build the
exported decls set. When the DWARF reading is done, sort the set
of exported functions and variables that was built.
(build_ir_node_from_die): When a function or variable is built,
consider putting it into the set of exported decls.
* tools/abicompat.cc (main): Now that the exported decls is built
*before* we had a chance to stick the list of symbol IDs to keep,
call corpus::maybe_drop_some_exported_decls() to update the set of
exported decls we should consider for the corpus.
was applied to that list and the final
2015-02-22 Dodji Seketeli <dodji@redhat.com>
Fix canonicalizing of member types ... *AGAIN*
* src/abg-dwarf-reader.cc (build_ir_node_from_die): For typedefs,
we don't need to test that the current scope is a class to know
that we are looking at a member type. Just looking at the
is_member flag is enough.
So the issue arises when for instance, we are reading a class that
defines a member typedef (or enum) and uses that enum as the type of a
data member. When reading that data member (before reading the
definition of the typedef), we read the type of the data member; so we
hit the typedef. But build_ir_node_from_die() cannot fully construct
the scope of the typedef before handing off the typedef because we are
currently building it! So it hands out a non-complete version of the
class that is being built; 'is_member' is not set to 'true' because
we are getting the type of the data member; it's not *necessarily* a
member type. So we need to check !is_class_type(scope) to know if we
are given a member type. I am now thinking that the "is_member" flag
is actually useless. I think I'll remove it in a later patch.
Anyway, this fixes 'abidiff libabigail.so libabigail.so' again. I
have some stashed patches that brings it's time down to ~ 45 seconds.
So we are getting close to being able to include that *ultimate* test in
regression test suite. Oh well.
* src/abg-dwarf-reader.cc (build_ir_node_from_die): When building
typedefs, enum and memeber classes, check that the scope is a
member class to detect if we are building a member type. In which
case the caller is going to handle the canonicalizing of the
member type *after* it's access specification has been adjusted.
Otherwise, that adjustments happens after the type has been
canonicalized and bad things happen at comparison type.
2015-02-21 Dodji Seketeli <dodji@redhat.com>
Bug 17649 Avoid endless looping on diff graph with cycles
* include/abg-comp-filter.h (harm{less,ful}_filter::visit_end):
Declare new methods.
* include/abg-comparison.h (diff_context::maybe_apply_filters):
Remove the traverse_nodes_once flag.
* src/abg-comp-filter.cc (apply_filter): Force the traversing to
operate in cycle avoidance mode.
(harm{less,ful}_filter::visit): Update the category of the
canonical node too.
(harm{less,ful}_filter::visit_end): Define new method.
* src/abg-comparison.cc (diff_context::maybe_apply_filters):
Remove the traverse_nodes_once flag. Adjust. Simplify logic.
(diff::traverse): Always call diff_node_visitor::{begin,end}. If
the node has already been visited previously then do not call
diff_node_visitor::visit() and do not visit the children nodes.
(category_propagation_visitor::visit_end): If the node has
already been visited, then propagate the category from the
canonical nodes of the children nodes.
(propagate_categories): Force the traversing to operate in cycle
avoidance mode.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Add missing new line after reporting alignment changes
* src/abg-comparison.cc (distinct_diff::report): After calling
report_size_and_alignment_changes, one needs to add a new line if
some stuff got emitted out the output stream.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Add type checking overloads that ease their calling from GDB
* include/abg-fwd.h (is_class_type, is_pointer, is_reference_type)
(is_qualified_type): Declare overloads that take naked (non-smart)
pointers.
* src/abg-ir.cc (is_class_type, is_pointer, is_reference_type)
(is_qualified_type): Define overloads that take naked (non-smart)
pointers.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Remove overly eager assert in distinct_diff::report
* src/abg-comparison.cc (distinct_diff::report): Remove over-eager
assert.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Factorize late canonicalizing code in the dwarf reader
* src/abg-dwarf-reader.cc
(read_context::{canonicalize_types_scheduled,
perform_late_type_canonicalizing}): Factorize these from ...
(build_translation_unit_and_add_to_ir): ... here.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Rename schedule_type_for_canonicalization -> schedule_type_for_late_canonicalization
* src/abg-dwarf-reader.cc
(read_context::schedule_type_for_late_canonicalization): Renamed
read_context::schedule_type_for_canonicalization into this. Also,
add some sanity checking code in there.
(build_class_type_and_add_to_ir, maybe_canonicalize_type): Adjust.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Adjust semantics of the 'is_member' flag of build_ir_node_from_die()
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Rename
is_member into is_member_type. Adjust.
(get_scope_for_die, build_translation_unit_and_add_to_ir)
(build_namespace_decl_and_add_to_ir): Adjust.
(build_class_type_and_add_to_ir): Adjust. Adjust set to false
when calling build_ir_node_from_die() to build a function_decl.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Simplify canonicalizing handling for typedefs
* src/abg-dwarf-reader.cc (build_ir_node_from_die): For typedefs,
we don't need to test that the current scope is a class to know
that we are looking at a member type. Just looking at the
is_member flag is enough.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Do not miss canonicalizing opportunities on non-member class types
* src/abg-dwarf-reader.cc (build_ir_node_from_die): When a class
is not a member type, then it at least ought to be scheduled for
late canonicalizing.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Fix handling of canonicalizing of member enum types
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Once we've
built the enum type by calling build_enum_type(), do not try to
canonicalize it here if it's a member type. The calling
build_class_type_and_add_to_ir() must deal with it already.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Stick qualified, pointer, reference and array types into the global scope
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
consider qualified, pointer, reference and array types as member
types. Only typedef, class and enum types are.
(build_ir_node_from_die): Stick base, pointer, reference,
qualified and array types into the global scope.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Avoid creating multiple versions of certain composite types
* src/abg-dwarf-reader.cc (build_qualified_type)
(build_pointer_type_def, build_reference_type, build_array_type)
(build_typedef_type): If the composite type we are about to create
was already created, just return the one that exists already.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Do not forget to canonicalize enum underlying type and void type
* src/abg-dwarf-reader.cc (build_enum_type): Canoncialize the
underlying type of the enum type.
(build_ir_node_for_void_type): Canonicalize the void type.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Do not forget to associate DIE to the types they represent
* src/abg-dwarf-reader.cc (build_type_decl, build_enum_type)
(build_qualified_type, build_pointer_type_def)
(build_reference_type, build_typedef_type)
(build_class_type_and_add_to_ir): Take a new flag that says if the
DIE is from the alternate debug info section or not. Perform the
DIE->type association in these functions. Note that in
build_class_type_and_add_to_ir we are now doing the DIE->type
association even for declaration-only classes. And for member
types, do not bother doing the association because it's already
been done by build_ir_node_from_die().
(build_ir_node_from_die): Do not do the DIE->type association here
anymore. Adjust to the new signature of the build_* functions
above that actually build the types.
2015-02-20 Dodji Seketeli <dodji@redhat.com>
Clear per-TU data before reading debub info for a TU
* src/abg-dwarf-reader.cc
(read_context::die_type_map): New accessor for the two DIE->Type
maps we have; the one of the main debug info section and the one
of the alternate debug info section.
(read_context::{associate_die_to_type,
lookup_type_from_die_offset}): use the new die_type_map()
accessor.
(read_context::clear_per_translation_unit_data): Factorize this
from build_translation_unit_and_add_to_ir(). Also, add code to
clear the DIE->type map as well as the vectors of offsets of the
types of the DIEs to canonicalize after the translation unit has
been read.
2015-02-19 Dodji Seketeli <dodji@redhat.com>
Fix the new regression test for type canonicalizing
* tests/runtestcanonicalizetypes.sh.in (binaries): Refer to
abg-tools-utils, not abg-tools-utils.o; the extension is computed
automatically, depending on the underlying platform.
2015-02-19 Dodji Seketeli <dodji@redhat.com>
Make strip_typedef() act on canonical types only
* include/abg-fwd.h (is_compatible_with_class_type): Declare new
function.
(canonicalize): Move the declaration here, from ...
* include/abg-ir.h (canonicalize): ... here.
* src/abg-ir.cc (strip_typedef): Assert that the input type is
canonicalized. Make sure that weak references are on
canonicalized types. Make sure that the returned type is a
canonical one.
(canonicalize): Make this return the canonical type that it has
computed.
* src/abg-comp-filter.cc (type_size_changed): Use the new
is_compatible_with_class_type() function, instead of
is_class_type().
2015-02-18 Dodji Seketeli <dodji@redhat.com>
Speed up function_decl::get_id() and var_decl::get_id()
* src/abg-ir.cc (var_decl::priv::id_): New data member.
(var_decl::get_id): Cache the result on the first invocation and
and returns it on subsequent invocations.
(function_dec::priv::id_): New data member.
(function_decl::get_id): Cache the result on the first invocation
and and returns it on subsequent invocations.
2015-02-18 Dodji Seketeli <dodji@redhat.com>
Speed up symbol version reading
* src/abg-dwarf-reader.cc (find_symbol_table_section)
(get_symbol_versionning_sections): Forward declare these existing
static functions.
(read_context::{symtab_section_,
symbol_versionning_sections_loaded_,
symbol_versionning_sections_found_, versym_section_
verdef_section, verneed_section}): New data members.
(read_context::read_context): Initialize them.
(read_context::{find_symbol_table_section,
get_symbol_versionning_sections, get_version_for_symbol}):
Implement a caching version of their exisiting non-caching
counterpart.
(read_context::lookup_elf_symbol_from_index): Use the new caching
functions read_context::find_symbol_table_section and
read_context::get_version_for_symbol.
(read_context::load_symbol_maps): Likewise, use the new caching
function read_context::find_symbol_table_section.
2015-02-17 Dodji Seketeli <dodji@redhat.com>
Stop traversing function/variable node when added to symbol table
* src/abg-corpus.cc (symtab_build_visitor_type::visit_begin):
Replace symtab_build_visitor_type::visit_end with this and return
false.
2015-02-13 Dodji Seketeli <dodji@redhat.com>
Do not apply diff filters sub-tree not carrying changes
* src/abg-comp-filter.cc ({harmless, harmful}_filter::visit): Do
not try to do the categorizing on a diff sub-tree that does
not carry any change.
* src/abg-comparison.cc (diff_context::maybe_apply_filters): Do
not bother trying to apply the filters on a diff sub-tree that
does not carry any change.
2015-02-13 Dodji Seketeli <dodji@redhat.com>
Canonicalize types either early or late after TU reading
* include/abg-fwd.h (is_class_type)
(type_has_non_canonicalized_subtype): Declare new functions.
(is_member_type): Remove the overload that takes a decl_base_sptr.
It's superfluous. We just need the one that takes a
type_base_sptr.
* include/abg-ir.h (translation_unit::{is_constructed,
set_is_constructed}): Add new methods.
(class_decl::has_virtual_member_functions): Likewise.
(class decl_base): Makes it virtually inherit ir_traversable_base.
(class type_base): Make this virtually inherit traversable_base
too.
(type_base::canonicalize): Renamed enable_canonical_equality
into this.
(type_base::traverse): Declare new virtual method.
(canonicalize): Renamed enable_canonical_equality into this.
(scope_type_decl::traverse): Declare new virtual method.
(namespace_decl::get_pretty_representation): Declare new virtual
method.
(function_type::traverse): Likewise.
(class_decl::base_spec::traverse): Likewise.
(ir_node_visitor::visit): Remove the overloads and replace each of
them with a pair of ...
(ir_node_visitor::{visit_begin, visit_end}): ... of these.
* include/abg-traverse.h (traversable_base::visiting): New
method.
(traversable_base::visiting_): New data member.
(traversable_base::traversable_base): New constructor.
* src/abg-ir.cc ({scope_decl, type_decl, namespace_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, function_decl::parameter, class_decl,
class_decl::member_function_template,
class_decl::member_class_template, function_tdecl,
class_tdecl}::traverse): Fix this to properly set the
traversable_base::visiting_ flag and to reflect the new signatures
of the ir_node_visitor methods.
({type_base, scope_type_decl, function_type,
class_decl::base_spec}::traverse): New method.
(type_base::get_canonical_type_for): Handle the case of the type
already having a canonical type. Properly hash the type using the
dynamic type hasher. Look through declaration-only classes to
consider the definition of the class instead. Fix logic to have a
single pointer of return, to ease debugging.
(canonicalize): Renamed enable_canonical_equality into this.
(namespace_decl::get_pretty_representation): Define new method.
(ir_node_visitor::visit): Replace each of these overloads with a
pair of visit_begin/visit_end ones.
(translation_unit::priv::is_constructed_): New data member.
(translation_unit::priv::priv): Initialize it.
(translation_unit::{is_constructed, set_is_constructed}): Define
new methods.
(is_member_type(const decl_base_sptr)): Remove.
(is_class_type(decl_base *d)): Define new function.
(class_decl::has_virtual_member_functions): Define new method.
(equals(const class_decl&, const class_decl&, change_kind*)): If
the containing translation unit is not constructed yet, do not
take virtual member functions in account when comparing the
classes. This is because when reading from DWARF, there can be
DIEs that change the number of virtual member functions after the
DIE of the class. So one needs to start taking virtual members
into account only after the translation unit has been constructed.
(class non_canonicalized_subtype_detector): Define new type.
(type_has_non_canonicalized_subtype): Define new function.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Renamed
this into symtab_build_visitor_type::visit_end.
* src/abg-dwarf-reader.cc (die_type_map_type): New typedef.
(die_class_map_type): This is now a typedef on a map of
Dwarf_Off/class_decl_sptr.
(read_context::{die_type_map_, alternate_die_type_map_,
types_to_canonicalize_, alt_types_to_canonicalize_}): New data
members.
(read_context::{associate_die_to_decl,
associate_die_to_decl_primary}): Make these methods public.
(read_context::{associate_die_to_type,
lookup_type_from_die_offset, is_wip_class_die_offset,
types_to_canonicalize, schedule_type_for_canonicalization}):
Define new methods.
(build_type_decl, build_enum_type)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type, build_array_type)
(build_typedef_type, build_function_decl): Do not canonicalize
types here.
(maybe_canonicalize_type): Define new function.
(build_ir_node_from_die): Take a new flag that says if the ir node
is a member type/function or not. Early-canonicalize base types.
Canonicalize composite types that have only canonicalized
sub-types. Schedule the other types for late canonicalizing. For
class types, early canonicalize those that are non-member types,
that are fully constructed and that have only canonicalized
sub-types. Adjust to the new signature of build_ir_node_from_die.
(get_scope_for_die, build_namespace_decl_and_add_to_ir)
(build_qualified_type, build_pointer_type_def)
(build_reference_type, build_array_type, build_typedef_type)
(build_var_decl, build_function_decl): Adjust for the new
signature of build_ir_node_from_die.
(build_translation_unit_and_add_to_ir): Likewise. Perform the
late canonicalizing of the types that have been scheduled for
that.
(build_class_type_and_add_to_ir): Return a class_decl_sptr, not a
decl_base_sptr. Adjust for the new signature of
build_ir_node_from_die. Early canonicalize member types that are
created and added to a given class, or schedule them for late
canonicalizing.
* src/abg-reader.cc (class read_context::{m_wip_classes_map,
m_types_to_canonicalize}): New data members.
(read_context::{clear_types_to_canonicalize,
clear_wip_classes_map, mark_class_as_wip, unmark_class_as_wip,
is_wip_class, maybe_canonicalize_type,
schedule_type_for_late_canonicalizing,
perform_late_type_canonicalizing}): Add new method definitions.
(read_context::clear_per_translation_unit_data): Call
read_context::clear_types_to_canonicalize().
(read_translation_unit_from_input): Call
read_context::perform_late_type_canonicalizing() at the end of the
function.
(build_function_decl): Fix the function type canonicalizing (per
translation) that was already in place. Do the canonicalizing of
these only when the type is fully built. Oops. This was really
brokend. Also, when the function type is constructed, consider it
for type canonicalizing.
(build_type_decl): Early canonicalize basic types.
(build_qualified_type_decl, build_pointer_type_def)
(build_pointer_type_def, build_reference_type_def)
(build_array_type_def, build_enum_type_decl, build_typedef_decl):
Handle the canonicalizing for these composite types: either early
or late.
(build_class_decl): Likewise. Also, mark this class a 'being
built' until it's fully built. This helps the canonicalizing code
to know that it should leave a class alone until it's fully built.
* tests/test-ir-walker.cc (struct name_printing_visitor): Adjust
to the visitor methods naming change.
* configure.ac: Generate the tests/runtestcanonicalizetypes.sh
testing script from tests/runtestcanonicalizetypes.sh.in.
* tests/runtestcanonicalizetypes.sh.in: Add the template for the
new runtestcanonicalizetypes.sh script that test for type
canonicalizing.
* tests/Makefile.am: Add the new runtestcanonicalizetypes.sh
regression testing script to the build system.
2015-02-18 Dodji Seketeli <dodji@redhat.com>
Factorize per TU data clearing in the xml-abi reader
* src/abg-reader.cc
(read_context::clear_per_translation_unit_data): Factorize this
function out of ...
(read_context::read_translation_unit_from_input): ... this one.
2015-02-13 Dodji Seketeli <dodji@redhat.com>
Use the deep type sptr equality operator when possible
* src/abg-ir.cc (equals): On function_decl overload, use the deep
sptr type equality operator when comparing types.
(non_type_tparameter::operator==): Likewise.
2015-02-18 Dodji Seketeli <dodji@redhat.com>
Properly compare virtualness of member functions
* src/abg-ir.cc (equals(const function_decl&, const
function_decl&, change_kind*)): Compare virtualness of member
function before comparing their vtable offsets.
2015-02-13 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* include/abg-ir.h (reference_type_def::get_pointed_to_type): use
type_base_sptr, rather than shared_ptr<type_base>
(typdef_decl::get_underlying_type): Likewise.
(function_decl::get_return_type): Likewise.
(function_decl::set_type): Likewise.
(class_decl::member_class_template::as_class_tdecl): Likewise.
* src/abg-comparison.cc (compute_diff): Remove useless vertical
space.
(corpus_diff::traverse): Add a vertical space after this.
* src/abg-dwarf-reader.cc (type_ptr_map): Remove this unused
typedef.
(get_version_for_symbol)
(finish_member_function_reading): Fix the comments of these
functions.
* src/abg-reader.cc (build_function_decl): Return a
function_decl_sptr rather than a shared_ptr<function_decl>.
(build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def)
(build_array_type_def, build_typedef_decl, build_class_decl): Use
the is_<someking_of_type> functions here, rather than using the
dynamic cast. This increases maintainability.
2015-02-11 Dodji Seketeli <dodji@redhat.com>
Optimize compressed debug info reading for speed
* src/abg-dwarf-reader.cc
(find_last_import_unit_point_before_die): Look for the inclusion
point of the partial unit in reverse topological order.
2015-02-10 Dodji Seketeli <dodji@redhat.com>
Share private data of class_diff nodes
* src/abg-comparison.cc (class_diff::class_diff): Do not
initialize the private data of class_diff here.
(compute_diff): In the overload for class_diff, initialize the
private data of the new instance of class_diff to the private data
of its canonical instance.
(redundancy_marking_visitor::visit_begin): If a node is marked
redundant, do not dare visit its children. In cases of classes
that have members that reference themselves, this prevents us from
wrongly marking some of the data member changes as being
redundant.
2015-02-10 Dodji Seketeli <dodji@redhat.com>
Do not crash when applying filters to a NULL diff
* src/abg-comparison.cc (diff_context::maybe_apply_filters): Do
not crash when called with a NULL diff.
2015-02-09 Dodji Seketeli <dodji@redhat.com>
Initial implementation of canonical type comparison in the IR
* include/abg-ir.h (class type_base): Pimplify this class.
(type_base::canonical_types_map_type): New typedef.
(type_base::{get_canonical_types_map, get_canonical_type_for,
get_canonical_type}): Declare new member functions.
(enable_canonical_equality): Declare new function.
(struct type_base::hash): Declare this functor here.
* src/abg-ir.cc ():
* src/abg-dwarf-reader.cc (build_type_decl, build_enum_type)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type, build_array_type)
(build_typedef_type, build_function_decl): Enable canonical
equality for the resulting type returned by these functions.
* src/abg-hash.cc (type_base::hash::operator()(const type_base&)):
Adjust as this is now out-of-line. Also, add two overloads for
type_base* and type_base_sptr.
(struct type_base::priv): Define new type for private data of
type_base.
(type_base::{get_canonical_types_map, get_canonical_type_for,
get_canonical_type}): Define new member functions.
(enable_canonical_equality): Define new function
(type_base::{type_base, set_size_in_bits, get_size_in_bits,
set_alignment_in_bits, get_alignment_in_bits}): Adjust.
({type_decl, scope_type_decl, qualified_type_def,
pointer_type_def, reference_type_def, array_type_def,
enum_type_decl, typedef_decl, function_type,
class_decl}::operator==): If the types being compared have
canonical type then use them for comparison.
2015-02-07 Dodji Seketeli <dodji@redhat.com>
Don't walk the diff tree when there are no suppressions
* src/abg-comparison.cc (apply_suppressions): Do not walk the diff
tree to apply suppressions when there are no suppressions to
apply.
2015-02-07 Dodji Seketeli <dodji@redhat.com>
Speedup some diff::has_changes() implementations
* src/abg-comparison.cc ({distinct_diff, var_diff,
class_diff}::has_changes): Use the hash value of the diff subjects
to detect quickly if they differ. If they don't, then go the slow
path of comparing the types.
2015-02-05 Dodji Seketeli <dodji@redhat.com>
Get out as early as possible when comparing different ABI artefacts
* include/abg-ir.h (equal): Turn the last parameter of type
change_kind& into a change_kind*. Do this on all the overloads'
declarations.
* src/abg-ir.cc (equal): Do the same for the definitions of the
overloads and adapt them to report about the kind of changes makes
the two ABI artifact different -- only if the change_kind pointer
is non-null. That way, callers have a way to choose if they want
to go the expensive route of knowing what kind of changes there
are.
({decl_base, scope_decl, type_base, scope_type_decl,
qualified_type_def, pointer_type_def, pointer_type_def,
reference_type_def, array_type_def, enum_type_decl, typedef_decl,
var_decl, function_type, function_decl, function_decl::parameter,
class_decl::base_spec, class_decl}::operator==): Adjust to the new
signature of equals; call it with the change_kind* parameter set
to NULL.
* src/abg-comparison.cc ({var_diff, pointer_diff, array_diff,
reference_diff, qualified_type_diff, enum_diff, class_diff,
base_diff, scope_diff, fn_parm_diff, function_decl_diff,
type_decl_diff, typedef_diff}::has_local_changes): Adjust.
2015-02-05 Dodji Seketeli <dodji@redhat.com>
Rename diff::length() into diff::has_changes()
* include/abg-comparison.h (*::has_changes): Rename the ::length()
method of all the diff types that inherit the diff class into
this, in the class declarations.
* src/abg-comparison.cc (*::has_changes): Do the same as in the
declarations, in the definitions.
(diff::to_be_reported, distinct_diff::has_local_changes)
(distinct_diff::report, distinct_diff::, array_diff::has_changes)
(reference_diff::has_changes, qualified_type_diff::has_changes)
(enum_diff::has_changes, translation_unit_diff::has_changes)
(suppression_categorization_visitor::visit_end)
(redundancy_marking_visitor::visit_begin): Adjust.
* tests/test-diff-dwarf.cc (main): Adjust.
* tools/abidiff.cc (main): Likewise.
2015-01-27 Dodji Seketeli <dodji@redhat.com>
Add a method to diff_context to dump a diff tree to error output
* include/abg-comparison.h (diff_context::error_output_stream):
Make this function const.
(diff_context::{do_dump_diff_tree}): Declare new methods.
* src/abg-comparison.cc (diff_context::error_output_stream): Make
this function const.
(diff_context::do_dump_diff_tree): Define new methods.
2015-01-27 Dodji Seketeli <dodji@redhat.com>
Keep children nodes of class_diff and scope_diff sorted
* include/abg-comparison.h (decl_diff_base, type_diff_base):
Forward declare these types.
(diff_sptrs_type, decl_diff_base_sptr, decl_diff_base_sptrs_type)
(type_diff_base_sptr, type_diff_base_sptrs_type)
(base_diff_sptrs_type, string_type_diff_base_sptr_map)
(string_decl_diff_base_sptr_map, string_diff_sptr_map): New
typedefs.
(changed_type_or_decl, changed_parm, changed_parms_type)
(string_changed_type_or_decl_map)
(unsigned_changed_type_or_decl_map, changed_type_or_decl_vector):
Remove typedefs.
(class_diff::changed_base): Make this return a
base_diff_sptrs_type now. No more a string_base_diff_sptr_map.
(class_diff::changed_member_fns): Make this return a
function_decl_diff_sptrs_type, no more a
string_changed_member_function_sptr_map.
(class_diff::changed_types): Make this return a diff_sptrs_type,
not a string_changed_type_or_decl_map anymore.
(class_diff::changed_decls): Make this return a diff_sptrs_type,
not a string_changed_type_or_decl_map anymore.
* src/abg-comp-filter.cc (has_virtual_mem_fn_change)
(has_non_virtual_mem_fn_change): Adjust.
* src/abg-comparison.cc (compute_diff): For the decl_base_sptr and
type_base_sptr overloads, assert that the resulting diff is
non-null.
(class_diff::priv::{sorted_changed_base_,
sorted_changed_member_types_, sorted_subtype_changed_dm_,
sorted_changed_dm_, sorted_changed_member_functions_,
sorted_changed_member_class_tmpls_}): New data members.
(class_diff::priv::changed_member_types_): Changed the type of
this from string_changed_type_or_decl_map to string_diff_sptr_map.
(class_diff::priv::changed_member_functions_): Changed the type of
this from string_changed_member_function_sptr_map to
string_function_decl_diff_sptr_map.
(class_diff::priv::changed_member_class_tmpls_): Changed the type
of this from string_changed_type_or_decl_map to
string_diff_sptr_map.
(class_diff::ensure_lookup_tables_populated): Adjust. Initialize
the new sorted members class_diff::priv::{sorted_changed_bases_,
sorted_subtype_changed_dm_, sorted_changed_dm_,
sorted_changed_member_functions_, sorted_changed_member_types_}.
(class_diff::priv::{member_type_has_changed,
member_class_tmpl_has_changed, count_filtered_bases,
count_filtered_subtype_changed_dm, count_filtered_changed_mem_fns,
}): Adjust.
(class_diff::chain_into_hierarchy): Adjust: The children nodes of
class_diff are now laid out in a sorted way.
(class_diff::{changed_bases, changed_member_fns}): Adjust.
(base_diff_comp, virtual_member_function_diff_comp): New types.
(sort_string_base_diff_sptr_map)
(sort_string_virtual_member_function_diff_sptr_map): New static
functions.
(data_member_diff_comp): Renamed var_diff_comp into this.
(sort_unsigned_data_member_diff_sptr_map): Renamed sort_var_diffs
into this and adjust.
(class_diff::report): Do not sort the nodes we are about to emit
here. Just use the natural order of the nodes in their parent
tree as they should now be sorted.
(scope_diff::priv::{changed_types_, changed_decls_}): Change the
type of these from string_changed_type_or_decl_map to
string_diff_sptr_map.
(scope_diff::priv::{sorted_changed_types_,
sorted_changed_decls_}): New data members.
(scope_diff::ensure_lookup_tables_populated): Adjust. Initialize
the new scope_diff::priv::sorted_changed_{types_, decls_}.
(scope_diff::chain_into_hierarchy): Adjust. The children of
scope_diff are now sorted.
(scope_diff::changed_{types, decls}): Return the sorted vectors of
children nodes.
(struct changed_type_or_decl_comp): Remove.
(struct diff_comp): New type.
(sort_changed_type_or_decl): Remove.
(sort_string_diff_sptr_map): New static function.
(scope_diff::report): Adjust. Do not sort children nodes here
ourselves before reporting about them. Rather, use the natural
topological order of the children as they are now sorted.
(corpus_diff::priv::sorted_changed_vars_): Renamed
corpus_diff::priv::changed_vars_ into this to make it more
explicit that the things it holds are sorted.
(corpus_diff::changed_variables_sorted): Adjust.
(corpus_diff::priv::ensure_lookup_tables_populated): Likewise.
(corpus_diff::priv::apply_filters_and_compute_diff_stats):
Likewise.
(corpus_diff::priv::categorize_redundant_changed_sub_nodes):
Likewise.
(corpus_diff::priv::clear_redundancy_categorization): Likewise.
(corpus_diff::priv::maybe_dump_diff_tree): Likewise.
(corpus_diff::report): Likewise.
2015-01-26 Dodji Seketeli <dodji@redhat.com>
Hand-code the string representation of GElf_Ehdr::e_machine
* configure.ac: Do not check for elfutils/libebl.h and libebl.a
anymore.
* src/abg-dwarf-reader.cc: Do not include elfutils/libebl.h
anymore.
(e_machine_to_string): Define new static
function.
(read_context::::load_elf_architecture): Use the new
e_machine_to_string() function rather than ebl_backend_name() and
ebl_openbackend().
* tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt: Adjust.
2015-01-26 Dodji Seketeli <dodji@redhat.com>
Fix chaining of descendant node of qualified type diff node
* include/abg-comparison.h
(qualified_type_diff::leaf_underlying_type_diff): Declare new
accessor.
* src/abg-comparison.cc (get_leaf_type): Forward declare this
static function.
(qualified_type_diff::priv::leaf_underlying_type_diff): Define new
data member.
(qualified_type_diff::leaf_underlying_type_diff): Define this new
accessor.
(qualified_type_diff::chain_into_hierarchy): Call
leaf_underlying_type_diff() here rather than
underlying_type_diff().
(qualified_type_diff::report): Use leaf_underlying_type_diff()
rather than re-computing the diff between the two leaf underlying
type diff nodes.
* libtest26-qualified-redundant-node-v{0,1}.so: New binary test
input files.
* tests/data/test-diff-filter/test26-qualified-redundant-node-v{0,1}.cc:
Source code for the binary test inputs above.
* tests/test-diff-filter.cc (int_out_spec): Add the new test input
to the vector of test input data over which to run this test
harness.
* tests/data/test-diff-filter/test26-qualified-redundant-node-report-{0,1.txt:
New test input file.
* tests/data/Makefile.am: Add the new test input data to the
source distribution.
2015-01-24 Dodji Seketeli <dodji@redhat.com>
Recognize cyclic diff tree nodes as being redundant
* include/abg-comparison.h (enum visiting_kind): Rename
enumerator DO_NOT_MARK_VISITED_NODES_AS_TRAVERSED into
DO_NOT_MARK_VISITED_NODES_AS_VISITED.
(diff_context::diff_has_been_visited): Rename
diff_context::diff_has_been_traversed into this.
(diff_context::mark_diff_as_visited): Rename
diff_context::mark_diff_as_traversed into this.
(diff_context::forget_visited_diffs): Rename
diff_context::forget_traversed_diffs into this.
(diff_context::forbid_visiting_a_node_twice): Rename
diff_context::forbid_traversing_a_node_twice into this.
(diff_context::visiting_a_node_twice_is_forbidden): Rename
diff_context::traversing_a_node_twice_is_forbidden into this.
(diff::is_traversing): Move this from protected to public.
* src/abg-comparison.cc (diff_context::priv::visited_diff_nodes_):
Rename diff_context::priv::traversed_diff_nodes_ into this.
(diff_context::priv::forbid_visiting_a_node_twice_): Rename
diff_context::priv::forbid_traversing_a_node_twice_ into this.
(diff_context::priv::priv): Adjust.
(diff_context::diff_has_been_visited): Rename
diff_context::diff_has_been_traversed into this. Adjust.
(diff_context::mark_diff_as_visited): Rename
diff_context::mark_diff_as_traversed into this. Adjust.
(diff_context::forget_visited_diffs): Rename
diff_context::forget_traversed_diffs into this. Adjust.
(diff_context::forbid_visiting_a_node_twice): Rename
diff_context::forbid_traversing_a_node_twice into this.
(diff_context::visiting_a_node_twice_is_forbidden): Rename
diff_context::traversing_a_node_twice_is_forbidden into this.
(diff_context::maybe_apply_filters): Adjust.
(diff::end_traversing): Remove the 'mark_as_traversed' parameter
of this. Remove the visited-marking code.
(diff::traverse): This is the crux of the changes of this patch.
Avoid traversing a node that is being traversed, but one can visit
a node being visited. Also, traversing a node means visiting it
and visiting its children nodes.
(diff::is_filtered_out): Simplify logic for filtering redundant
code. Basically all nodes that are redundant are filtered. All
the complicated logic that was due when diff nodes were shared is
not relevant anymore.
(corpus_diff::priv::categorize_redundant_changed_sub_nodes)
(propagate_categories, apply_suppressions)
(diff_node_printer::diff_node_printer, print_diff_tree)
(categorize_redundant_changed_sub_nodes)
(clear_redundancy_categorization)
(clear_redundancy_categorization): Adjust.
(redundancy_marking_visitor::visit_begin): Adjust. Also, if the
current diff node is already being traversed (that's a clyclic
node) then mark it as redundant.
* src/abg-comp-filter.cc (apply_filter): Adjust.
* tests/data/test-diff-filter/test16-report-2.txt: New test input data.
* tests/data/test-diff-filter/libtest25-cyclic-type-v{0,1}.so: New
test input binaries.
* tests/data/test-diff-filter/test25-cyclic-type-v{0,1}.cc: Source
code for the test input binaries.
* tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: New
test input data.
* tests/data/test-diff-filter/test25-cyclic-type-report-1.txt:
Likewise.
* tests/test-diff-filter.cc (in_out_specs): Add the new test
inputs above to the list of test input data over which to run this
test harness.
* tests/data/Makefile.am: Add the new test files above to source
distribution.
* tests/data/test-diff-filter/test16-report.txt: Adjust.
* tests/data/test-diff-filter/test17-0-report.txt: Likewise.
2015-01-20 Dodji Seketeli <dodji@redhat.com>
Tighten the condition for creating a cloned function from DWARF
* src/abg-dwarf-reader.cc (build_ir_node): Re-indent. Also,
consider that when a DIE C refers to a DIE A via the
DW_abstract_origin attribute, C represents a clone of A, only if C
and A have *different* linkage names.
2015-01-19 Dodji Seketeli <dodji@redhat.com>
Fix the output of the array diff report
* src/abg-comparison.cc (array_diff::report): Refer to the pretty
representation of the array when talking about changes of the
array element type.
* src/abg-ir.cc (equals): In the overload for array_type, use the
equality operator that knows how to handle null pointers to
element type. This avoids crashes when the pointer to element
type is null.
* tests/data/test-diff-dwarf/test10-report.txt: Adjust.
* tests/data/test-diff-filter/test24-compatible-vars-report-1.txt:
Likewise.
2015-01-14 Dodji Seketeli <dodji@redhat.com>
Do not install the generated documentation by default
* doc/manuals/Makefile.am: Do not install the generated
documentation by default
2015-01-14 Dodji Seketeli <dodji@redhat.com>
Make sure to install html docs & gziped info on make install
* doc/manuals/Makefile.am: Make sure Make sure to install html
docs & gziped info on make install
2015-01-14 Dodji Seketeli <dodji@redhat.com>
Do not install the abinilint program
* tools/Makefile.am: Add abinilint to the noinst_PROGRAMS primary.
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Small grammar fix in a manpage title
* doc/manuals/conf.py: Fix the grammar of the title of the abidiff
man page.
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Generate texinfo documentation properly
* doc/manuals/Makefile.am: Generate texinfo doc, install it and
uninstall it.
* doc/manuals/libabigail-tools.rst: Do not use the :doc: syntax to
refer to documents because it doesn't seem to work with sphinx
right now. Rather, use a table of content.
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Fix man pages installation
* doc/manuals/Makefile.am: Install the man pages only if they are
generated.
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Bump the candidate version of the library to 1.0
* configure.ac: Bump version to 1.0.0
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Do not forget to install the Manpages
* doc/manuals/Makefile.am: Add the man pages to the man7_MANS
automake primary.
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Adjust archive-related code for the recent addition of tools_utils::*
* tests/Makefile.am: tools/libtoolsutils.la is no more.
* tests/test-write-read-archive.cc (main): Adjust.
* tools/abiar.cc (extract_tus_from_archive): Likewise.
2015-01-13 Dodji Seketeli <dodji@redhat.com>
Generate Manpages for abidiff, abidw, abilint
* doc/manuals/conf.py: Define man pages for abidiff, abidw,
abilint and an introductory one for libabigail.
2015-01-09 Dodji Seketeli <dodji@redhat.com>
Sort functions & variables diff nodes in the diff tree
* include/abg-comparison.h (function_decl_diff_sptrs_type)
(var_diff_sptrs_type): New typedefs.
(corpus_diff::{changed_functions, changed_variables}): Declare new
methods.
* src/abg-comparison.cc (sort_string_function_decl_diff_sptr_map)
(sort_string_var_diff_sptr_map): Forward declare these static
functions there were already defined later.
(struct diff_less_than_functor): Define new comparison functor.
(diff::append_child_node): Sort the children diff nodes of a given
diff node.
(corpus_diff::priv::changed_fns_map_): Renamed the data member
corpus_diff::priv::changed_fns_ into this.
(corpus_diff::priv::changed_fns_): New data member that is a
sorted vector of changed functions.
(corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables}):
Adjust changed_fns_ -> changed_fns_map_ and changed_vars_ ->
changed_vars_map_.
(corpus_diff::priv::ensure_lookup_tables_populated): Likewise.
Sort the changed functions and changed variables.
(corpus_diff::priv::apply_filters_and_compute_diff_stats): Adjust
changed_fns_ -> changed_fns_map_ and changed_vars_ ->
changed_vars_map_. Also, walk the changed functions and variables
diff nodes in their sorted order.
(corpus_diff::priv::{categorize_redundant_changed_sub_nodes,
clear_redundancy_categorization, maybe_dump_diff_tree}): Walk the
changed functions and variables diff nodes in their sorted order.
* include/abg-ir.h
(function_decl::get_pretty_representation_of_declarator):
Declarenew method.
* src/abg-ir.cc
(function_decl::get_pretty_representation_of_declarator): Define
new function. Its content got split out of ...
(function_decl::get_pretty_representation): ... this one.
* src/abg-comparison.cc (corpus_diff::chain_into_hierarchy):
Consider the sorted the children nodes of a diff tree node.
(corpus_diff::append_child_node): Keep the children nodes of a
diff tree node sorted.
(corpus_diff::{changed_functions, changed_variables, length,
report}): Adjust.
(corpus_diff::{changed_functions_sorted,
changed_variables_sorted}): Define new functions.
(function_comp::operator()): First compare the qualified function
names along with the parameter declarations, then the rest.
(sort_string_function_decl_diff_sptr_map)
(sort_string_var_diff_sptr_map): Adjust.
* tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt:
Adjust.
2015-01-09 Dodji Seketeli <dodji@redhat.com>
Fix logic of function parmeters diff redundancy detection
* src/abg-comparison.cc (redundancy_marking_visitor::visit_begin):
For a given function parameter diff node N, we were comparing it
against the other parmeter diff nodes of the function. This
change ensures that we do not compare N against itself.
2015-01-09 Dodji Seketeli <dodji@redhat.com>
Update copyright year for tests/test-abicompat.cc
* tests/test-abicompat.cc: Update copyright year.
2015-01-09 Dodji Seketeli <dodji@redhat.com>
Enhance the format of the diff tree dumping report
* src/abg-comparison.cc (diff_node_printer::do_indent): New
method.
(diff_node_printer::visit): Use diff_node_printer::do_indent().
Print the addresses of the diff tree node and its canonical node.
Add some vertical spaces and some indenting to make the report
more readable.
2015-01-08 Dodji Seketeli <dodji@redhat.com>
Expose a new libabigail::tools_utils namespace
* include/abg-tools-utils.h: Moved tools/abg-tools-utils.h in
here. Renamed the namespace tools into tools_utils. Inject
std::ostream, std::istream, std::ifstream, and std::string types
into the tools_utils namespace. Adjust the function declarations
accordingly. Remove the useless dirname() function declaration.
* include/Makefile.am: Add abg-tools-utils.h to the list of
exported headers.
* src/abg-tools-utils.cc: Moved tools/abg-tools-utils.cc in here.
Renamed the namespace tools into tools_utils.
(get_stat): Add apidoc.
(is_dir): Cleanup apidoc.
(dir_name); Cleanup parameter name.
(guess_file_type): Cleanup parameter type.
* src/Makefile.am: Add abg-tools-utils.cc to the list of exported
headers.
* tools/Makefile.am: Do not build the temporary library
libtoolsutils.la anymore as abg-tools-utils.{h,cc} have moved out
of this directory.
* tools/abicompat.cc (parse_command_line, main): Adjust for tools
-> tools_utils namespace change.
* tools/abidiff.cc (parse_command_line, main): Likewise.
* tools/abidw.cc (parse_command_line, main): Likewise.
* tools/abilint.cc (parse_command_line, main): Likewise.
* tests/test-abicompat.cc (main): Adjust for tools -> tools_utils
namespace change.
* tests/test-abidiff.cc (main): Likewise.
* tests/test-alt-dwarf-file.cc (main): Likewise.
* tests/test-core-diff.cc (main): Likewise.
* tests/test-diff-dwarf.cc (main): Likewise.
* tests/test-diff-filter.cc (main): Likewise.
* tests/test-diff-suppr.cc (main): Likewise.
* tests/test-lookup-syms.cc (main): Likewise.
* tests/test-read-dwarf.cc (main): Likewise.
* tests/test-read-write.cc (main): Likewise.
* tests/Makefile.am: Do not reference the libtoolsutils.la private
library anymore.
2015-01-07 Dodji Seketeli <dodji@redhat.com>
Update copyright years
* include/abg-comp-filter.h: Update copyright years.
* include/abg-comparison.h: Likewise.
* include/abg-config.h: Likewise.
* include/abg-corpus.h: Likewise.
* include/abg-diff-utils.h: Likewise.
* include/abg-dwarf-reader.h: Likewise.
* include/abg-fwd.h: Likewise.
* include/abg-hash.h: Likewise.
* include/abg-ini.h: Likewise.
* include/abg-ir.h: Likewise.
* include/abg-libxml-utils.h: Likewise.
* include/abg-libzip-utils.h: Likewise.
* include/abg-reader.h: Likewise.
* include/abg-sptr-utils.h: Likewise.
* include/abg-traverse.h: Likewise.
* include/abg-viz-common.h: Likewise.
* include/abg-viz-dot.h: Likewise.
* include/abg-viz-svg.h: Likewise.
* include/abg-writer.h: Likewise.
* src/abg-comp-filter.cc: Likewise.
* src/abg-comparison.cc: Likewise.
* src/abg-config.cc: Likewise.
* src/abg-corpus.cc: Likewise.
* src/abg-diff-utils.cc: Likewise.
* src/abg-dwarf-reader.cc: Likewise.
* src/abg-hash.cc: Likewise.
* src/abg-ini.cc: Likewise.
* src/abg-ir.cc: Likewise.
* src/abg-libxml-utils.cc: Likewise.
* src/abg-libzip-utils.cc: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-traverse.cc: Likewise.
* src/abg-viz-common.cc: Likewise.
* src/abg-viz-dot.cc: Likewise.
* src/abg-viz-svg.cc: Likewise.
* src/abg-writer.cc: Likewise.
* tests/print-diff-tree.cc: Likewise.
* tests/test-abidiff.cc: Likewise.
* tests/test-alt-dwarf-file.cc: Likewise.
* tests/test-core-diff.cc: Likewise.
* tests/test-diff-dwarf.cc: Likewise.
* tests/test-diff-filter.cc: Likewise.
* tests/test-diff-suppr.cc: Likewise.
* tests/test-diff2.cc: Likewise.
* tests/test-ir-walker.cc: Likewise.
* tests/test-lookup-syms.cc: Likewise.
* tests/test-read-dwarf.cc: Likewise.
* tests/test-read-write.cc: Likewise.
* tests/test-utils.cc: Likewise.
* tests/test-utils.h: Likewise.
* tests/test-write-read-archive.cc: Likewise.
* tools/abg-tools-utils.cc: Likewise.
* tools/abg-tools-utils.h: Likewise.
* tools/abiar.cc: Likewise.
* tools/abidiff.cc: Likewise.
* tools/abidw.cc: Likewise.
* tools/abilint.cc: Likewise.
* tools/abisym.cc: Likewise.
* tools/binilint.cc: Likewise.
2015-01-07 Dodji Seketeli <dodji@redhat.com>
Detect and report changes in ELF architecture
* configure.ac: Detect the presence of libebl.a and add it to the
list of library we depend on to build libabigail. Report when
libelf.so is not found.
* include/abg-comparison.h:
(diff_context::show_architecture_change): Declare new accessors.
(corpus_diff::architecture_changed): Declare new method.
* include/abg-corpus.h (corpus::{get,set}_architecture_name):
Declare new accessors.
* src/abg-comparison.cc
(diff_context::priv::show_architecture_change_): New data member.
(diff_context::priv::priv): Initialize it.
(diff_context::show_architecture_change): Define new accessors.
(function_decl_diff::report): Report when the size/alignment of
the function address changes.
(corpus_diff::priv::architectures_equal_): New data member.
(corpus_diff::priv::priv): Initialize it.
(corpus_diff::priv::emit_diff_stats): Take in account changes of
architecture.
(corpus_diff::architecture_changed): Define new method.
(corpus_diff::length): Take in account changes of architecture.
(corpus_diff::report): Report about changes of architecture.
(compute_diff): In the overload for corpus_diff_sptr, detect
changes fo architecture.
* src/abg-corpus.cc (corpus_priv::architecture_name): Define new
data member.
(corpus::{get,set}_architecture_name): Define new method.
* src/abg-dwarf-reader.cc: Include elfutils/libebl.h to use
ebl_openbackend() and ebl_backend_name()
(read_context::elf_architecture_): Define new data member.
(read_context::elf_architecture): Define new accessor.
(read_context::{load_elf_architecture, load_remaining_elf_data}):
Define new methods.
(read_corpus_from_elf): Use ctxt.load_remaining_elf_data() in lieu
of ctxt.load_dt_soname_and_needed. Stick the architecture into
the corpus.
* src/abg-reader.cc (read_corpus_from_input): Read the
'architecture' XML property.
* src/abg-writer.cc (write_corpus_to_native_xml): Write the
'architecture' XML property.
* tests/data/test-diff-dwarf/libtest-23-diff-arch-v0-32.so: New
test input file.
* tests/data/test-diff-dwarf/libtest-23-diff-arch-v0-64.so:
Likewise.
* tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt:
Likewise.
* tests/data/test-diff-dwarf/test-23-diff-arch-v0.cc: Source code
for the binary test input files above.
* tests/data/Makefile.am: Add the new test input files to the
source distribution.
* tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
data to the set of input data to run this test harness over.
* tests/test-read-dwarf.cc (main): Do not take the architecture in
account during comparisons.
2015-01-05 Sinny Kumari <skumari@redhat.com>
Include libabigail-website.doxy file in EXTRA_DIST
* doc/Makefile.am: Include website/libabigail-website.doxy
file in EXTRA_DIST
2015-01-06 Dodji Seketeli <dodji@redhat.com>
Delete ltsugar.m4 and pkg.m4 files from m4/
* m4/ltsugar.m4: Removed.
* m4/pkg.m4: Likewise.
2014-12-27 Dodji Seketeli <dodji@redhat.com>
Enable parallel tests
* configure.ac (AM_INIT_AUTOMAKE): Enable parallel tests by
switching on the parallel-tests option.
2014-12-27 Dodji Seketeli <dodji@redhat.com>
Add a --dump-diff-tree to abidiff for debugging purposes
* include/abg-comparison.h (enum visiting_kind): Add new
DO_NOT_MARK_VISITED_NODES_AS_TRAVERSED enumerator.
(diff_context::{default_output_stream, error_output_stream,
dump_diff_tree}): Declare new accessors.
(diff::end_traversing): Take a new boolean flag.
(print_diff_tree): Add new overload for diff_sptr.
* src/abg-comparison.cc
(diff_context::priv::{default_output_stream_,
error_output_stream_, dump_diff_tree_}): New data members.
(priv::priv): Initialize them.
(diff_context::{default_output_stream_, error_output_stream_,
dump_diff_tree, dump_diff_tree}): Define new accessors.
(diff::end_traversing): Take a new flag that control whether or
not to mark the current diff node as having been traversed.
(diff::traverse): Take in account the visiting kind carried by the
visitor to determine if the visited node should be marked as being
traversed.
(corpus_diff::priv::maybe_dump_diff_tree): Define new member
function.
(corpus_diff::report): Call it.
(diff_node_printer::visit): Pretty print the diff node just once.
(print_diff_tree): Define a new overload for diff_sptr.
* tools/abidiff.cc (options::dump_diff_tree): New data member.
(options::options): Initialize it.
(display_usage): Add a help string for the new --dump-diff-tree
command line switch.
(parse_command_line): Parse the new --dump-diff-tree command line
switch.
(set_diff_context_from_opts): Set the diff context according to
the --dump-diff-tree presence.
* doc/manuals/abidiff.rst: Add a bullet point for the new
--dump-diff-tree command line switch.
2014-12-27 Dodji Seketeli <dodji@redhat.com>
Fix typos in the abicompat manual
* doc/manuals/abicompat.rst: Fix typos.
2014-12-27 Dodji Seketeli <dodji@redhat.com>
Fix a typo in the abidiff manual
* doc/manuals/abidiff.rst: Fix a typo.
2014-12-27 Dodji Seketeli <dodji@redhat.com>
Fix redundancy in abidiff manual
* doc/manuals/abidiff.rst: Remove the redundant bullet point about
the --drop-fn command line switch.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Fix the doc string of the CanonicalDiff section of the apidoc
* src/abg-comparison.cc: The summary of the CanonicalDiff should
not be a @par directive, otherwise it won't show up in the summary
field on the html-genereated page.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Update doc string for new --no-redundant option of abidiff
* doc/manuals/abidiff.rst: Update the documentation string for the
--no-redundant option of abidiff.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Make abidiff *NOT* show redundant changes by default
* tools/abidiff.cc (options::options): Initialize
options::show_redundant_changes to false.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Try harder to handle pointer/reference to void
* include/abg-fwd.h (type_or_void): Declare new function.
* src/abg-ir.cc (type_or_void): Define it.
(pointer_type_def::pointer_type_def)
(reference_type_def::reference_type_def)
(reference_type_def::get_qualified_name, strip_typedef): Use it to
ensure that empty pointed-to-type is considered as a void type.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Do not mark sibling structurally identical nodes as redundant
* include/abg-comparison.h (diff::parent_node): Declare new
accessor.
* src/abg-comparison.cc (diff::priv::parent_): New data member.
(diff::priv::priv): Initialize it.
(diff::parent_node): Define new accessor.
(diff::append_child_node): Set the diff::priv::parent_ data member
of the added child node.
(redundancy_marking_visitor::visit_begin): If two (logical)
sibbling nodes are structurally equivalent, do not mark them as
being redundant.
* tests/data/test-diff-suppr/libtest10-changed-parm-c-v0.so: New
test input binary.
* tests/data/test-diff-suppr/libtest10-changed-parm-c-v1.so:
Likewise.
* tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt:
New test input data.
* tests/data/test-diff-suppr/test10-changed-parm-c-v0.c: Source
code for the binary input above.
* tests/data/test-diff-suppr/test10-changed-parm-c-v1.c: Likewise.
* tests/data/Makefile.am: Add the new test files to source
distribution.
* tests/test-diff-suppr.cc (in_out_specs): Add the new test input
to the vector of test inputs to run this harness over.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Un-share diff nodes in the comparison IR
* include/abg-ir.h: Prefix the doc string with "///", rather than
writing it inside a /**/ comment.
* include/abg-comparison.h (function_decl_diff)
(function_decl_diff_sptr, fn_parm_diff, fn_parm_diff_sptr)
(var_diff_sptr, base_diff, class_diff, class_diff_sptr): Move
these class & typedef decls to the top of the file.
(string_changed_base_map, string_changed_parm_map)
(unsigned_changed_parm_map, changed_function_ptr)
(string_changed_function_ptr_map): Remove these typedefs.
(string_base_diff_sptr_map, string_fn_parm_diff_sptr_map)
(unsigned_fn_parm_diff_sptr_map, string_var_diff_sptr_map)
(unsigned_var_diff_sptr_map, string_function_decl_diff_sptr_map)
(string_var_diff_ptr_map): New typedefs.
(diff_context::{has_diff_for,add_diff}): Make these member
functions private.
(diff_context::{set_canonical_diff_for,
set_or_get_canonical_diff_for}): Declare new private member
functions.
(diff_context::{get_canonical_diff_for,
initialize_canonical_diff}): New public member functions.
(diff_context::maybe_apply_filters): Set the default value of the
'traverse_nodes_once' parameter to false.
(compute_diff): Make the overload for class_decl_sptr friend of
the diff_context class.
(class diff): Make the diff_context class a friend of this one.
(diff::set_canonical_diff): Declare new private member function.
(diff::get_canonical_diff): Declare new public member function.
(diff::children_nodes): Make this return a vector<diff_sptr>, rather
than a vector<diff*>.
(diff::append_child_node): Make this take a diff_sptr rather than
a diff*.
(class fn_parm_diff): Declare new type.
(compute_diff): Declare new overload for the new
function_decl::parameter_sptr.
(function_decl_diff::subtype_changed_parms): Return a
string_fn_parm_diff_sptr_map rather than a string_changed_parm.
(function_decl_diff::children_nodes): Return a vector<diff_sptr>.
(function_decl_diff::append_child_node): Take a diff_sptr.
(function_decl_diff::changed_functions): Return a
string_function_decl_diff_sptr_map.
(function_decl_diff::changed_variables): Return a
string_var_diff_sptr.
(class function_decl::parameter): Make this a pimpled class.
Also, make it inherit decl_base.
(equals): New overload for function_decl::parameter.
(struct function_decl::parameter::hash): Declare this.
(ir_node_visitor::visit): Declare new overload for
function_decl::parameter.
* src/abg-comparison.cc: Add doc-string about the internal
representation of the comparison engine and also about the concept
of canonical diff of the comparison engine.
(RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER)
(RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2)
(RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3): Consider the
canonical diff when trying to know if the current node was
reported earlier.
(diff_context::priv::canonical_diffs): New data member.
(diff_context::{get_canonical_diff_for, set_canonical_diff_for,
set_or_get_canonical_diff_for, initialize_canonical_diff}): Define
new member functions.
(diff_context::{diff_has_been_traversed, mark_diff_as_traversed):
Consider canonical diff for these tests and actions.
(diff::priv::children_): Change the type of this to
vector<diff_sptr>.
(diff::canonical_diff_): New data member.
(diff::diff): Initialize the diff::canonical_diff_ data member.
(diff::begin_traversing): Mark the canonical diff node too.
(diff::is_traversing): Consider the canonical diff node in this
test.
(diff::end_traversing): Make the canonical diff node too. Also
mark the current node as having been traversed.
(diff::children_nodes): Return a vector<diff_sptr> type.
(diff::{get_canonical_diff, set_canonical_diff}): Define new
member functions.
(diff::append_child_node): Take a diff_sptr type parameter.
(diff::{reported_once, currently_reporting}): Flag the canonical
diff node too. And consider the canonical diff node when checking
the flag.
(diff::traverse): No need to mark the node as being traversed
because the diff::end_traversing() function does it now. Adjust
the code because diff::children_nodes() now returns
vector<diff_sptr>.
({distinct_diff, var_diff, pointer_diff, array_diff,
reference_diff, qualified_type_diff, enum_diff, class_diff,
base_diff, scope_diff, function_decl_diff, typedef_diff,
corpus_diff}::chain_into_hierarchy): Adjust to the new type that
diff::append_child_node() takes. Also, take into account that the
diff nodes are now un-shared.
(compute_diff_for_distinct_kinds, compute_diff_for_types)
(compute_diff): Do not share diff nodes anymore. Initialize the
canonical diff node for the new created node.
(represent): Take a var_diff_sptr rather than two var_decl_sptr.
Adjust. Also take in account the fact that diff nodes are not
shared anymore, and that they do have canonical diffs.
(var_diff::type_diff): Make the computation of the type_diff of
the var_diff be lazy. This avoids infinite (recursive) creation
of diff nodes when a class diff node has a sub-type of data member
that is a class diff node too.
(var_diff::report): Detect redundant reporting of this kind of
diff node.
(class_diff::priv::changed_bases_): Change the type of this to
string_base_diff_sptr_map.
(class_diff::priv::subtype_changed_dm_): Change the type of this
to string_var_diff_sptr_map.
(class_diff::priv::changed_dm_): Change the type of this to
unsigned_var_diff_sptr_map.
(class_diff::priv::{count_filtered_subtype_changed_dm,
count_filtered_bases}): Do not take a diff_context_sptr anymore.
(class_diff::ensure_lookup_tables_populated): changed_bases_
subtype_changed_dm_ and changed_dm_ are now *NOT* shared diff
nodes anymore.
(class_diff::priv::base_has_changed): Adjust.
(class_diff::priv::subtype_changed_dm): Adjust.
(class_diff::priv::count_filtered_bases): Adjust as changed_bases_
is now a map of un-shared diff nodes.
(class_diff::priv::count_filtered_subtype_changed_dm): Adjust as
subtype_changed_dm_ is now a map of un-shared diff nodes.
(class_diff::priv::{count_filtered_changed_mem_fns,
count_filtered_inserted_mem_fns, count_filtered_deleted_mem_fns,
}): Adjust for change of the default parameter value of
diff_context::maybe_apply_filters().
(class_diff::~class_diff): New destructor.
(class_diff::changed_bases): Return a string_base_diff_sptr_map&
type.
(class_diff::{inserted_data_members, deleted_data_members,
changed_member_fns}): Add doc strings.
(struct changed_data_member_comp): Remove.
(struct var_diff_comp): New comparison functor.
(sort_changed_data_members): Remove.
(sort_var_diffs): Define new sorting function.
(class_diff::report): Adjust.
(fn_parm_diff::*): Define member types and functions of the new
fn_parm_diff type.
(function_decl_diff::priv::{subtype_changed_parms_,
changed_parms_by_id_}): Make these take a map of fn_parm_diff_sptr
nodes.
(function_decl_diff::ensure_lookup_tables_populated): Adjust to
the fact that priv_->subtype_changed_parms_ and
priv_->priv_->changed_parms_by_id_ now are maps of un-shared
fn_parm_diff_sptr nodes.
(function_decl_diff::subtype_changed_parms): Adjust.
(struct changed_parm_comp): Remove.
(struct fn_parm_diff_comp): New comparison functor.
(sort_changed_parm_map): Remove.
(sort_string_fn_parm_diff_sptr_map): New sorting function.
(function_decl_diff::report): Adjust.
(corpus_diff::priv::children_): Change the type of this to
vector<diff_sptr>.
(corpus_diff::priv::changed_fns_): Changed the type of this to
string_function_decl_diff_sptr_map.
(corpus_diff::priv::changed_vars_): Changed the type of this to
string_var_diff_sptr_map.
(corpus_diff::priv::ensure_lookup_tables_populated): Adjust.
(corpus_diff::priv::apply_filters_and_compute_diff_stats}):
Adjust. Do not need to clear redundancy categorization anymore
because the diff nodes are not shared anymore.
(corpus_diff::priv::categorize_redundant_changed_sub_nodes):
Adjust.
(corpus_diff::priv::clear_redundancy_categorization): Adjust.
(corpus_diff::changed_variables): Adjust.
(struct changed_function_ptr_comp): Remove.
(struct function_decl_diff_comp): New comparison functor.
(sort_string_changed_function_ptr_map): Remove.
(sort_string_function_decl_diff_sptr_map): Define new sorting
function.
(struct changed_vars_comp): Remove.
(struct var_diff_sptr_comp): New comparison functor.
(sort_changed_vars): Remove.
(sort_string_var_diff_sptr_map): Define new sorting function.
(corpus_diff::report): Adjust.
(corpus_diff::traverse): Adjust.
({category_propagation_visitor,
suppression_categorization_visitor}::visit_end): Adjust.
(clear_redundancy_categorization): Adjust.
* src/abg-hash.cc (function_decl::parameter::hash::operator):
Adjust.
* src/abg-ir.cc (struct function_decl::parameter::priv): Define
here as part of pimpl-ifying the function_decl::parameter type.
(function_decl::parameter::*): Define here the member functions as
part of pimpl-ifying the function_decl::parameter type.
(equals): Define the overload for function_decl::parameter here
too.
(ir_node_visitor::visit(function_decl::parameter*)): Define this.
* tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
* tests/data/test-diff-dwarf/libtest21-redundant-fn-v0.so: New
test input data.
* tests/data/test-diff-dwarf/libtest21-redundant-fn-v1.so:
Likewise.
* tests/data/test-diff-dwarf/test21-redundant-fn-v0.cc: Source
code for test input binary above.
* tests/data/test-diff-dwarf/test21-redundant-fn-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: New
test input data.
* tests/data/test-diff-dwarf/libtest22-changed-parm-c-v0.so: New
test input data.
* tests/data/test-diff-dwarf/libtest22-changed-parm-c-v1.so:
Likewise.
* tests/data/test-diff-dwarf/test22-changed-parm-c-v0.c: Source
code for test input binary above.
* tests/data/test-diff-dwarf/test22-changed-parm-c-v1.c: Likewise.
* tests/test-diff-dwarf.cc (in_out_spec): Add the new test input
data to the vector the test inputs to run this harness over.
* tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: New
test input data.
* tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt:
Likewise.
* tests/data/test-diff-suppr/libtest8-redundant-fn-v0.so: New test
input binary.
* tests/data/test-diff-suppr/libtest8-redundant-fn-v1.so: Likewise.
* tests/data/test-diff-suppr/test8-redundant-fn-v0.cc: Source code
code for binary test input above.
* tests/data/test-diff-suppr/test8-redundant-fn-v1.cc: Likewise.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt:
New test input data.
* tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt:
Likewise.
* tests/data/test-diff-suppr/libtest9-changed-parm-c-v0.so: New
test input binary.
* tests/data/test-diff-suppr/libtest9-changed-parm-c-v1.so: New
test input binary.
* tests/data/test-diff-suppr/test9-changed-parm-c-v0.c: Source
code for binary test input above.
* tests/data/test-diff-suppr/test9-changed-parm-c-v1.c: Likewise.
* tests/test-diff-suppr.cc (in_out_specs): Add the new test input
data to the vector the test inputs to run this harness over.
* tests/data/Makefile.am: Add the new files to the source
distribution.
2014-12-26 Dodji Seketeli <dodji@redhat.com>
Style fix
* src/abg-ir.cc (reference_type_def::get_pointed_to_type): Return
a type_base_sptr.
* src/abg-comparison.cc (diff::is_filtered_out): Fix a comment.
2014-12-25 Dodji Seketeli <dodji@redhat.com>
Fix pretty printing of pointer_diff node
* src/abg-comparison.cc (pointer_diff::get_pretty_representation):
Add the missing opening square bracket.
2014-12-17 Sinny Kumari <skumari@redhat.com>
Add new methods in corpus_diff class
* include/abg-comparison.h
(corpus_diff::added_unrefed_function_symbols):
Declare new member function
(corpus_diff::added_unrefed_variable_symbols):
Declare new member function
* src/abg-comparison.cc
(corpus_diff::added_unrefed_function_symbols):
Define new member function
(corpus_diff::added_unrefed_variable_symbols):
Define new member function
2014-12-15 Sinny Kumari <sinny@redhat.com>
Add new corpus_diff::added_variables() method
* include/abg-comparison.h (corpus_diff::added_variables):
Declare new member function
* src/abg-comparison.cc (corpus_diff::added_variables):
Define new member function
2014-12-12 Dodji Seketeli <dodji@redhat.com>
Extend detection of compatible types to arrays
* include/abg-fwd.h (is_array_type): Renamed is_array_type_def()
into this for consistency.
* src/abg-comparison.cc (type_suppression::suppresses_diff):
Adjust.
* src/abg-dwarf-reader.cc (build_array_type): Remove useless code
that was trying to read a DW_AT_byte_size attribute from the DIE
of the array, but then wasn't doing anything with the value. But
then if the attribute was not present, the array type wouldn't be
built.
* src/abg-ir.cc (strip_typedef): Strip typedefs from sub-types of
array types too.
(is_array_type): Rename is_array_def() to this, for consistency.
(var_decl::get_pretty_representation): Adjust.
* tests/data/test-diff-filter/libtest24-compatible-vars-v0.so: New
test input data.
* tests/data/test-diff-filter/libtest24-compatible-vars-v1.so: Likewise.
* tests/data/test-diff-filter/test24-compatible-vars-report-0.txt:
Likewise.
* tests/data/test-diff-filter/test24-compatible-vars-v0.c: Source
code for the first binary above.
* tests/data/test-diff-filter/test24-compatible-vars-v1.c: Source
code for the second binary above.
* tests/data/Makefile.am: Add the new test input data to source
distribution.
* tests/test-diff-filter.cc (in_out_specs): Add the new test input
data to the list of input to run this test harness over.
2014-12-12 Dodji Seketeli <dodji@redhat.com>
Improve the doc string for the elf_symbol::get_id_string() method
* src/abg-ir.cc (elf_symbol::get_id_string): Improve doc string.
Talk about the content of the id string of an elf symbol.
2014-12-11 Dodji Seketeli <dodji@redhat.com>
Better handle pointer-to-void in various places of the pipeline
* src/abg-comparison.cc (pointer_diff::report): Handle the case of
pointer to void.
* src/abg-dwarf-reader.cc (build_pointer_type_def): Assert that
the underlying pointer is non-null.
* src/abg-ir.cc (pointer_type_def::pointer_type_def): Handle the
case of pointer to void.
(equals): Likewise in the overload for const pointer_type_def.
(pointer_type_def::get_qualified_name): Likewise.
2014-12-11 Dodji Seketeli <dodji@redhat.com>
Try harder to detect a DWARF attribute pointing into alternate DWARF section
* src/abg-dwarf-reader.cc
(is_die_attribute_resolved_through_gnu_ref_alt): Support the case
of the origin function itself having a specification function
link.
2014-12-11 Dodji Seketeli <dodji@redhat.com>
Fix accidentally removing the scope of variables when fixing them up
* src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
During var decl fixup, remove the scope of a variable only when we
are sure that we want to re-scope it.
2014-12-11 Dodji Seketeli <dodji@redhat.com>
Fix several aborts while diffing libdw.so
* src/abg-corpus.cc
(corpus::priv::build_unreferenced_symbols_tables): Fix wrong
guestimation of the size of the map of unreferenced symbol table.
* src/abg-dwarf-reader.cc (get_version_needed_for_versym): Honour
the conditions of breaking out from walking the verneed table.
2014-12-10 Dodji Seketeli <dodji@redhat.com>
Temporarily disable redundant diff report elimination
* src/abg-comparison.cc
(diff_context::priv::priv): Show redundant changes by default.
(categorize_redundancy): Do not categorize redundancy if the
diff_context says that we shouldn't.
* tools/abicompat.cc (options::show_redundant): New data member.
(options::options): Initialize to true.
(display_usage): Add new help string for new --no-redundant and
--redundant options.
(parse_command_line): Parse new --no-redundant and --redundant
command line options.
(main): Initialize the diff context with respect to the
options::show_redundant property.
* tools/abidiff.cc (options::options): Initialize the
show_redundant_changes data member to true.
(display_usage): Show new help string for the new --no-redundant
command line option.
(parse_command_line): Parse the new --no-redundant command line
option.
* tests/data/test-diff-filter/libtest23-redundant-fn-parm-change-v0.so:
New test data input.
* tests/data/test-diff-filter/libtest23-redundant-fn-parm-change-v1.so:
Likewise.
* tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt:
Likewise.
* tests/data/test-diff-filter/test23-redundant-fn-parm-change-v0.c:
Source code for the first binary above.
* tests/data/test-diff-filter/test23-redundant-fn-parm-change-v1.c:
Source code for the second binary above.
* tests/data/Makefile.am: Add the new test data input to source
distribution.
* tests/test-abicompat.cc (in_out_specs): Add --no-redundant to
abicompat when we don't want it to show redundant diff reports.
* test-diff-filter.cc (in_out_specs): Likewise for abidiff.
* test-diff-suppr.cc (in_out_specs): Likewise.
2014-12-10 Jan Engelhardt <jengelh@inai.de>
Fix conditional build wrt zip archives and cx11
* configure.ac: remove (broken) assignment to the
ENABLE_ZIP_ARCHIVE_AND_CXX11 variable
* Makefile.am: replace variable assignments to
ZIP_ARCHIVE_TESTS_FIRST_PART, ZIP_ARCHIVE_TESTS_SECOND_PART
by ZIP_ARCHIVE_TESTS using the "+=" automake operator.
Likewise for CXX11_TESTS.
2014-12-10 Dodji Seketeli <dodji@redhat.com>
Make determining of compatible types complete
* include/abg-fwd.h (is_reference_type, is_function_type)
(is_method_type): Declare new predicates.
* include/abg-ir.h (class qualified_type_def): Pimpl this class.
(qualified_type_def::qualified_type_def): Use the convenience
type_base_sptr typedef.
(qualified_type_def::{get_cv_quals, set_cv_quals}): Use the
qualified_type_def::CV type rather than char.
(qualified_type_def::get_underlying_type): Use the convenience
type_base_sptr typedef.
(pointer_type_def::pointer_type_def): Likewise.
(function_decl::parameter::parameter): Add a new constructor.
* src/abg-ir.cc (is_reference_type, is_function_type)
(is_method_type): Define new predicates.
(class qualified_type_def::priv): Define this new private type,
for the purpose of Pimpl-ifying the qualified_type_def class.
(qualified_type_def::{qualified_type_def, build_name,
get_cv_quals_string_prefix, get_underlying_type}): Adjust for the
purpose of Pimpl-ifying the qualified_type_def class.
(equals): In the qualified_type_def, reference_type_def overloads,
trust the fact that we have operator== overload for the
type_base_sptr. This avoids crashes for when the (possible)
underlying type is null.
(pointer_type_def::operator==): Likewise.
(strip_typedef): Make this recursively strip
typedefs from sub-types.
(types_are_compatible): Handle null types.
(qualified_type_def::{get_cv_quals, set_cv_quals}): Handle
qualified_type_def::CV rather than char.
(pointer_type_def::pointer_type_def): Use the convenience
type_base_sptr typedef.
* include/abg-comparison.h (distinct_diff::compatible_child_diff):
Declare new member function.
* src/abg-comparison.cc (distinct_diff::compatible_child_diff):
Define new member function.
(distinct_diff::chain_into_hierarchy):
Chain the compatible child diff node that might be present.
(distinct_diff::report): Now when a distinct diff carries a
compatible change, mention it in the report.
* src/abg-comp-filter.cc (is_compatible_change): A compatible
change can now involve types that are not typedefs. Only their
sub-types need to be involved with typedef-ness.
* tests/data/test-diff-dwarf/test{2,4,5}-report.txt: Adjust.
* tests/data/test-diff-filter/libtest21-compatible-vars-v0.so: New
test data input.
* tests/data/test-diff-filter/libtest21-compatible-vars-v1.so: Likewise.
* tests/data/test-diff-filter/test21-compatible-vars-report-0.txt Likewise.
* tests/data/test-diff-filter/test21-compatible-vars-report-1.txt Likewise.
* tests/data/test-diff-filter/test21-compatible-vars-v0.cc: Source
code for the first data input binary above.
* tests/data/test-diff-filter/test21-compatible-vars-v1.cc: Source
code for the second data input binary above.
* tests/data/test-diff-filter/libtest22-compatible-fns-v0.so: New
test data input.
* tests/data/test-diff-filter/libtest22-compatible-fns-v1.so Likewise.
* tests/data/test-diff-filter/test22-compatible-fns-report-0.txt:
New test data input.
* tests/data/test-diff-filter/test22-compatible-fns-report-1.txt: Likewise.
* tests/data/test-diff-filter/test22-compatible-fns-v0.c: Source
code for the first test data input binary above.
* tests/data/test-diff-filter/test22-compatible-fns-v1.c: Source
code for the second test data input binary above.
* tests/data/Makefile.am: Add the new test input data to source
distribution.
* tests/test-diff-filter.cc (in_out_specs): Add the new test data
input above to the list of test data this harness has to be run
over.
2014-12-09 Dodji Seketeli <dodji@redhat.com>
Fix classification of parameter addition in C
* src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
Compare the fully qualified name of the functions; not their
pretty representation.
* tests/data/test-diff-dwarf/libtest20-add-fn-parm-v0.so: New test
data intput.
* tests/data/test-diff-dwarf/libtest20-add-fn-parm-v1.so:
Likewise.
* tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt:
Likewise.
* tests/data/test-diff-dwarf/test20-add-fn-parm-v0.c: Source code
for the first shared library above.
* tests/data/test-diff-dwarf/test20-add-fn-parm-v1.c: Source code
for the second shared library above.
* tests/test-diff-dwarf.cc (in_out_specs): Add the test input data
above to the list of test input the harness must run over.
* Makefile.am: Add the new files above to source distribution.
2014-12-08 Dodji Seketeli <dodji@redhat.com>
Wire the soname check into abicompat
* include/abg-comparison.h (corpus_diff::soname_changed): Declare
new member function.
* src/abg-comparison.cc (corpus_diff::soname_changed): Define new
member function.
(corpus_diff::length): Use the new corpus_diff::soname_changed()
method.
* tests/data/test-abicompat/libtest4-soname-changed-v0.so: New
test input data.
* tests/data/test-abicompat/libtest4-soname-changed-v1.so:
Likewise.
* tests/data/test-abicompat/test4-soname-changed-app: Likewise.
* tests/data/test-abicompat/test4-soname-changed-report-0.txt:
Likewise.
* tests/data/test-abicompat/test4-soname-changed-app.cc: Source
code for one of the binaries above.
* tests/data/test-abicompat/test4-soname-changed-v0.cc: Likewise.
* tests/data/test-abicompat/test4-soname-changed-v1.cc: Likewise.
* tests/test-abicompat.cc (in_out_specs): Add the new test input
data to the list of input data to run this harness over.
(main): Take the soname change in account to determine if the
change is ABI incompatible.
* tests/data/Makefile.am: Add the new test input data above to source
distribution.
2014-12-07 Dodji Seketeli <dodji@redhat.com>
Fixup messed up old runtestdiffdwarf input tests
* tests/data/test-diff-dwarf/test17-non-refed-syms-report-0.txt:
Add this missing reference test output.
* tests/data/Makefile.am: Add the new reference test output to
source distribution.
* tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt: Fix
this output to avoid emitting symbol alias information in it.
* tests/test-diff-dwarf.cc (in_out_specs): Add two missing test
input data to the list of input data this harness is supposed to
run over.
2014-12-07 Dodji Seketeli <dodji@redhat.com>
Support reading and comparing soname from ELF files
* include/abg-corpus.h (corpus::{get_needed, set_needed,
get_soname, set_soname}): Declare new accessors.
* src/abg-corpus.cc (corpus::priv::{needed, soname}): New data
members.
(corpus::{get_needed, set_needed, get_soname, set_soname}): Define
new accessors.
(corpus::is_empty): Take dt_needed and dt_soname in account in
computing empty-ness.
* src/abg-dwarf-reader.cc (read_context::{dt_needed_,
dt_soname_}): New data members.
(read_context::{dt_needed, dt_soname}): New accessors.
(read_context::load_dt_soname_and_needed): New member function.
(read_corpus_from_elf): Call the new
read_context::load_dt_soname_and_needed() to read the dt_soname
and dt_needed tags. Set them to the corpus.
* include/abg-comparison.h (diff_context::show_soname_change):
Declare new accessors.
* src/abg-comparison.cc (diff_context::priv::show_soname_change_):
New data member.
(diff_context::priv::priv): Initialize the new data member
diff_context::priv::show_soname_change_.
(diff_context::show_soname_change): Define new accessors.
(corpus_diff::priv::sonames_equal_): New data member.
(corpus_diff::priv::priv): Initialize the new data member
corpus_diff::priv::sonames_equal_.
(corpus_diff::length): Take the new priv_->sonames_equals_ data
member in account.
(corpus_diff::{report, priv::emit_diff_stats}): If the sonames
changed and we are allowed to report it, then report it.
(compute_diff): In the variant for corpus_diff, do not forget to
compare the sonames.
* src/abg-reader.cc (build_needed, read_elf_needed_from_input):
Define new static functions.
(read_corpus_from_input): Read the 'soname' attribute from the
'abi-corpus' xml element node.
* src/abg-writer.cc (write_elf_needed): Define new static
function.
(write_corpus_to_native_xml): Write a new 'elf-needed' xml element
node that contains one xml 'dependency' element node per
dependency to emit. This uses the new write_elf_needed() function
above.
* tests/data/test-diff-dwarf/libtest19-soname-v0.so: New test
input data.
* tests/data/test-diff-dwarf/libtest19-soname-v1.so: Likewise.
* tests/data/test-diff-dwarf/test19-soname-report-0.txt: Likewise.
* tests/data/test-diff-dwarf/test19-soname-v0.c: Source code of
the first binary above.
* tests/data/test-diff-dwarf/test19-soname-v1.c: Source code of
the second binary above.
* tests/test-diff-dwarf.cc (in_out_specs): Add the test input
above to the list of test input to run this harness on.
* tests/data/Makefile.am: Add the new test input data above.
* tests/data/test-read-dwarf/test{0,1}.abi: Adjust.
* tests/data/test-read-dwarf/test{2,3,4,6,}.so.abi: Adjust.
2014-12-07 Dodji Seketeli <dodji@redhat.com>
Fix some style nits in the native reader and writer
* src/abg-reader.cc (read_symbol_db_from_input): Align parameter
names. Fix indentation of the first line of the function.
* src/abg-writer.cc (write_elf_symbols_table): Align parameter names.
2014-12-07 Dodji Seketeli <dodji@redhat.com>
Fix a crash while writing symbol information
* src/abg-corpus.cc (corpus::{get_fun_symbol_map_sptr,
get_var_symbol_map_sptr}): Make sure the symbol map is always
constructed, even if it's empty.
* tests/data/test-read-write/test26.xml: New test input data.
* tests/test-read-write.cc (in_out_spec): Add this new test input
data to the list of input data to run the harness on.
(main): Support reading and writing corpus files alongside
translation unit files that we were handling already.
* tests/data/Makefile.am: Add the new test input data to source
distribution.
2014-12-05 Dodji Seketeli <dodji@redhat.com>
Avoid showing ugly version info in the libabigail online manual
* doc/manuals/conf.py: Update copyright mention. Do not show ugly
version information.
2014-11-30 Dodji Seketeli <dodji@redhat.com>
Initial implementation of the abicompat tool
* include/abg-comparison.h
(diff_context::show_added_symbols_unreferenced_by_debug_info):
Declare new accessors.
(corpus_diff::{deleted_variables,
deleted_unrefed_function_symbols,
deleted_unrefed_variable_symbols,
apply_filters_and_suppressions_before_reporting}): Declare new
methods.
(corpus_diff::diff_stats): Declare this new type. Actually this
was previously corpus_diff::priv::diff_stats, which was a hidden
internal type.. We are moving it here, in the external API so
that client code can have more information about changes
statistics. Change all the previously publicly accessible data
members into accessor functions.
* src/abg-comparison.cc (class corpus_diff::diff_stats::priv): New
type.
(diff_context::priv::show_added_syms_unreferenced_by_di_): New
data member.
(diff_context::priv::priv): Adjust.
(diff_context::show_added_symbols_unreferenced_by_debug_info):
Define this new method.
(corpus_diff::priv::emit_diff_stats): Do not show the diff stat
if the only changes is added function or variables symbols and if
we were instructed to not show added symbols.
(corpus_diff::priv::{diff_stats_, filters_and_suppr_applied_}):
New data members.
(corpus_diff::priv::priv): Initialize the
filters_and_suppr_applied_ data member.
(corpus_diff::priv::diff_stats): Move this type to
corpus_diff::diff_stats.
(corpus_diff::priv::{apply_filters_and_compute_diff_stats,
emit_diff_stats}): Adjust.
(corpus_diff::apply_filters_and_suppressions_before_reporting):
Define new member function.
(corpus_diff::report): Use the new
apply_filters_and_suppressions_before_reporting() function, rather
than applying the filters and suppressions by ourselves. Also
adjust to the use the accessors of the new corpus_diff::diff_stats
type.
(corpus_diff::{deleted_variables,
deleted_unrefed_function_symbols,
deleted_unrefed_variable_symbols}): Define new accessors.
(corpus_diff::diff_stats::{diff_stats, num_func_removed,
num_func_added, num_func_changed, num_func_filtered_out,
net_num_func_changed, num_vars_removed, num_vars_added,
num_vars_changed, num_vars_filtered_out, net_num_vars_changed,
num_func_sym_removed, num_func_syms_added, num_var_syms_removed,
num_var_syms_added}): Define new member functions.
* include/abg-corpus.h (corpus::{get_sym_ids_of_fns_to_keep,
get_sym_ids_of_vars_to_keep}): Declare new methods.
* src/abg-corpus.cc (corpus::priv::{sym_id_fns_to_keep,
sym_id_vars_to_keep}): Added data members.
(symtab_build_visitor_type::{unrefed_fun_symbols,
unrefed_var_symbols, sym_id_fns_to_keep, sym_id_vars_to_keep}):
Added new data members.
(symtab_build_visitor_type::symtab_build_visitor_type): Take two
additional parameters for the function and variable symbol ids to
keep.
(symtab_build_visitor_type::add_fn_to_wip_fns): Take the function
symbols to keep in account when building the exported symbol
table.
(symtab_build_visitor_type::add_var_to_wip_vars): Likewise, take
the variable symbols to keep in account when building the exported
symbol table.
(corpus::priv::build_public_decl_table): Adjust the initialization
of the visitor that walks the ABI artifacts to build the exported
symbol table to know take a list of function/variable symbols to
keep.
(corpus::priv::build_unreferenced_symbols_tables): Ensure that the
public table of functions/variables is built before doing the work
of this function. Also, if a list of variable/function symbols to
keep is given, drop all symbols that are not in that list on the
floor.
(corpus::{get_sym_ids_of_fns_to_keep,
get_sym_ids_of_vars_to_keep}): Define new accessors.
* tools/abicompat.cc: New abicompat tool.
* doc/manuals/abicompat.rst: New documentation source for
abicompat.
* doc/manuals/libabigail-tools.rst: Add an entry for the abicompat
doc.
* tests/test-abicompat.cc: New test harness for the 'abicompat'
tool.
* tests/Makefile.am: Build the runtestabicompat test harness and
add it to the list of tests harnesses that are run by make check.
* tests/data/test-abicompat/libtest0-fn-changed-libapp-v0.so: New
test input.
* tests/data/test-abicompat/libtest0-fn-changed-libapp-v1.so: Likewise.
* tests/data/test-abicompat/test0-fn-changed-app: Likewise.
* tests/data/test-abicompat/test0-fn-changed-0.suppr: Likewise
* tests/data/test-abicompat/test0-fn-changed-report-0.txt: Likewise.
* tests/data/test-abicompat/test0-fn-changed-report-1.txt: Likewise.
* tests/data/test-abicompat/test0-fn-changed-app.cc: Likewise.
* tests/data/test-abicompat/test0-fn-changed-libapp.h: Likewise.
* tests/data/test-abicompat/test0-fn-changed-libapp-v0.cc: Likewise.
* tests/data/test-abicompat/test0-fn-changed-libapp-v1.cc: Likewise.
* tests/data/test-abicompat/libtest1-fn-removed-v0.so: Likewise.
* tests/data/test-abicompat/libtest1-fn-removed-v1.so: Likewise.
* tests/data/test-abicompat/test1-fn-removed-app: Likewise.
* tests/data/test-abicompat/test1-fn-removed-app.cc: Likewise.
* tests/data/test-abicompat/test1-fn-removed-report-0.txt: Likewise.
* tests/data/test-abicompat/test1-fn-removed-v0.cc: Likewise.
* tests/data/test-abicompat/test1-fn-removed-v1.cc: Likewise.
* tests/data/test-abicompat/libtest2-var-removed-v0.so: Likewise.
* tests/data/test-abicompat/libtest2-var-removed-v1.so: Likewise.
* tests/data/test-abicompat/test2-var-removed-app: Likewise.
* tests/data/test-abicompat/test2-var-removed-app.cc: Likewise.
* tests/data/test-abicompat/test2-var-removed-report-0.txt: Likewise.
* tests/data/test-abicompat/test2-var-removed-v0.cc: Likewise.
* tests/data/test-abicompat/test2-var-removed-v1.cc: Likewise.
* tests/data/test-abicompat/libtest3-fn-removed-v0.so: Likewise.
* tests/data/test-abicompat/libtest3-fn-removed-v1.so: Likewise.
* tests/data/test-abicompat/test3-fn-removed-app: Likewise.
* tests/data/test-abicompat/test3-fn-removed-app.cc: Likewise.
* tests/data/test-abicompat/test3-fn-removed-report-0.txt: Likewise.
* tests/data/test-abicompat/test3-fn-removed-v0.cc: Likewise.
* tests/data/test-abicompat/test3-fn-removed-v1.cc: Likewise.
* tests/data/test-abicompat/test3-fn-removed-version-script-0 Likewise.:
* tests/data/test-abicompat/test3-fn-removed-version-script-1: Likewise.
* tests/data/Makefile.am: Add the new test inputs above to the
source distribution.
2014-11-30 Dodji Seketeli <dodji@redhat.com>
Support reading undefined symbols from an ELF file
* include/abg-corpus.h (corpus::{set_undefined_fun_symbol_map,
set_undefined_var_symbol_map, get_undefined_fun_symbol_map_sptr,
get_undefined_fun_symbol_map, get_sorted_undefined_fun_symbols,
get_undefined_var_symbol_map_sptr, get_undefined_var_symbol_map,
get_sorted_undefined_var_symbols}): Declare new methods ...
* src/abg-corpus.cc (corpus::{set_undefined_fun_symbol_map,
set_undefined_var_symbol_map, get_undefined_fun_symbol_map_sptr,
get_undefined_fun_symbol_map, get_sorted_undefined_fun_symbols,
get_undefined_var_symbol_map_sptr, get_undefined_var_symbol_map,
get_sorted_undefined_var_symbols}): ... and define them.
(struct corpus::priv::{undefined_var_symbol_map,
sorted_undefined_var_symbols, undefined_fun_symbol_map,
sorted_undefined_fun_symbols}): New data members.
* src/abg-dwarf-reader.cc (get_symbol_versionning_sections): Also
return the SHT_GNU_verneed section.
(get_version_needed_for_versym): New static function.
(get_version_definition_for_versym): Factorize this function out
of ..
(get_version_for_symbol): ... this one. Take a flag that says if
we want the definition version or the needed version of a symbol.
Extend the implementation using the two new function
get_version_needed_for_versym() and
get_version_definition_for_versym() above. This function now
returns the version either for a defined & exported symbol, or for
an undefined symbol.
(lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab):
Adjust for the change of signature of get_version_for_symbol().
(read_context::{undefined_fun_syms_, undefined_var_syms_}): New
data members.
(read_context::lookup_elf_symbol_from_index): Adjust for
invocation of the new signature of get_version_for_symbol().
(read_context::{undefined_fun_syms_sptr, undefined_fun_syms,
undefined_var_syms_sptr, undefined_var_syms}): Define new methods.
(read_context::load_symbol_maps): Add support for loading
undefined symbols and their versions.
(read_context::maybe_load_symbol_maps): Take in account the need
to load undefined symbols as well.
(read_corpus_from_elf): Once the undefined symbols have been read
from the ELF file, stuff them into the resulting ABI corpus that
has been built.
2014-11-30 Dodji Seketeli <dodji@redhat.com>
Show the pretty representation of deleted variables in the diff output
* src/abg-comparison.cc (corpus_diff::report): Show the pretty
representation of deleted variables in all cases.
2014-11-30 Dodji Seketeli <dodji@redhat.com>
Fix status checking in abidw
* tools/abidw.cc (main): Fix successful status checking.
2014-11-30 Dodji Seketeli <dodji@redhat.com>
Rename elf_symbol::get_is_defined() to elf_symbol::is_defined()
* include/abg-ir.h (elf_symbol::get_is_defined): Rename into
elf_symbol::is_defined.
(elf_symbol::set_is_defined): Rename into elf_symbol::is_defined.
* src/abg-ir.cc (elf_symbol::get_is_defined): Likewise, rename
this into elf_symbol::is_defined.
(elf_symbol::set_is_defined): Likewise, rename this into
elf_symbol::is_defined.
(elf_symbol::{elf_symbol, is_public}): Adjust.
* src/abg-writer.cc (write_elf_symbol): Adjust.
2014-11-30 Dodji Seketeli <dodji@redhat.com>
Update the copyright years of include/abg-corpus.h
* include/abg-corpus.h: Update the copyright years of this file.
2014-11-20 Dodji Seketeli <dodji@redhat.com>
Make tests/data directory have its own Makefile
* configure.ac(AC_CONFIG_FILE): Generate a new tests/data/Makefile
file.
* tests/Makefile.am: Link the data/ sub-directory from here. Move
the EXTRA_DIST definition to ...
* tests/data/Makefile.am: ... this new file here.
2014-11-20 Dodji Seketeli <dodji@redhat.com>
Hmh, finally EXTRA_DIST was just fine
* tests/Makefile.am: Put EXTRA_DIST back.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Make sure we don't try to build test data
* tests/Makefile.am: Replace EXTRA_DIST with noinst_DATA.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Fix manual documentation generation
* doc/manuals/Makefile.am: Trigger the manual generation from the
html-doc target. Add the source files to the distribution. Fix
the clean target.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Fix apidoc building
* doc/Makefile.am: Trigger the building frm the html-doc target.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Cleanup of configure.ac
* configure.ac: Remove useless variables and fix a typo.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Add loads of forgotten test data files to source distribution
* tests/Makefile.am: Add lots of test data file that were
forgotten and then revealed by running make distcheck. Also fix
some wrong paths to test data files.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Use DESTDIR in doc/manuals/Makefile.am when creating the manuals
* doc/manuals/Makefile.am: Use the DESTDIR variable when
addressing the destination directory of the created manuals.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Fix a thinko in doc/Makefile.am
* apidoc-install-html-doxygen: Make sure that the directory
$(DESTDIR)$(docdir) does not exist, before trying to create it.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Add doc/api/libabigail.doxy to source distribution
* doc/Makefile.am: Add the file api/libabigail.doxy to source
distribution.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Make the install-html target of apidoc/manual be conditional
* configure.ac: add --enable-apidoc and --enable-manual. Add the
two ENABLE_APIDOC and ENABLE_MANUAL automake conditional
variables. Add the activation of the apidoc and manual into the
final package configuration report.
* doc/Makefile.am: Make the install-html, install-data-local and
uninstall-local targets conditional on the ENABLE_APIDOC
conditional variable.
* doc/manuals/Makefile.am: Likewise, make the install-html,
install-data-local and uninstall-data-local conditional on the
ENABLE_MANUAL conditional variable.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Make the alt dwarf debug file *not* be a symlink
* tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
Make this be a real file, no more a symlink to
../../../test0-common-dwz.debug.
* tests/data/test-alt-dwarf-file/test0-report.txt: Now that the
file above is no more a symlink the message emitted by the test
changes. It now says that the file found is the base name of the
real file. So change the reference report accordingly.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Use the POSIX 1003.1-1988 tar format for dist tar
* configure.ac: For the tar invocation made by make dist, make
sure to use the POSIX 1003.1-1988 tar format that can support file
names of more than 99 characters. This is useful for the
test-alt-dwarf-file test that has data made of a file which patch
has more than 99 characters.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
Nested automake conditionals don't work
* configure.ac (ENABLE_ZIP_ARCHIVE_AND_CXX11): Define this
automake condition variable that is true if both the zip archive
and c++11 features are enabled. This is important to know if the
test runtestdot is going to be compiled. That test needs both
c++11 and the zip archive features.
* tests/Makefile.am: Do not nest automake conditional statements.
It does not work. Rather, use the new
ENABLE_ZIP_ARCHIVE_AND_CXX11 condition variable.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
INSTALL file is not yet in the distribution
* Makefile.am: Do not say that INSTALL file is in the distribution
while it is not.
2014-11-19 Dodji Seketeli <dodji@redhat.com>
If c++11 is disable do not execute the runtestdot test
* tests/Makefile.am: runtestdot should not be executed if c++11 is
disabled.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
make html now generates the apidoc, manual and web site
* doc/Makefile.am (html-local): Make the html file generation be
triggered by the html-local target, not the html target. The html
target is a recursive target that calls the the html-local targets
under each directory.
(apidoc-html-doxygen): Rename the doc-html-doxygen target into
(apidoc-install-html-doxygen): Rename doc-install-html-doxygen
into this. this.
(DO_HTML, DO_INSTALL_HTML): Adjust.
(install-data-local): New target.
* doc/manuals/Makefile.am (install-html, install-data-local): New
targets.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Generate the manual html documentation in the proper build directory
* doc/manuals/Makefile.am: Renamed doc/manuals/Makefile into this.
(BUILDDIR): Make this variable point to $(builddir)/_build as
opposed to just _build previously.
(SOURCEDIR): New variable that points to the source dir as known
by the autotools magic.
(ALLSPHINXOPTS): Make the source dir refer to the new
$(SOURCEDIR), rather than just '.' as previously.
* configure.ac (doc/manuals/Makefile): Generate this now.
* doc/Makefile.am: Link the sub-directory doc/manuals.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Update Makefile.am after the additions related to gen-changelog.py
* Makefile.am: Add ChangeLog and COPYING-LGPLV2 to the source
distribution.
(update-changelog, tag-release-only tag-release): New Makefile
targets.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Added a ChangeLog that is auto-generated by gen-changelog.py
* ChangeLog: Add this auto-generated file.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
[gen-changelog] Make subject line always come first
* gen-changelog.py (process_commit): In changelog entries with an
empty body, make sure the subject line comes first.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Try harder to remove timezone info from the date
* gen-changelog.py (process_commit): The timezone shit can start
either with a '+' or a '-'.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Not all ChangeLog file lines end up with a ':'
* gen-changelog.py (process_commit): When trying to recognize the
beginning of a ChangeLog entry body, do not expect a line that
starts with a '*' to end with a ':' because there can be long file
names that end on the next line.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Allow introductory text in commit log and ignore it when generating ChangeLog
* gen-changelog.py (process_commit): Everything that comes between
the subject line of the commit and the first \t* sequence is
considered to be introductory text. Ignore it when generating the
ChangeLog entry.
* COMMIT-LOG-GUIDELINES: Update the commit log guidelines to
reflect the fact that we can now have introductory text in the
commit log.
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Initial import of gen-changelog.py
* gen-changelog.py: Copy from
https://github.com/GNOME/gnet/blob/master/gen-changelog.py.
License it under LGPLV v2+ after asking Edward Hervey's kind
permission. Ain't Free Software really great?
2014-11-18 Dodji Seketeli <dodji@redhat.com>
Fix the reference to the IRC channel on the web page
* doc/website/mainpage.txt: The IRC server address is
irc.oftc.net, not just oftc.net.
* include/abg-fwd.h: Likewise.
2014-11-10 Dodji Seketeli <dodji@redhat.com>
Consider enclosing template when comparing template parameters
* src/abg-ir.cc (template_parameter::priv::comparison_started_):
New data member.
(template_parameter::priv::priv): Initialize it.
(template_parameter::operator==): Compare the enclosing template
too. And avoid infinite recursion.
2014-11-10 Dodji Seketeli <dodji@redhat.com>
Remove mention of libzip from the web page
* doc/website/mainpage.txt: Remove mention of libzip from the list
of dependencies.
2014-11-10 Dodji Seketeli <dodji@redhat.com>
Cleanup of the web page
* doc/website/libabigail-website.doxy: Remove the redundant
information that was appearing on the web page.
* doc/website/mainpage.txt: Clean-up the text of the web page, add
information for the new IRC channel #libabigail on oftc.net,
re-organize the content by putting sections where we had
paragraphs. Add a table of content. Also add a web form to
subscribe/unsubscribe to the mailing list.
2014-11-08 Dodji Seketeli <dodji@redhat.com>
Sort functions by the their qualified name
* src/abg-comparison.cc (function_comp::operator()): Sort the
functions by only looking at their qualified name, as opposed to
their return type name.
2014-11-08 Dodji Seketeli <dodji@redhat.com>
Remove too tight assert from de-mangling code
* src/abg-ir.cc (demangle_cplus_mangled_name): The return length
can be zero. That means, no de-mangling was done.
2014-11-08 Dodji Seketeli <dodji@redhat.com>
Sort reported changed declarations & types in a given scope
* src/abg-comparison.cc (struct changed_type_or_decl_comp, struct
changed_vars_comp): New comparison functors.
(sort_changed_type_or_decl, sort_changed_vars): New static
functions.
(scope_diff::report): Use the above to sort changed declarations,
and types in a given scope.
(corpus_diff::report): Likewise for the changed variables.
* tests/data/test-abidiff/test-struct1-report.txt: Adjust.
* tests/data/test-diff-suppr/test7-var-suppr-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-8.txt:
Likewise.
2014-11-08 Dodji Seketeli <dodji@redhat.com>
Sort elf symbols before serializing them
* include/abg-corpus.h (corpus::{get_sorted_fun_symbols,
get_sorted_var_symbols}): Declare new member functions.
* src/abg-corpus.cc (corpus_priv::{sorted_var_symbols,
sorted_fun_symbols}): New data members.
(struct elf_symbol_comp_functor): Define new comparison functor.
(corpus::{get_sorted_fun_symbols, get_sorted_var_symbols}): Define
new member functions.
* src/abg-writer.cc (write_elf_symbols_table): Take a sorted
vector of symbols in parameters, rather than an unsorted map.
(write_corpus_to_native_xml): Write a sorted vector of symbols,
rather than an unsorted map of symbols.
* tests/data/test-read-dwarf/test0.abi: Adjust.
* tests/data/test-read-dwarf/test1.abi: Likewise.
* tests/data/test-read-dwarf/test2.so.abi: Likewise.
* tests/data/test-read-dwarf/test3.so.abi: Likewise.
* tests/data/test-read-dwarf/test6.so.abi: Likewise.
2014-11-07 Dodji Seketeli <dodji@redhat.com>
Fix template parameter hashing: make it know about enclosing template
* include/abg-ir.h (template_parameter_sptr, template_decl_sptr)
(template_decl_wptr): Declare new typedefs.
(class template_decl): Make this virtually inherit decl_base and
pimpl-ify it.
(class template_parameter): Pimpl-ify this. Make the constructor
take the enclosing template parameter.
(struct template_decl::hash): Declare this here, rather than in
src/abg-hash.cc
(class type_tparameter, non_type_tparameter, template_tparameter)
(class type_composition, function_tdecl, class_tdecl): Pimpl-ify
this.
* src/abg-hash.cc (template_parameter::hash::operator()): Hash the
enclosing template parameter. Avoid infinite recursion due to the
loop hash parameter -> hash template -> hash parameter.
(template_decl::hash::operator()) Define this here, now that it's
declared in abg-ir.h. Also, avoid infinite recursion here; this
is complementary to what is done in the hashing for
template_parameter.
({type_tparameter, template_tparameter, }::hash::operator()):
Cache the calculated hash just as what is done for other types
hashed.
(template_decl::priv): Define this new type.
(template_decl::{add_template_parameter, get_template_parameters,
~template_decl}): Define these here to pimpl-ify template_decl.
(template_parameter::priv): Define this new type.
(template_parameter::template_parameter): Define this here to
pimpl-ify template_parameter. Note also that this now takes the
enclosing template decl.
(template_parameter::{get_index, get_enclosing_template_decl,
get_hashing_has_started, set_hashing_has_started, operator::==}):
Define these here to pimpl-ify template_parameter.
(type_tparameter::priv): Define this new type.
(type_tparameter::type_tparameter): Define this here to pimpl-ify
type_tparameter. Also, not that this constructor now takes the
enclosing template decl.
(class non_type_tparameter::priv): Define new type.
(non_type_tparameter::{non_type_tparameter, get_type}): Define
these here to pimpl-ify non_type_tparameter. The constructor now
takes the enclosing template.
(template_tparameter::priv): Define new type.
(template_tparameter::template_tparameter): Define this here to
pimpl-ify template_tparameter. This constructor now takes the
enclosing template.
(class type_composition::priv): New type.
(type_composition::{type_composition, get_composed_type,
set_composed_type}): Define these here to pimpl-ify
type_composition. The constructor now takes the enclosing
template decl.
(class function_tdecl::priv): Define new type.
(function_tdecl::{function_tdecl, set_pattern, get_pattern,
get_binding}): Define this here to pimpl-ify function_tdecl.
(class class_tdecl::priv): Define this new type.
(class_tdecl::class_tdecl): Define this here to pimpl-ify
class_tdecl.
(class_tdecl::set_pattern): Adjust to pimpl-ify.
(class_tdecl::get_pattern): Define new pimpl-ified getter.
* src/abg-reader.cc (build_function_tdecl, build_class_tdecl):
Cleanup. Pass the enclosing template to the template parameters
that are built.
(build_type_tparameter, build_type_composition)
(build_non_type_tparameter, build_template_tparameter)
(build_template_parameter): Take the enclosing template
declaration and pass it to the template parameter being created.
* tests/data/test-read-write/test12.xml: Fix and Adjust.
* tests/data/test-read-write/test13.xml: Likewise.
2014-11-06 Dodji Seketeli <dodji@redhat.com>
Style fix
* include/abg-ir.h (class location): Remove useless white space.
* src/abg-writer.cc (type_has_existing_id): Use type_base_sptr
rather than shared_ptr<type_base>.
(write_template_tparameter): Use template_tparameter_sptr rather
than shared_ptr<template_tparameter>.
2014-11-05 Dodji Seketeli <dodji@redhat.com>
Pass -std=gnu++11 to the compiler when --enable-cxx11 for tests
* tests/Makefile.am: Pass -std=gnu++11 to the compiler when
--enable-cxx11 has been used.
2014-11-05 Dodji Seketeli <dodji@redhat.com>
Make the use of a C++-11 compiler optional
* configure.ac: Define a new --enable-cxx11 switch to control the
use of the C++-11 compiler. Define a WITH_CXX11 C macro and an
automake ENABLE_CXX11 variable.
* config.h.in: Initialize the new WITH_CXX11 C macro.
* src/Makefile.am: Include the files coded in C++-11 only if the
ENABLE_CXX11 automake variable is defined.
* tests/Makefile.am: Likewise, build the runtestsvg test program
only if C++-11 usage is enabled.
* include/abg-diff-utils.h (class d_path_vec): Remove useless
usage of the 'typename' keyword.
* include/abg-fwd.h (is_enum_type): Renamed is_enum into this,
because of a name clash with a tr1 function when not using C++-11.
(is_pointer_type): Likewise, renamed is_pointer into this because
of a name clash with a tr1 function when not using C++-11.
* src/abg-comp-filter.cc (has_harmless_name_change): Adjust for
the is_enum -> is_enum_type change.
* src/abg-comparison.cc (type_suppression::suppresses_diff):
Likewise.
(class function_suppression::priv): Add a missing "class" keyword
in friend declaration.
(diff_context::diff_has_been_traversed)
(diff_context::mark_diff_as_traversed): Do not use the C++-11
specific type uintptr_t.
* src/abg-dwarf-reader.cc (create_default_dwfl): Do not use
designated initializers. Sigh. This is handy though.
(expr_result::abs): Cast the argument of std::abs to avoid
ambiguous call.
(finish_member_function_reading): Adjust for the is_pointer ->
is_pointer_type renaming.
* src/abg-hash.cc (scope_decl::hash::operator)
(class_decl::base_spec::hash::operator)
(type_composition::hash::operator): Use std::tr1::hash string,
rather than the C++-11 specific std::hash function.
* src/abg-ini.cc (read_sections, write_sections): Make
std::ifstream constructor take a const char* rather than a string.
* src/abg-ir.cc (is_enum_type, is_pointer_type): Renamed is_enum
into is_enum_type and is_pointer into is_pointer_type.
* src/abg-writer.cc (write_translation_unit): Remove useless
typename keyword. Make ofstream take a const char* rather than a
string.
(write_namespace_decl): Remove useless typename keyword.
(write_corpus_to_native_xml_file): Make ofstream take a const
char* rather than a string.
* tests/test-abidiff.cc (main): Make ofstream take a const char*
rather than a string.
* tests/test-diff-dwarf.cc (main): Likewise.
2014-11-05 Dodji Seketeli <dodji@seketeli.org>
Remove some m4 auto-generated files from version control
* m4/ltoptions.m4: Remove from version control.
* m4/ltversion.m4: Remove from version control.
* m4/lt~obsolete.m4: Remove from version control.
2014-11-03 Dodji Seketeli <dodji@redhat.com>
Add usage examples to the abidiff manual
* doc/manuals/abidiff.rst: Add a usage example section along with
some small and clean examples.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Fix the API doc string of the abigail::xml_writer namespace
* src/abg-writer.cc: Fix the API doc of the xml_writer namespace.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Fix an apidoc typo
* include/abg-comparison.h (class variable_suppression): Fix a
typo in the doc string.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Update the manual for variable suppression concepts
* doc/manuals/libabigail-concepts.rst: Add a section for variable
suppression specification in the concepts part of the manual.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Fix some restructured text doc glitches in the fn suppression manual
* doc/manuals/libabigail-concepts.rst: Fix quoting of the syntax
of parameter specification string, for the function suppression
concepts.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Cleanup the mainpage of the API doc
* include/abg-fwd.h: Cleanup text of the API doc mainpage.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Make get_binary_load_address static
* src/abg-dwarf-reader.cc (get_binary_load_address): Make this
function static.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Initial support for variable suppressions
* include/abg-comparison.h (variable_suppression_sptr)
(variable_suppressions_type): New convenience typedefs.
(class variable_suppression): Declare new type.
* src/abg-comparison.cc (is_var_diff): New predicate.
(read_variable_suppression): Define new static function.
(class variable_suppression::priv): Define type for the private
data of the variable_suppression type.
(variable_suppression::{variable_suppression,
~variable_suppression, get_name, set_name, get_name_regex_str,
set_name_regex_str, get_symbol_name, set_symbol_name,
get_symbol_name_regex_str, set_symbol_name_regex_str,
get_symbol_version, set_symbol_version,
get_symbol_version_regex_str, set_symbol_version_regex_str,
get_type_name, set_type_name, get_type_name_regex_str,
set_type_name_regex_str, suppresses_diff}): Define new member
functions for the variable_suppression type.
* tests/data/test-diff-suppr/libtest7-var-suppr-v0.so: Add new
test input.
* tests/data/test-diff-suppr/libtest7-var-suppr-v1.so: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-1.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-2.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-3.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-4.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-5.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-6.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-7.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-8.suppr: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-5.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-6.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-report-8.txt:
Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-version-script: Likewise.
* tests/data/test-diff-suppr/test7-var-suppr-v0.cc: Source code
for the librairie above.
* tests/data/test-diff-suppr/test7-var-suppr-v1.cc: Source code
for the librairie above.
* tests/Makefile.am: Add the new test input data to the source
distribution.
* tests/test-diff-suppr.cc: Update to make this harness to run
over the new test input above.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Update the suppr-doc.txt file for variable suppressions
* doc/suppr-doc.txt: Add the suppress_variable section example.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Make var_diff and function_decl_diff extend decl_diff_base
* include/abg-comparison.h (class var_diff, class
function_decl_diff): Make these types inherit the decl_diff_base
class. This is like the fact that all kinds of diff inherit the
type_diff_base class.
* src/abg-comparison.cc (var_diff::var_diff)
(function_decl_diff::function_decl_diff): Adjust to initialize the
sub-object of decl_diff_base;
(is_decl_diff): New predicate to know if a diff is about decls.
(is_function_decl): New predicate to know if a diff is about
function decls.
(function_suppression::suppresses_diff): Adjust to use the new
is_function_decl.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Fix logic of type suppression evaluation
* include/abg-comparison.cc (type_suppression::suppresses_diff):
Try to evaluate the "type_name_regexp" property only if the
"type_name" is empty.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Remove useless functions from the comparison engine
* include/abg-comparison.h (read_type_suppression): Remove this
function declaration.
* src/abg-comparison.cc (read_type_suppressions): Remove this
static function definition.
(read_function_suppressions): Remove this static function
declaration.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Spit and polish variables presentation in diff report
* src/abg-comparison.cc (corpus_diff::report): Show the full
representation of the variable, rather than just its name. Also,
show the new representation of the variable only if it has
changed.
* tests/data/test-diff-dwarf/test9-report.txt: Adjust test.
* tests/data/test-diff-filter/test15-0-report.txt: Likewise.
* tests/data/test-diff-filter/test15-1-report.txt: Likewise.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Fix various apidoc typos
* include/abg-comparison.h (class function_suppression): Fix typo
in the doc string.
* src/abg-comparison.cc (is_type_diff, read_suppressions)
(diff::reported_once, typedef_diff::report): Fix the doc string.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Fix regexp escaping section of manual
* doc/manuals/libabigail-concepts.rst: Re-indent and fix some
typos in the regexp escaping section of the manual.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Doxygen shouldn't extract doc for static functions or private types
* doc/api/libabigail.doxy: Do not extract doc for static
functions, local classes.
2014-11-01 Dodji Seketeli <dodji@redhat.com>
Update .gitignore
* .gitignore: Ignore *~ emacs files.
2014-10-29 Dodji Seketeli <dodji@redhat.com>
Separate alias targets with a comma
* src/abg-ir.cc (elf_symbol::get_aliases_id_string): Separate
alias targets by a comma.
* tests/data/test-diff-dwarf/test18-alias-sym-v1.cc: Update test
to add more than one alias to a given symbol.
2014-10-28 Dodji Seketeli <dodji@redhat.com>
Fix a typo in the manual about function suppressions
* doc/manuals/libabigail-concepts.rst: Fix a typo.
2014-10-28 Dodji Seketeli <dodji@redhat.com>
Initial support for function suppressions
* include/abg-comparison.h (enum visiting_kind): Change the
meaning of this. It was to determine if traversal was to be done
in a pre or post manner. But with the recent addition of
diff_node_visitor::visit_{begin,end}() notifiers, the pre/post
handling is taken care of in a different way. So now the meaning
of this enum is changed to handle whether diff node children
should be visited or not. So the enumerators are now
DEFAULT_VISITING_KIND, and SKIP_CHILDREN_VISITING_KIND. And it's
a bit-field.
(operator{&,~}): Declare more bit manipulation operators for the
enum visiting_kind.
(function_suppression_sptr, function_suppressions_type): New
typedefs.
(function_suppression, function_suppression::parameter_spec):
Declare new types.
(read_function_suppressions): Declare new function.
(diff_node_visitor::diff_node_visitor): Adjust for the enum
visiting_kind change. Value-initialize the visiting_kind_ data
member.
* src/abg-comparison.cc (operator{&,~}): Define these operators
for enum visiting_kind.
(read_type_suppressions): Forward declare this static function.
(read_function_suppression, read_parameter_spec_from_string):
Define new static functions.
(read_suppressions): Update to read function suppressions too,
using the new read_function_suppression function above.
(class function_suppression::parameter_spec::priv): Define new
type.
(function_suppression::parameter_spec::*): Define the member
functions of the new function_suppression::parameter_spec type.
(class function_suppression::priv): Define new type.
(function_suppression::*): Define the member functions of the new
function_suppression type.
(diff::traverse): There is no more {PRE,POST}_VISITING_KIND
enumerator. So nuke the code that was dealing with it.
(redundancy_marking_visitor::skip_children_nodes_): New data
member flag.
(redundancy_marking_visitor::visit_begin): If the current diff
node is not be reported (is filtered out), do not bother visit its
children nodes for the purpose of marking redundant nodes. So use
the new skip_children_nodes_ flag above to know we are in that case.
(redundancy_marking_visitor::visit_end): Unset the new
skip_children_nodes_ flag above when appropriate.
* include/abg-fwd.h (is_function_decl): Declare new function.
* include/abg-ir.h
(function_type::get_parm_at_index_from_first_non_implicit_parm):
Declare new member function.
* src/abg-ir.cc (is_function_decl): Define new function.
(function_type::get_parm_at_index_from_first_non_implicit_parm):
Define new member function.
* src/abg-comp-filter.cc (apply_filter): Adjust for the enum
visiting_kind change. No need to set it for filters anymore
* doc/suppr-doc.txt: Update examples of function suppression.
* doc/manuals/libabigail-concepts.rst: Update the manual for the
function suppression addition.
* tests/data/test-diff-suppr/libtest5-fn-suppr-v0.so: New test input.
* tests/data/test-diff-suppr/libtest5-fn-suppr-v1.so: New test input.
* tests/data/test-diff-suppr/libtest6-fn-suppr-v0.so: New test input.
* tests/data/test-diff-suppr/libtest6-fn-suppr-v1.so: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-0.suppr: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-1.suppr: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-2.suppr: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-3.suppr: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-4.suppr: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: New test input.
* tests/data/test-diff-suppr/test5-fn-suppr-v0.cc: Source code for
new test input.
* tests/data/test-diff-suppr/test5-fn-suppr-v1.cc: Source code for
new test input.
* tests/data/test-diff-suppr/test6-fn-suppr-0.suppr: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-1.suppr: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-2.suppr: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-3.suppr: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt: New test input.
* tests/data/test-diff-suppr/test6-fn-suppr-v0.cc: Source code for
new test input.
* tests/data/test-diff-suppr/test6-fn-suppr-v1.cc: Source code for
new test input.
* tests/data/test-diff-suppr/test6-fn-suppr-version-script: New
test input.
* tests/Makefile.am: Add the new files above to source
the distribution.
* tests/test-diff-suppr.cc (in_out_specs): Add the test inputs
above to the list of tests to be run by this harness.
2014-10-28 Dodji Seketeli <dodji@redhat.com>
Add missing virtual destructor in comparison engine code
* include/abg-comparison.h (type_suppression::~type_suppression):
Declare missing virtual destructor.
* src/abg-comparison.cc (type_suppression::~type_suppression):
Define missing virtual destructor.
2014-10-27 Dodji Seketeli <dodji@redhat.com>
Pimplify abigail::ir::function_type
* include/abg-ir.h (function_type::priv_): Declare new data
member.
(function_type::<all the methods>): Move the inline methods out of
line in src/abg-ir.cc.
(function_type::{return_type_, parms_}): Move these ...
* src/abg-ir.cc (function_type::priv::{return_type_, parms_}):
... Here.
(struct function_type::priv): New type for the private data of
function_type.
(function_type::<all the methods>): Move the previously inline
methods of function_type here. Adjust them to tap into priv_->*
to get the private data members.
2014-10-27 Dodji Seketeli <dodji@redhat.com>
Light style fix
* include/abg-ir.h (function_decl::get_type): Change the return
type from shared_ptr<function_type> to function_type_sptr.
2014-10-27 Dodji Seketeli <dodji@redhat.com>
Allow white spaces in ini file property values
* src/abg-ini.cc (read_context::char_is_property_value_char): New
member function.
(read_context::read_next_char): Fix typos. Allow escaping of '['
and ']'.
(read_context::read_property_value): Use the new
read_context::char_is_property_value_char above.
2014-10-27 Dodji Seketeli <dodji@redhat.com>
Fix typo in suppression specification manual
* doc/manuals/libabigail-concepts.rst: Fix name -> name_regexp.
2014-10-22 Dodji Seketeli <dodji@redhat.com>
Support comparing symbols not referenced by debug info
* doc/manuals/abidiff.rst: Adjust intro to mention that w/o debug
info, abidiff now works but just report about added/removed
symbols. Add documentation about the new
--no-unreferenced-symbols option.
* include/abg-comparison.h (string_elf_symbol_map): New typedef.
(diff_context::show_symbols_unreferenced_by_debug_info): Declare
new accessors.
* src/abg-comparison.cc
(diff_context::priv::show_syms_unreferenced_by_di_): New data
member.
(diff_context::priv::priv): Adjust.
(diff_context::show_symbols_unreferenced_by_debug_info): Implement
these accessors.
(corpus_diff::priv::{unrefed_fn_syms_edit_script_,
unrefed_var_syms_edit_script_, added_unrefed_fn_syms_,
deleted_unrefed_fn_syms_, added_unrefed_var_syms_,
deleted_unrefed_var_syms_}): New data members.
(corpus_diff::priv::diff_stats::{num_func_syms_removed,
num_func_syms_added, num_var_syms_removed, num_var_syms_added}):
New data members.
(corpus_diff::priv::diff_stats::diff_stats): Adjust.
(corpus_diff::ensure_lookup_tables_populated): Populate lookup
tables for added/removed symbols that are not referenced by any
debug info.
(corpus_diff::priv::apply_filters_and_compute_diff_stats): Compute
stats for the added/removed symbols not referenced by any debug
info.
(corpus_diff::priv::emit_diff_stats): Emit stats about
added/removed symbols that are not referenced by any debug info.
(corpus_diff::length): Adjust to take in account added/removed
symbols not referenced by any debug info.
(show_linkage_name_and_aliases): New static function.
(corpus_diff::report): When emitting a symbol name, emit its
version too, and tell if it aliases other symbols. Avoid emitted
extra new lines. Report added/removed symbols not referenced by
any debug info.
(compute_diff): In the overload for corpus_sptr, compute the diffs
for symbols not referenced by debug info.
* include/abg-corpus.h
(corpus::get_unreferenced_{function,variable}_symbols): Declare
new member functions.
* src/abg-corpus.cc (corpus_priv::{unrefed_fun_symbols,
unrefed_var_symbols}): New data members.
(corpus_priv::build_unreferenced_symbols_tables): Define new
member function.
(struct comp_elf_symbols_functor): New functor.
(corpus::is_empty): Adjust to take in account added/removed
symbols not referenced by debug info.
(corpus::{get_unreferenced_function_symbols,
corpus::get_unreferenced_variable_symbols}): Define these
accessors.
* include/abg-dwarf-reader.h (enum status): Transform this into
bitfields. Add a STATUS_UNKNOWN value that has the value 0.
(operator|(status, status), operator&(status, status))
(operator|=(status&, status), operator&=(status, status)): New
bit-wise operators to manipulate instances of the status bit-field.
* src/abg-dwarf-reader.cc (get_version_for_symbol): Fix this to
avoid returning garbage version sometimes.
(read_debug_info_into_corpus): Fix this to return a non-null but
empty corpus_sptr when there is no debug info available.
(operator|(status, status), operator&(status, status))
(operator|=(status&, status), operator&=(status, status)): Define
these new bitwise operators to manipulate instances of the status
bit-field.
(read_corpus_from_elf): Now that the abigail::dwarf_reader::status
is a bit-field, set it to reflect if debug info and/or symbol
tables have been found. Do not bail out if debug info hasn't been
found. Rather, keep going, and go look for symbols-only; this is
a kind of operating in degraded mode.
* include/abg-ir.h (elf_symbol::get_aliases_id_string): Add a flag
that says if the current instance of elf_symbol should be included
in the list of aliases or not.
* src/abg-ir.cc (elf_symbol::get_aliases_id_string): Define it.
* tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.o: New test
input.
* tools/abidiff.cc
(options::show_symbols_not_referenced_by_debug_info): New data
member.
(options:options): Adjust.
(display_usage): Add an info string for the new
--no-unreferenced-symbols command line option.
(parse_command_line): Parse the new --no-unreferenced-symbols
command line.
(set_diff_context_from_opts): Set the diff_context according to
the presence of --no-unreferenced-symbols.
(main): Adjust for the fact that abigail::dwarf_reader::status is
now a bit-field.
* tools/abilint.cc (main): Adjust for the fact that
abigail::dwarf_reader::status is now a bit-field..
():
* tests/data/test-diff-dwarf/test16-syms-only-report.txt: New test
reference output.
* tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.cc: Source code
for new test input.
* tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.o: New
test input.
* tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.cc: New
source code for test input.
* tests/data/test-diff-dwarf/libtest18-alias-sym-v{0,1}.so: New
test input.
* tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt:
Reference output for new test input.
* tests/data/test-diff-dwarf/test18-alias-sym-v{0,1}.cc: Source
code for new test input.
* tests/data/test-diff-dwarf/test18-alias-sym-version-script:
Source code for new test input.
* tests/Makefile.am: Add the new test materials to the source
distribution.
* tests/test-diff-dwarf.cc(in_out_specs): Add the new input tests
above to the array of tests to run by this harness.
(main): Emit empty reports for empty resulting diffs.
* tests/data/test-diff-dwarf/test{0,8,9,12,14-inline-report,}-report.txt:
Adjust.
* tests/data/test-diff-filter/test{0,01,2,4,5,7,8,9,10,12,13,15-0,15-1}-report.txt:
Likewise.
* tests/data/test-diff-filter/test{19-enum,20-inline,}-report-0.txt:
Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-report-{1,2}.txt:
Likewise.
* tests/data/test-diff-suppr/test{1,2}-typedef-suppr-report-1.txt:
Likewise.
2014-10-22 Dodji Seketeli <dodji@redhat.com>
Allow comparison of shared_ptr of things
* include/abg-diff-utils.h: Adjust copyright years.
(deep_ptr_eq_functor::operator()(const shared_ptr<T>, const
shared_ptr<T>)): New comparison operator.
2014-10-17 Dodji Seketeli <dodji@redhat.com>
Use the "standard" equality operator when comparing variables
* src/abg-comparison.cc (compute_diff): In the overload for
corpus_sptr, use the diff_utils::deep_ptr_eq_functor that is used
to compare functions too, rather than the ad-hoc early struct
var_eq_type we were using until now.
2014-10-16 Dodji Seketeli <dodji@redhat.com>
Yet another fix to the DWARF method "static-ness" detection heuristic
* include/abg-fwd.h (is_pointer, is_qualified_type): Declare new
functions.
* src/abg-ir.cc (is_pointer, is_qualified_type): Implement these
new functions.
* src/abg-dwarf-reader.cc (finish_member_function_reading):
Sometimes, the this pointer of a non-static method can point to a
*qualified* version of its containing type. I am seeing that when
comparing libstdc++.so from RHEL 6.5 and RHEL 7. Take that in
account when trying to detect that the first parameter of a member
function is the this pointer, and thus detect that the function is
a non static member function.
* tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
New test input.
* tests/data/test-read-dwarf/test8-qualified-this-pointer.so: New
test input.
* tests/data/test-read-dwarf/test8-qualified-this-pointer.cc:
Source code of new test input.
* tests/test-read-dwarf.cc: Update copyright year.
(in_out_spec): Add the new test inputs to this array, so that this
test harness runs on them.
* tests/Makefile.am: Add the new test inputs to the source
distribution.
2014-10-16 Dodji Seketeli <dodji@redhat.com>
Avoid infinite loops in the comparison code for classes
* src/abg-ir.cc (equals): In the overload for classes, make sure
to store the name of the lhs of the class and the rhs into the
lhs. Also, when we bail out because we detect that there is a
comparison underway, do *not* unmark the current class as not being
involved in the comparison. Also, break at the first lhs virtual
member function that is different from the rhs counter part.
2014-10-15 Dodji Seketeli <dodji@redhat.com>
Update the manual for the suppression specification initial work
* doc/manuals/abidiff.rst: Add documentation for the new
--suppressions command line switch.
(--harmless, --harmful): Refer to the new "concepts" section
below, where harmful/harmless concepts are now explained.
(Notes): Move the content of the notes section where
harmful/harmless concepts were explained, to the newly created
'Concepts' section.
* doc/manuals/index.rst: Limit the depth of the table of content
to 2. Add the new libabigail-concepts.rst stuff in here. Adjust
for the renaming of tools.rst to libabigail-tools.rst.
* doc/manuals/libabigail-concepts.rst: New file.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes
* src/abg-comparison.cc
(suppression_categorization_visitor::visit_end): If a diff node
carries local changes, then, even if all of its children node have
been suppressed, this diff node shall not be categorized as
suppressed by way of propagation.
(redundancy_marking_visitor::visit_end): If a diff node carries
local changes, then, even if all of its children nodes are
redundant, this diff node shall not be categorized as being
redundant by way of propagation.
* tests/data/test-diff-suppr/libtest4-local-suppr-v{0,1}.so: New test
inputs.
* tests/data/test-diff-suppr/test4-local-suppr-0.suppr: Likewise.
* tests/data/test-diff-suppr/test4-local-suppr-report-{0,1}.txt:
Likewise.
* tests/data/test-diff-suppr/test4-local-suppr-v{0,1}.{c,h}:
Source code of the new tests inputs.
* tests/Makefile.am: Add the new test material to the source
distribution.
* tests/test-diff-suppr.cc (in_out_spec): Run this test harness
over the new test input above.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
Gain ability know if a diff node has local changes
* include/abg-comparison.h (diff::has_local_changes): Add new pure
interface.
({decl_diff_base, type_diff_base, distinct_type_diff, var_diff,
pointer_diff, reference_diff, array_diff, qualified_type_diff,
enum_diff, class_diff, base_diff, scope_diff, function_decl_diff,
type_decl_diff, typedef_diff,
translation_unit_diff}::has_local_changes): Declare the
implementation of the pure interface above.
* src/abg-comparison.cc ({decl_diff_base, type_diff_base,
distinct_type_diff, var_diff, pointer_diff, reference_diff,
array_diff, qualified_type_diff, enum_diff, class_diff, base_diff,
scope_diff, function_decl_diff, type_decl_diff, typedef_diff,
translation_unit_diff}::has_local_changes): Define the
implementation of the pure interface above.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
Write comparison functions that hint at the kind of changes they see
* include/abg-ir.h (enum change_kind): Declare new enum.
(operator|(change_kind, change_kind), operator&(change_kind,
change_kind), operator|=(change_kind&, change_kind)): Declare new bit-wise
operators for the new enum change_kind.
(equals): Declare this new comparison function for decl_base,
scope_decl, type_base, type_decl, scope_type_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, function_type, class_decl, and
class_decl::base_spec.
(class_decl::base_spec::operator(const decl_base&)): Declare new
equality operator.
* src/abg-ir.cc (operator|(change_kind l, change_kind r))
(operator&(change_kind l, change_kind r), operator|=(change_kind&
l, change_kind r), operator&=(change_kind& l, change_kind r)):
Define these new operators.
(equals): Define this new comparison function for decl_base,
scope_decl, type_base, type_decl, scope_type_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, function_type, class_decl, and
class_decl::base_spec.
({decl_base, scope_decl, type_base, type_decl, scope_type_decl,
qualified_type_def, pointer_type_def, reference_type_def,
array_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, function_type, class_decl,
class_decl::base_spec}::operator==): Re-write these comparison
operators in terms of their relevant equal() functions.
2014-09-22 Dodji Seketeli <dodji@redhat.com>
Fix struct type kind suppression support
* src/abg-comparison.cc (type_suppression::suppresses_diff): Do
not crash on diff nodes that are not about struct/classes, when
"type_kind = struct" has been specified.
* tests/data/test-diff-suppr/test2-struct-suppr-{0,1}.suppr: New test input.
* tests/data/test-diff-suppr/test2-struct-suppr-report-{0,1}.txt:
Likewise.
* tests/data/test-diff-suppr/test2-struct-suppr-v{0,1}.o: Likewise
* tests/data/test-diff-suppr/test2-struct-suppr-v{1,0}.cc: Source code
for binary test input.
* tests/test-diff-suppr.cc (in_out_spec): Run this harness on the
new test input above.
* tests/Makefile.am: Add the new test input files to source
distribution.
2014-09-22 Dodji Seketeli <dodji@redhat.com>
Replace is_typedef by type_kind property in type suppressions
* doc/suppr-doc.txt: Add type_kind property "documentation" in the
type suppression.
* include/abg-comparison.h (type_suppression::type_kind): New
enum.
(type_suppression::{get_consider_typedefness,
set_consider_typedefness, get_is_typedef, set_is_typedef}):
Remove.
(type_suppression::{get_consider_type_kind,
set_consider_type_kind, get_type_kind, set_type_kind}): Declare
new methods.
* Include/abg-fwd.h (is_type_decl): Declare new function.
(is_enum): Declare new overload that takes a type_base_sptr.
* src/abg-comparison.cc
(type_suppression::priv::{consider_typedefness_, is_typedef_}):
Remove these data members.
(type_suppression::priv::{consider_type_kind_, type_kind_}): New
data members.
(type_suppression::priv::priv): Adjust.
(type_suppression::{get_consider_typedefness,
set_consider_typedefness, get_is_typedef, set_is_typedef}): Remove
these member functions.
(type_suppression::{get_consider_type_kind,
set_consider_type_kind, get_type_kind, set_type_kind}): Define
these new member functions.
(type_suppression::suppresses_diff): Adjust to consider the kind
of types more generally than just considering typedef-ness.
(read_type_kind_string): New static function.
(read_type_suppression): Use the above to parse the value of the
new type_kind property. Adjust the creation of the resulting
type_suppression object.
* src/abg-ir.cc (is_type_decl): Define new function.
* tests/data/test-diff-suppr/test1-typedef-suppr-0.suppr: Adjust.
* tests/data/test-diff-suppr/test1-typedef-suppr-1.suppr: Adjust.
2014-09-19 Dodji Seketeli <dodji@redhat.com>
Initial support for type suppressions
* include/abg-comparison.h (diff_category::SUPPRESSED_CATEGORY):
New enumerator.
(diff_category::{SIZE_OR_OFFSET_CHANGE_CATEGORY,
VIRTUAL_MEMBER_CHANGE_CATEGORY): Update the enumerator values for
these.
(diff::EVERYTHING_CATEGORY): Adjust.
(suppression_base, type_suppression): Declare new types.
(suppression_ptr, suppressions_type, type_suppression_sptr)
(type_suppressions_type): New typedefs.
(read_type_suppressions, read_suppressions): Declare new
functions.
(diff_context::{suppressions, add_suppression, add_suppressions}):
Declare new methods.
(diff::is_suppressed): Declare new member function.
(apply_suppressions): Declare new function & overloads.
* src/abg-comparison.cc (is_type_diff): Define new static
function.
({suppression_base, type_suppression}::priv): Define new types.
({suppression_base, type_suppression}::*): Define the methods of the new
suppression_base, type_suppressions types.
(read_type_suppression, read_type_suppressions, read_suppressions)
(read_type_suppressions): Define new static functions.
(diff_context::priv::supprssions_): New data member.
(diff_context::{suppressions, add_suppression, add_suppressions}):
New methods.
(diff::is_filtered_out): Consider that a diff node that is in the
SUPPRESSED_CATEGORY is filtered out.
(diff::is_suppressed): Define new member function.
(operator<<(ostream& o, diff_category c)): Support the
SUPPRESSED_CATEGORY category.
(corpus_diff::report): Apply suppressions before reporting
anything.
(category_propagation_visitor::visit_end): Do not propagate
SUPPRESSED_CATEGORY. This is just like what we do for
REDUNDANT_CATEGORY.
(struct suppression_categorization_visitor): New visitor.
(apply_suppressions): Define function & overloads.
* include/abg-ini.h (config::section::find_property): New method.
(config::section): Fix end of class comment.
* src/abg-ini.cc (config::section::find_property): Define new
method.
* tests/data/test-diff-suppr/test0-type-suppr-{0,1,2}.suppr: New
test input files.
* tests/data/test-diff-suppr/test0-type-suppr-report-{0,1,2,3}.txt:
Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-v{0,1}.o: Likewise.
* tests/data/test-diff-suppr/test0-type-suppr-v{0,1}.cc: Source code
for new test input.
* tests/data/test-diff-suppr/test1-typedef-suppr-v{0,1}.o: New test
input files.
* tests/data/test-diff-suppr/test1-typedef-suppr.h: Source code
for new test input files.
* tests/data/test-diff-suppr/test1-typedef-suppr-v{0,1}.c: Likewise
* tests/data/test-diff-suppr/test1-typedef-suppr-{0,1}.suppr: New
test input files.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
* tests/test-diff-suppr.cc: New test harness to run type suppression tests
using the input files above.
* tests/data/test-diff-suppr/test3-struct-suppr-0.suppr: New test input.
* tests/data/test-diff-suppr/test3-struct-suppr-1.suppr: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-v0.cc: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-v0.o: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-v1.cc: Likewise.
* tests/data/test-diff-suppr/test3-struct-suppr-v1.o: Likewise.
* tests/Makefile.am: Build the new runtestdiffsuppr test harness
from the test-diff-filter.cc file. Add the new test files to the
build system and source distribution.
* tools/bidiff.cc (options::suppressions): New data member.
(display_usage): Add a help string for the new
--suppressions command line switch.
(parse_command_line): Parse the --suppressions command line
switch.
(set_diff_context_from_opts): Read the suppressions provided by
the --suppression command line switch and stuff them into the diff
context.
2014-09-19 Dodji Seketeli <dodji@redhat.com>
Make all type diff types extend new type_diff_base type
* include/abg-comparison.h (type_diff_base, decl_diff_base): New
types.
(type_diff_base_sptr): New typedef.
(pointer_diff, reference_diff, array_diff, qualified_type_diff)
(enum_diff, class_diff, type_decl_diff, typedef_diff): Make this
extend the new type_diff_base.
* src/abg-comparison.cc (type_diff_base::priv, type_diff_base):
Define these new types and their methods.
(pointer_diff::pointer_diff, array_diff::array_diff)
(reference_diff::reference_diff)
(qualified_type_diff::qualified_type_diff, enum_diff::enum_diff)
(class_diff::class_diff, type_decl_diff::type_decl_diff)
(typedef_diff::typedef_diff): Adjust.
2014-09-18 Dodji Seketeli <dodji@redhat.com>
Rename abigail::ini::config::section_vector to sections_type
* include/abg-ini.h (abigail::ini::config::sections_type): Renamed
section_vector into this.
(config::{get_sections, set_sections, read_sections,
write_sections}): Adjust.
* src/abg-ini.cc (config::priv::sections_): Adjust.
(config::priv::priv): Likewise.
(config::{config, get_sections}): Likewise.
(read_sections, read_config, write_sections): Likewise.
2014-09-08 Dodji Seketeli <dodji@redhat.com>
Implement the abigail::ini::config abstraction
* include/abg-ini.h (config::config): Add an overload that take a
path and sections.
(config::{get,set}_sections): New accessors.
(read_sections): Rename the previous read_config() functions into
these.
(read_config): Add these function declarations to really act on
instances of abigail::ini::config.
(write_section): Rename the previous write_config functions into
these.
(write_config): Add these function declarations to really act on
instances of abigail::ini::config.
* src/abg-ini.cc (class config::priv): Implement this.
(config::{config, ~config, get_path, set_path, get_sections,
set_sections}): Define these new methods.
(read_sections): Rename the former read_config into this.
(read_config): Add this function definitions to really act on
instances of abigail::ini::config.
(write_sections): Rename the former write_config into this.
(write_config):: Add this function definitions to really act on
instances of abigail::ini::config.
* tools/binilint.cc (main): Adjust.
2014-09-05 Dodji Seketeli <dodji@redhat.com>
Initial support of ini-style file parsing
* include/abg-ini.h: New file.
* include/Makefile.am: Add include/abg-ini.h to the source
distribution.
* src/abg-ini.cc: New file.
* src/Makefile.am: Add src/abg-ini.cc to the source distribution.
* tools/binilint.cc: New testing tool.
* tools/Makefile.am: Add tools/binilint.cc to the source distribution.
2014-09-03 Dodji Seketeli <dodji@redhat.com>
Initial examples of suppression list specifications
* doc/suppr-doc.txt: New file.
2014-10-11 Dodji Seketeli <dodji@redhat.com>
Put IR artifacts in the abigail::ir namespace
* include/abg-fwd.h: Wrap IR artifacts into abigail::ir namespace.
Inject that new abigail::ir namespace into the abigail namespace.
* include/abg-ir.h: Wrap IR artifacts into abigail::ir namespace.
(function_decl::parameter::get_type_name): Adjust the call to
abigail::get_type_name. It's now a call to
abigail::ir::get_type_name.
* src/abg-ir.cc: Wrap IR artifacts into abigail::ir namespace.
* include/abg-traverse.h: Wrap the ir traversing artifact into the
abigail::ir namespace too.
* src/abg-traverse.cc: Adjust.
* include/abg-corpus.h: Wrap corpus type stuff into abigail::ir.
* include/abg-dwarf-reader.h: Inject namespace abigail::ir stuff
into the abigail::dwarf_reader namespace.
* include/abg-reader.h: Inject namespace abigail::ir stuff into
the abigail::xml_reader namespace.
* src/abg-reader.cc: Adjust.
* include/abg-writer.h: Inject namespace abigail::ir stuff into
the abigail::xml_writer namespace.
* src/abg-writer.cc: Inject namespace abigail::ir stuff into
abigail namespace here too.
* src/abg-hash.cc: Inject the abigail::ir namespace into the
abigail namespace.
* tools/abg-tools-utils.cc: Adjust for the injection of
abigail::function_decl. It's now abigail::ir::function_decl.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
Misc style cleanups
* src/abg-comparison.cc: ({pointer_diff, reference_diff}::length):
Add some vertical spaces here.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
constify dm_context_rel::operator==
* include/abg-ir.h (dm_context_rel::operator==): Make this const.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
A distinct_diff node has no children node
* src/abg-comparison.cc (distinct_diff::chain_into_hierarchy): Do
not append any children node here.
2014-10-13 Dodji Seketeli <dodji@redhat.com>
Remove useless redundant_filter
* include/abg-comp-filter.h (class redundant_filter): Remove this
now useless type declaration
* src/abg-comparison.cc (filtering::redundant_filter::visit):
Remove this useless member function definition.
2014-10-10 Dodji Seketeli <dodji@redhat.com>
Sort diff reports about function parameters by their indexes
* include/abg-comparison.h (changed_parms_type): New convenience
typedef.
* src/abg-comparison.cc (struct changed_parm_comp): New comparison
functor.
(sort_changed_parm_map): New sorting function.
(function_decl_diff::report): Use the new sort_changed_parm_map to
sort the diffs for function parameters by their indexes.
2014-10-10 Dodji Seketeli <dodji@redhat.com>
Don't be too eager to use distinct_diff
* src/abg-comparison.cc (try_to_diff): For this to actually
select a diff kind, the two diff subject must be of type
'DiffType'.
(compute_diff_for_types, compute_diff_for_decls): Use
distinct_diff in last resort.
2014-10-10 Dodji Seketeli <dodji@redhat.com>
Implement generic diff tree walking and port categorization over it
* include/abg-comp-filter.h (apply_filter): Declare new overload
that takes a corpus_diff_sptr ...
* src/abg-comp-filter.cc (apply_filter): ... and define it. On
the existing overload for diff_sptr, make sure to traverse all
diff nodes, even those that have already been traversed.
* include/abg-comparison.h (enum diff_category): Remove
NOT_REDUNDANT_CATEGORY, add REDUNDANT_CATEGORY.
(operator&=, +operator<<): Declare new operators for enum diff_category.
(diff_context::{forbid_traversing_a_node_twice,
traversing_a_node_twice_is_forbidden):
(diff_context::categorizing_redundancy): Remove this declaration.
(diff_context::maybe_apply_filters): Declare a new overload that
takes a corpus_diff_sptr. And a take a new flag that says if it
should visit all nodes including those that have already been
visited.
(diff::priv_): Make this data member protected.
(diff::{begin_traversing, is_traversing, end_traversing,
finish_diff_type, children_nodes, append_child_node,
get_pretty_representation, chain_into_hierarchy, traverse}):
Declare new member functions.
(distinct_diff::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Likewise.
(distinct_diff::traverse): Remove.
(pointer_diff::pointer_diff): Take the underlying type diff in
parameter.
(pointer_diff::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
(pointer_diff::traverse): Remove.
(reference_type_def::reference_type_def): Take the underlying type
diff in parameter.
({array_type_def, reference_type_def}::{finish_diff_type,
get_pretty_representation, chain_into_hierarchy}): Declare new
member functions.
({array_type_diff, reference_type_def}::traverse): Remove.
(qualified_type_diff::qualified_type_diff): Take the underlying
type diff in parameter.
({enum_diff, qualified_type_diff, class_diff}::{finish_diff_type,
get_pretty_representation, chain_into_hierarchy}): Declare new
member functions.
({enum_diff, qualified_type_diff, class_diff}::traverse): Remove.
(is_class_diff): Declare new function.
(base_diff::base_diff): Take the underlying type diff in
parameter.
({scope_diff, base_diff}::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
({scope_diff, base_diff}::traverse): Remove.
(function_decl_diff::function_decl_diff): Take the return type
diff as parameter.
({function_decl_diff, type_decl_diff}::{finish_diff_type,
get_pretty_representation, chain_into_hierarchy}): Declare new
member functions.
({function_decl_diff, type_decl_diff}::traverse): Remove.
(typedef_diff::typedef_diff): Take the underlying type diff as
parameter.
(typedef::{finish_diff_type, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
({typedef, translation_unit_diff}::traverse): Remove member
function.
(corpus_diff::{finish_diff_type, children_nodes,
append_child_node, changed_variables, get_pretty_representation,
chain_into_hierarchy}): Declare new member functions.
(class diff_node_visitor::{visit_begin, visit_end}): Declare new
member functions.
(propagate_categories, print_diff_tree, categorizing_redundancy)
(clear_redundancy_categorization, apply_filters): New functions
and function overloads.
* src/abg-comparison.cc (TRY_PRE_VISIT, TRY_PRE_VISIT_CLASS_DIFF)
(TRY_POST_VISIT, TRY_POST_VISIT_CLASS_DIFF)
(CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
(UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE)
(TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(ENSURE_DIFF_NODE_TRAVERSED_ONCE)
(ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Remove these macros.
Hurrah.
(diff_context::priv::categorizing_redundancy_): Remove.
(diff_context::priv::forbid_traversing_a_node_twice_): Add new
data member.
(diff_context::priv::priv): Adjust.
(diff_context::{forbid_traversing_a_node_twice,
traversing_a_node_twice_is_forbidden}): Define new member
functions.
(diff_context::maybe_apply_filters): Once filters are applied (and
categories are set to the relevant diff tree nodes, run a pass
over the diff tree to propagate the categories to the relevant
diff tree parent nodes. Add an overload for corpus_diff_sptr.
(diff_context::categorizing_redundancy): Remove member function.
(diff_context::maybe_apply_filters): Define a new overload for
corpus_diff_sptr
(struct diff::priv::{finished_, traversing_, children_,
pretty_representation_}): New data members.
(diff::priv::priv): Adjust.
(diff::{begin_traversing, is_traversing, end_traversing,
finish_diff_type, children_nodes, append_child_node, traverse,
set_category, get_pretty_representation, chain_into_hierarchy}):
Define new member functions.
(diff::is_filtered_out): Do not refer to NOT_REDUNDANT_CATEGORY
anymore. Rather, use the new REDUNDANT_CATEGORY.
({distinct_diff, var_diff, pointer_diff, array_diff,
reference_diff, qualified_type_diff, enum_diff, class_diff,
base_diff, scope_diff, function_decl_diff, type_decl_diff,
typedef_diff}::{get_pretty_representation, chain_into_hierarchy,
finish_diff_type}): Define new member functions.
({distinct_diff, var_diff, pointer_diff, array_diff,
reference_diff, qualified_type_diff, enum_diff, class_diff,
base_diff, scope_diff, function_decl_diff, type_decl_diff,
typedef_diff, translation_unit_diff}::traverse): Remove member
functions.
(operator&=, operator<<): Define new operators for diff_category.
({function_decl_diff, typedef_diff}::priv::priv): Add a new
constructor.
(pointer_diff::{priv::priv, pointer_diff})
(reference_diff::{priv::priv, reference_diff})
(qualified_type_diff::{priv::priv, qualified_type_diff})
(enum_diff::{priv::priv, enum_diff}, base_diff::{priv::priv,
base_diff}, function_decl_diff::function_decl_diff): Take the
underlying type diff in parameter.
(compute_diff): Adjust the pointer_diff, reference_diff,
qualified_type_diff, base_diff, function_decl_diff overloads.
(class_diff::priv::{count_filtered_bases,
count_filtered_subtype_changed_dm, count_filtered_changed_dm,
count_filtered_changed_mem_fns, count_filtered_inserted_mem_fns,
count_filtered_deleted_mem_fns}): Adjust for the call to
diff_context::maybe_apply_filters.
(corpus_diff::priv::{finished_, pretty_representation_}): New data
member.
(corpus_diff::priv::priv): New constructor.
(corpus_diff::priv::clear_redundancy_categorization): Define new
member function.
(corpus_diff::priv::apply_filters_and_compute_diff_stats):
Adjust for call to diff_context::maybe_apply_filters. Also, call
clear_redundancy_categorization at the end.
(corpus_diff::priv::categorize_redundant_changed_sub_nodes):
Revisit logic.
(corpus_diff::{chain_into_hierarchy, finish_diff_type,
children_nodes, append_child_node, changed_variables,
get_pretty_representation}): Define new member functions.
(corpus_diff::report): Categorize redundancy for every top level
function/variable diff.
(corpus_diff::traverse): Adjust to the new traversing interface.
(diff_node_visitor::{visit_begin, visit_end}): Define new member
functions.
(struct category_propagation_visitor, struct diff_node_printer)
(struct redundancy_marking_visitor, struct
redundancy_clearing_visitor): New diff tree node visitors.
(propagate_categories, print_diff_tree, categorize_redundancy)
(clear_redundancy_categorization, apply_filters): Define new
functions.
* tests/Makefile.am: Add the new tests/print-diff-tree.cc to the
source distribution. Build it into a tests/printdifftree binary.
* tools/abidiff.cc (print_diff_tree): Add debugging functions to
call from within the debugger. By default, this function and its
overloads are not compiled.
2014-10-10 Dodji Seketeli <dodji@redhat.com>
Update copyright notice for tests/test-diff2.cc
* tests/test-diff2.cc: Update copyright year.
2014-10-09 Dodji Seketeli <dodji@redhat.com>
Do not crash on function_decl_diff for fns that have no symbol
* src/abg-comparison.cc (function_decl_diff::report): If a
function decl has no associated elf symbol, do not crash while
trying to report about its elf symbol aliases.
2014-10-09 Dodji Seketeli <dodji@redhat.com>
Avoid broken output for virtual member fns w/o symbols
* src/abg-comparison.cc (represent): When a virtual member
function has no associated elf symbol, do not emit garbage in lieu
of the linkage name. Just emit no linkage name;
* tests/data/test-abidiff/test-struct1-report.txt: Adjust.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Sort added/removed/changed functions reported by the comparison engine
* src/abg-comparison.cc (struct function_comp, struct
changed_function_ptr_comp): New comparison functors.
(sort_string_function_ptr_map)
(sort_string_changed_function_ptr_map): Define new static
functions.
(corpus_diff::report): Sort the added/removed/changed functions
that are reported.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test01-report.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Mention virtual-ness of member function in their pretty representation
* include/abg-fwd.h (get_member_function_is_virtual): Declare new
overload for pointers.
* src/abg-ir.cc (get_member_function_is_virtual): Define it.
(function_decl::get_pretty_representation): Print virtual-ness of
the function_decl being pretty printed.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Do not crash when reporting diffs about virtual member fns that have no symbol
* src/abg-comparison.cc (represent): If a virtual member function
has no symbol do not crash.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Fixup member functions which virtual-ness has just been set
* include/abg-ir.h (fixup_virtual_member_function): Declare new
function.
(class_decl): Declare fixup_virtual_member_function() as a member.
* src/abg-ir.cc (set_member_function_is_virtual): Ensure that the
member function that has seen its virtualness set is also put
correctly put in the vector of virtual member functions of its
class.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Assert that only decls with elf symbols are part of comparison
* src/abg-corpus.cc (corpus::priv::build_public_decl_table): Assert
that when read from DWARF, only decls with elf symbols are part of
the public decls table.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Emit all virtual member functions in group
* src/abg-writer.cc (write_class_decl): Emit virtual member
functions contiguously.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Always emit vtable offset for virtual member function
* src/abg-writer.cc (write_voffset): Emit the vtable offset of
virtual function even when the offset is zero.
2014-10-02 Dodji Seketeli <dodji@redhat.com>
Do not forget priv_->in_pub_sym_tab_ when copying decl_base
* src/abg-ir.cc (decl_base::decl_base(const decl_base& d)): Do
not forget to copy priv_->in_pub_sym_tab_.
2014-10-01 Dodji Seketeli <dodji@redhat.com>
Fix reading several clones of the same member function from DWARF
* include/abg-fwd.h (set_member_function_is_ctor)
(set_member_function_is_dtor, set_member_function_is_const)
(set_member_function_vtable_offset): Declare new functions.
* include/abg-ir.h (class_decl::sort_virtual_mem_fns): Declare new
member function.
(mem_fn_context_rel::{vtable_offset, is_constructor is_destructor,
is_const}): Add these setters.
(set_member_function_is_ctor, set_member_function_is_dtor)
(set_member_function_is_static, set_member_function_is_const)
(set_member_function_vtable_offset)
(set_member_function_is_virtual): Declare these new friend
function to class class_decl::method_decl.
* src/abg-dwarf-reader.cc (finish_member_function_reading): Split
this out from build_class_type_and_add_to_ir. Use the new setters
for member functions properties introduced above.
(build_class_type_and_add_to_ir): Factorize the creation of member
function by using build_ir_node_from_die. Once that function has
created the member function in a rather generic way, use the new
finish_member_function_reading to set the remaining specific
properties for member functions.
(build_function_decl): When called to read additional properties
of a function_decl, allow this to read and update the elf symbol
properties too. This is useful for building a clone of a function
that already has an elf symbol.
(build_ir_node_from_die): When building a function decl, consider
the case of a DIE that has both DW_AT_specification and
DW_AT_abstract_origin set. That is, DW_AT_abstract_origin is set,
and the origin has DW_AT_specification set. This is basically a
clone of a function that implements an interface (this happens for
destructors, for instance). In this case, really do the cloning
of the interface implementation. If the cloned function happens
to be member function, use finish_member_function_reading to read
the properties relevant to its method-ness.
* src/abg-ir.cc (set_member_function_is_ctor)
(set_member_function_is_dtor, set_member_function_is_const)
(set_member_function_vtable_offset)
(class_decl::sort_virtual_mem_fns): Define new functions.
(sort_virtual_member_functions): Define new static function.
(struct virtual_member_function_less_than): New functor.
(class_decl::add_member_function): Keep virtual member functions
vector sorted.
* data/test-read-dwarf/test1.abi: Adjust. Now, both the
cdtor specification and all the clones that implements the
different are emitted.
* data/test-read-dwarf/test2.so.abi: Likewise.
2014-10-01 Dodji Seketeli <dodji@redhat.com>
Do not crash when comparing functions that have no symbol
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Just skip functions
that have no ELF symbol.
2014-09-30 Dodji Seketeli <dodji@redhat.com>
Rename member_function_is_virtual to get_member_function_is_virtual
* include/abg-fwd.h (get_member_function_is_virtual): Renamed the
declaration of member_function_is_virtual into this.
* src/abg-ir.cc (get_member_function_is_virtual): Likewise for its
definition.
* include/abg-ir.h (class decl_base): Adjust the friend function
member_function_is_virtual references.
* src/abg-comp-filter.cc (has_virtual_mem_fn_change)
(has_non_virtual_mem_fn_change): Adjust.
* src/abg-comparison.cc (represent)
(SKIP_MEM_FN_IF_VIRTUALITY_DISALLOWED, class_diff::report):
Likewise.
* src/abg-hash.cc (class_decl::hash::operator()): Likewise.
(function_decl::clone, class_decl::add_member_function): Adjust.
2014-09-30 Dodji Seketeli <dodji@redhat.com>
Factorize a no-op deleter for shared pointer
* include/abg-sptr-utils.h (struct noop_deleter): Move this here
from ...
* src/abg-comparison.cc (struct noop_deleter): ... here.
2014-09-30 Dodji Seketeli <dodji@redhat.com>
Link manuals from the main web page
* doc/website/mainpage.txt: Add a link to the manuals.
2014-09-26 Dodji Seketeli <dodji@redhat.com>
Initial documentation for libabigail
* doc/manuals/Makefile: New file, generated by sphinx-quickstart.
* doc/manuals/abidiff.rst: New manual for abidiff.
* doc/manuals/abidw.rst: New manual for abidw.
* doc/manuals/abilint.rst: New manual for abilint.
* doc/manuals/conf.py: New configuration file generated by sphinx-quickstart.
* doc/manuals/index.rst: The root of the this documentation.
* doc/manuals/libabigail-overview.rst: The overview of libabigail.
* doc/manuals/tools.rst: The root of the tools manuals.
2014-09-26 Dodji Seketeli <dodji@redhat.com>
Do not install the abisym program
* tools/Makefile.am: Do not install abisym. It's really there
just for testing purposes and is of almost no use for generic
users.
2014-09-26 Dodji Seketeli <dodji@redhat.com>
Rename bi* tools to abi* tools
* tests/data/test-bidiff: Rename this directory to
tests/data/test-abidiff.
* tests/test-bidiff.cc: Renamed this to tests/test-abidiff.cc.
* tools/biar.cc: Renamed to tools/abiar.cc
* tools/bidiff.cc: Renamed to tools/abidiff.cc
* tools/bidw.cc: Renamed to tools/abidw.cc
* tools/bilint.cc: Renamed to tools/abilint.cc
* tools/bisym.cc: Renamed to tools/abisym.cc
* tests/test-alt-dwarf-file.cc: Renamed references to bidw* to abidw*.
* tests/test-diff-filter.cc: Renamed references to bidiff to abidiff.
* tests/test-lookup-syms.cc: Renamed references to bisym to abisym.
* tools/Makefile.am: Adjust.
* tests/Makefile.am: Likewise.
2014-09-19 Dodji Seketeli <dodji@redhat.com>
Light cleanup in abg-corpus.cc
* src/abg-corpus.cc
(symtab_build_visitor_type::regex_fns_suppress): use
sptr_utils::build_sptr, rather than building the shared_ptr of
regex_t by hand.
2014-09-18 Dodji Seketeli <dodji@redhat.com>
Pimplify abigail::comparison::diff type
* include/abg-comparison.h (diff::{priv, sptr}): New types.
(diff::priv_): New member.
(diff::*): Remove all the other previous data members and
transform the inline member function definition into declarations
only.
* src/abg-comparison.cc (class diff::priv): New private data type.
(diff::*): Define the previous inline member functions as
out-of-line here.
2014-09-18 Dodji Seketeli <dodji@redhat.com>
Rename shared_ptr<regex_t> into regex_t_sptr
* include/abg-sptr-utils.h (build_sptr()): Rename the return type
from shared_ptr<regex_t> to regex_t_sptr.
2014-09-19 Dodji Seketeli <dodji@redhat.com>
Fix a comment in abg-comparison.h
* include/abg-comparison.h (class base_diff): Fix comment.
2014-09-05 Dodji Seketeli <dodji@redhat.com>
Light style cleanup in tools/bidiff.cc
* tools/bidiff.cc (display_usage): Remove useless space before '&'.
2014-09-05 Dodji Seketeli <dodji@redhat.com>
src/Makefile.am cleanup
* src/Makefile.am: Remove the unused 'headers' variable.
2014-09-16 Dodji Seketeli <dodji@redhat.com>
Emit reports about not-yet categorized diff nodes
* include/abg-comparison.h (NO_CHANGE_CATEGORY): Better comment
this enumerator.
* src/abg-comparison.cc (diff::is_filtered_out): Not-yet
categorized changes are not filtered out anymore.
(distinct_diff::report): Avoid extraneous new line here.
2014-09-16 Dodji Seketeli <dodji@redhat.com>
Better support for inline related diffs
* include/abg-comparison.h
(diff_category::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY): New
enumerator.
(diff_category::EVERYTHING_CATEGORY): Adjust.
* include/abg-ir.h (elf_symbol::get_aliases_id_string)
(elf_symbol::does_alias, elf_symbols_alias)
(compute_aliases_for_elf_symbol): Declare new functions ...
* src/abg-ir.cc (elf_symbol::get_aliases_id_string)
(elf_symbol::does_alias, elf_symbols_alias)
(compute_aliases_for_elf_symbol): ... and define them.
(function_decl::operator==): Take in account elf symbol aliases.
* src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
Define new static functions.
(harmless_filter::visit): Categorize function name changes that
n doesn't impact underlying elf symbols (or the fact that two
symbols were aliases and are not anymore) as harmless.
* src/abg-comparison.cc (function_decl_diff::report): Properly
report function name changes, or symbol aliases changes for that
matter. Also report inline-ness declaration changes.
* src/abg-dwarf-reader.cc (die_is_declared_inline): New static
function.
(build_function_decl): Use the above.
* tools/bidiff.cc (set_diff_context_from_opts): Add
abigail::comparison::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY into the
harmless change camp.
* tests/data/test-diff-dwarf/test14-inline-report.txt: New test
input.
* tests/data/test-diff-dwarf/test14-inline-v0.o: Likewise.
* tests/data/test-diff-dwarf/test14-inline-v1.o: Likewise.
* tests/data/test-diff-dwarf/test14-inline-v0.cc: Source code for
test input.
* tests/data/test-diff-dwarf/test14-inline-v1.cc: Source code for
test input.
* tests/test-diff-dwarf.cc: Run this test harness over the new
input above.
* tests/data/test-diff-filter/test20-inline-report-0.txt: Likewise.
* tests/data/test-diff-filter/test20-inline-report-1.txt:
Likewise.
* tests/data/test-diff-filter/test20-inline-v0.o: New test input.
* tests/data/test-diff-filter/test20-inline-v1.o: New test input.
* tests/data/test-diff-filter/test20-inline-v0.cc: Source code for
test input.
* tests/data/test-diff-filter/test20-inline-v1.cc: Likewise.
* tests/test-diff-filter.cc: Run this test harness over the new
input above.
2014-09-16 Dodji Seketeli <dodji@redhat.com>
Better support for enum diffs
* include/abg-comparison.h (changed_enumerator_type): New typedef.
(diff_category::{HARMLESS_ENUM_CHANGE_CATEGORY}): New enumerator.
* src/abg-comp-filter.cc (has_type_size_change)
(has_enumerator_insertion, has_enumerator_removal_or_change)
(has_harmful_enum_change): New functions.
(harmless_filter::visit): Categorize enumerator insertions that
don't change the size of the type into HARMLESS_ENUM_CHANGE_CATEGORY.
(harmful_filter::visit): Categorize enumerator removal or any enum
change that changes the size of the type into
SIZE_OR_OFFSET_CHANGE_CATEGORY.
* src/abg-comparison.cc (enumerator_value_comp)
(changed_enumerator_comp): New types.
(sort_enumerators, sort_changed_enumerators): New static
functions.
(enum_diff::report): Sort enum related reports by the value of the
enumerators.
* src/abg-dwarf-reader.cc (build_enum_type): Name anonymous enums
as __anonymous_enum__.
* tools/bidiff.cc (set_diff_context_from_opts): Add
abigail::comparison::HARMLESS_ENUM_CHANGE_CATEGORY into the harmless
stuff camp.
* tests/data/test-diff-dwarf/test15-enum-report.txt: New test
input.
* tests/data/test-diff-dwarf/test15-enum-v1.o: Likewise.
* tests/data/test-diff-dwarf/test15-enum-v0.o: Likewise.
* tests/data/test-diff-dwarf/test15-enum-v0.cc: Source code for
test input.
* tests/data/test-diff-dwarf/test15-enum-v1.cc: Likewise.
* tests/data/test-diff-filter/test19-enum-report-0.txt: New test input.
* tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
* tests/data/test-diff-filter/test19-enum-v0.o: Likewise.
* tests/data/test-diff-filter/test19-enum-v1.o: Likewise.
* tests/data/test-diff-filter/test19-enum-v0.cc: Source code for
test input.
* tests/data/test-diff-filter/test19-enum-v1.cc: Likewise.
* tests/test-diff-dwarf.cc: Run this test harness on the new test
inputs above.
* tests/test-diff-filter.cc: Likewise.
* tests/Makefile.am: Add the new files above to the source distribution.
2014-09-16 Dodji Seketeli <dodji@redhat.com>
Add constness to elf_symbol::operator==
* include/abg-ir.h (elf_symbol::operator==): Add a const to the
declaration ...
* src/abg-ir.cc (elf_symbol::operator==): ... and to the definition.
2014-09-15 Dodji Seketeli <dodji@redhat.com>
Misc style cleanups
* src/abg-comparison.cc (ChangedDataMemberComp): Rename this to
changed_data_member_comp
(sort_changed_data_members): Adjust.
(DataMemberComp): Rename this to data_member_comp.
(sort_data_members): Adjust.
2014-09-15 Dodji Seketeli <dodji@redhat.com>
Constify some function parameters in abg-comp-filter.cc
* src/abg-comp-filter.cc (type_size_changed): Now take const
parameters.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Add .gitignore files.
* .gitignore: Add new file.
* m4/.gitignore: Likewise.
* tools/.gitignore: Likewise.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Place -L/-l flags into *_LIBADD/*_LDADD
* src/Makefile.am: -L and -l ought to be in LIBADD/LDADD because
that is the only place guaranteed to be in the right spot. So add
Them to libabigail_la_LIBADD.
* tools/Makefile.am: Likewise.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Add libelf to libabigail.la's linker line
* configure.ac: Check for the existence of libelf at configure
time by looking at the presence of the elf_end symbol. Add the
libelf to the link command line.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Drop hardcoded substitutions
* doc/Makefile.am: Do not use @docdir@. It's indeed replaced at
configure time. But there is no need for this limitation with
automake, as $(docdir) is available and replaceable anytime.
* src/Makefile.am: Likewise for @DEPS_LIBS@ and @DEPS_CFLAGS@.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Replace indirect variable assignments
* configure.ac(DEVEL_CFLAGS, DEVEL_CXXFLAGS): Remove these
useless variables.
(CFLAGS, CXXFLAGS): Set these variables directly.
* include/Makefile.am (pkginclude_HEADERS): Use this predefined
variable.
(publicheaders_DATA, publicheadersdir): Remove these.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Remove empty and autogenerated files from git repository
* ChangeLog: Remove this empty file for now. It'll be added back
right before the first release by automatic generation from the
commit logs.
* INSTALL: Remove this empty file for now.
* NEWS: Remove this empty file for now. It'll be added back right
before the first release.
* configure.ac (AM_INIT_AUTOMAKE): As the mandatory but empty
files above are being removed for now, let's put in the 'foreign'
mode of automake for the moment. We'll likely remove it at
release time.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Set automake options globally
* configure.ac(AM_INIT_AUTOMAKE): Set the subdir-object option
here ..
* src/Makefile.am: ... not here.
* tests/Makefile.am: Likewise.
* tools/Makefile.am: Likewise.
2014-09-09 Jan Engelhardt <jengelh@inai.de>
Stash some autogenerated tools in build-aux/
* configure.ac: Reduce the pollution in the top-level directory a
bit.
2014-09-10 Dodji Seketeli <dodji@redhat.com>
Fix memory leaks due to cycles in types ownership
* include/abg-fwd.h (std::tr1::weak_ptr): Inject this type in the
abigail namespace.
* include/abg-ir.h: Write a memory management guideline for the IR
artifacts.
(Type_base_wptr, function_type_wptr)
(class_decl_wptr): New typedefs.
(translation_unit::get_canonical_function_type): Declare new
member function.
(qualified_type_def::underlying_type_)
(reference_type_def::pointed_to_type_)
(typedef_decl::underlying_type_, function_decl::parameter::type_)
(function_type::return_type_, method_type::class_type_)
(non_type_tparameter::type_, type_composition::type_): Make this a
weak pointer.
(qualified_type_def::get_pointed_to_type)
(reference_type_def::get_pointed_to_type)
(array_type::get_element_type, typedef_decl::get_underlying_type)
(var_decl::get_type, function_decl::parameter::get_type)
(function_type::get_return_type, method_type::get_class_type)
(non_type_tparameter::get_type)
(type_composition::get_composed_type): Adjust to make this return
a shared pointer initialized with the content of the weak pointer.
(function_decl::function_decl, method_decl::method_decl): Remove
the overload that doesn't take a type. This is because now,
function types need to be registered to their containing
translation unit.
(struct function_type::hash): Declare here.
* src/abg-hash.cc (struct function_type::hash): Declare this in
abg-ir.h and just define the methods here.
* src/abg-ir.cc (fn_type_ptr_map): New typedef.
(translation_unit::priv::canonical_types_): Remove this unused
member.
(translation_unit::priv::canonical_function_types_): New member.
(translation_unit::get_canonical_function_type): Define this
function.
(array_type_def::priv::element_type_, var_decl::priv::type_)
(function_decl::priv::type_): Make this a weak pointer.
(qualified_type_def::get_underlying_type)
(pointer_type_def::get_pointed_to_type)
(reference_type_def::get_pointed_to_type)
(array_type_def::get_element_type)
(typedef_decl::get_underlying_type, var_decl::get_type)
(function_decl::get_type): Adjust to make this return a shared
pointer initialized with the content of the weak pointer.
(qualified_type_def::build_name)
(pointer_type_def::get_qualified_name)
(reference_type_def::get_qualified_name): Adjust.
(method_type::set_class_type): Cleanup the logic.
(function_decl::priv::priv): Remove the overload that takes a bare
pointer to a type. This should not be used now that we need the
function type to registered with the translation unit.
(function_decl::function_decl): Remove the overload that doesn't
take a type. This is because now, function types need to be
registered to their containing translation unit.
* src/abg-dwarf-reader.cc (build_function_decl): Register the
function type within its translation type and use its canonical
version. This complies with the new memory management rules.
* src/abg-reader.cc (build_function_decl): Likewise.
2014-09-10 Dodji Seketeli <dodji@redhat.com>
Compare class names when comparing methods
* src/abg-ir.cc:
2014-09-10 Dodji Seketeli <dodji@redhat.com>
Slight white space fix
* src/abg-hash.cc (method_type::hash::operator()(const
method_type&)): White space fix.
2014-09-10 Dodji Seketeli <dodji@redhat.com>
Update copyright notice
* include/abg-ir.h: Update year of copyright notice.
2014-07-05 Ondrej Oprala <ooprala@redhat.com>
Unite help output for tools
* tools/biar.cc (std::ostream): Add a using directive.
(display_usage): Make it take a string reference and an ostream
as parameters. Use the ostream argument as an output stream
instead of a hard-coded cout.
Prettify output.
(main): Call display_usage with new parameters.
* tools/bidiff.cc (display_usage): Declare it static.
Prettify output.
* tools/bidw.cc (display_usage): Prettify output.
* tools/bilint.cc (display_usage): Declare it static.
Prettify output.
* tools/bisym.cc (std::cerr): Add a using directive.
(prog_name): Rename progname into this.
(display_usage): Rename show_help into this.
Add an ostream as a parameter. Use the ostream argument
as output stream insted of a hard-coded cout.
2014-09-03 Dodji Seketeli <dodji@redhat.com>
Adjust copyright year
* tests/test-diff-dwarf.cc: Adjust year in copyright notice.
2014-09-03 Dodji Seketeli <dodji@redhat.com>
Sort reported changed data members by increasing offset
* include/abg-comparison.h (changed_type_or_decl_vector): New
typedef.
* include/abg-fwd.h (is_data_member): Change the overload that
takes a decl_base_sptr to make it return the real var_decl_sptr
rather than just a bool.
* src/abg-comparison.cc (ChangedDataMemberComp, DataMemberComp):
New comparison functors.
(sort_changed_data_members, sort_data_members): Sorting functions
for changed data members and data members.
(class_diff::report): Sort reports for deleted, inserted and
change data members by the increasing value of the offsets of said
data members.
* src/abg-ir.cc (is_data_member): Change the overload that takes a
decl_base_sptr to make it return the real var_decl_sptr rather
than just a bool.
* tests/data/test-bidiff/test-struct1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test13-report.txt: New test input.
* tests/data/test-diff-dwarf/test13-v0.cc: Source code for new
test input.
* tests/data/test-diff-dwarf/test13-v0.o: New test input.
* tests/data/test-diff-dwarf/test13-v1.cc: Source code for new
test input.
* tests/data/test-diff-dwarf/test13-v1.o: New test input.
* tests/Makefile.am: Add the new test inputs above to the source
distribution.
* tests/test-diff-dwarf.cc: Run this test harness on the new test
input.
2014-09-03 Dodji Seketeli <dodji@redhat.com>
Do not filter out diff nodes that are only in NOT_REDUNDANT_CATEGORY
* src/abg-comparison.cc (diff::is_filtered_out): If a diff not is
only in the NOT_REDUNDANT_CATEGORY category consider it as not
being filtered.
* tests/data/test-diff-filter/test18-report.txt: New test input.
* tests/data/test-diff-filter/test18-v0.cc: Source code for new
test input.
* tests/data/test-diff-filter/test18-v0.o: New test input.
* tests/data/test-diff-filter/test18-v1.cc: Source code for new
test input.
* tests/data/test-diff-filter/test18-v1.o: New test input.
* tests/Makefile.am: Add the new test inputs to the source distribution.
* tests/test-diff-filter.cc: Run this test harness on the new test
input above.
2014-09-03 Dodji Seketeli <dodji@redhat.com>
White space cleanup
* src/abg-ir.cc (get_data_member_offset): Remove useless
horizontal white space.
2014-09-03 Dodji Seketeli <dodji@redhat.com>
Add some comments in the comparison engine
* src/abg-comparison.cc: Add a comment for the file.
(struct class_diff::priv::{subtype_changed_dm_,changed_dm_}): Add
comment for these data members.
2014-09-02 Dodji Seketeli <dodji@redhat.com>
Remove useless new line from comparison engine's report
* src/abg-comparison.cc (class_diff::report): Do not emit new
lines after reporting about inserted data members.
* tests/data/test-bidiff/test-qual-type0-report.txt: Adjust.
* tests/data/test-bidiff/test-struct0-report.txt: Adjust.
* tests/data/test-bidiff/test-struct1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-dwarf/test1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test3-report.txt: Adjust.
* tests/data/test-diff-dwarf/test7-report.txt: Adjust.
* tests/data/test-diff-filter/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test01-report.txt: Adjust.
* tests/data/test-diff-filter/test1-report.txt: Adjust.
* tests/data/test-diff-filter/test11-report.txt: Adjust.
* tests/data/test-diff-filter/test14-0-report.txt: Adjust.
* tests/data/test-diff-filter/test14-1-report.txt: Adjust.
* tests/data/test-diff-filter/test15-0-report.txt: Adjust.
* tests/data/test-diff-filter/test15-1-report.txt: Adjust.
* tests/data/test-diff-filter/test16-report.txt: Adjust.
* tests/data/test-diff-filter/test17-0-report.txt: Adjust.
* tests/data/test-diff-filter/test17-1-report.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
* tests/data/test-diff-filter/test3-report.txt: Adjust.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
2014-09-01 Dodji Seketeli <dodji@redhat.com>
Adjust copyright years
* src/abg-corpus.cc: Adjust copyright years.
* src/abg-libzip-utils.cc: Likewise.
* src/abg-writer.cc: Likewise.
2014-09-01 Dodji Seketeli <dodji@redhat.com>
Factorize basic redundancy detection in diff report
* src/abg-comparison.cc
(RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER)
(RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER{2,3}): New
macros.
({pointer_diff, array_diff, reference_diff, qualified_type_diff,
class_diff, typedef_diff}::report): Use the new macros above.
* tests/data/test-bidiff/test-qual-type0-report.txt: Adjust
because type pretty representation are now always quoted.
* tests/data/test-bidiff/test-struct1-report.txt: Adjust likewise.
2014-08-31 Dodji Seketeli <dodji@redhat.com>
Display package configuration at the end of configure
* configure.ac: Display the configure of the package at the end of
the configure script.
2014-08-31 Dodji Seketeli <dodji@redhat.com>
Make zip archive support optional
* configure.ac: Support a new --enable-zip-archive option. By
default its value is set to the 'auto', meaning that if libzip is
installed, that turns the option on -- just like if
--enable-zip-archive was called with the value 'yes'; if libzip is
not installed, that turns the option off -- just like if
--enable-zip-archive was called with the value 'no'. If libzip is
detected, the pre-processor macro HAVE_LIBZIP is set to 1. If
--enable-zip-archive is turned on, the pre-processor macro
WITH_ZIP_ARCHIVE is set to 1.
* config.h.in (HAVE_LIBZIP, WITH_ZIP): New define.
* src/abg-corpus.cc: Include config.h. Guard the inclusion of
abg-libzip-utils.h with the WITH_ZIP_ARCHIVE macro. Likewise for
the use of declarations coming from abg-libzip-utils.h.
* src/abg-libzip-utils.cc: Include config.h. Guard the file's
content with the WITH_ZIP_ARCHIVE macro.
* src/abg-reader.cc: Include config.h. Guard the inclusion of
abg-libzip-utils.h with the WITH_ZIP_ARCHIVE. Likewise for the
use of declarations coming from abg-libzip-utils.h.
* src/abg-writer.cc: Likewise.
* tests/Makefile.am: Build runtestwritereadarchive and runtestdot
only if zip archives are supported.
* tools/Makefile.am: The biar program is built only if
zip archives are supported.
* tools/bidiff.cc: Handle zip archives only if the
WITH_ZIP_ARCHIVE macros is defined.
* tools/bilint.cc: Likewise.
2014-08-28 Dodji Seketeli <dodji@redhat.com>
Tell bidiff --help, wrong options and missing argument apart
* tools/bidiff.cc (options::{display_usage,missing_operand}): New
data members.
(options::options): Initialize them.
(parse_command_line): Flag missing operands. Return false only
when an option could not be parsed. Flag when the user wants us
to display help.
(main): Tell --help, wrong options and missing argument apart and
give an appropriate message on stderr. The help string goes to
stdout though. Just like what GNU diff does.
2014-08-28 Dodji Seketeli <dodji@redhat.com>
In bidiff, don't emit a report when the binaries have the same ABI
* tools/bidiff.cc (main): For differences of zero length, do not
emit any report.
2014-08-29 Dodji Seketeli <dodji@redhat.com>
Take variables in account in corpus changes detection
* src/abg-comparison.cc (corpus_diff::length): Take changes about
variables into account.
2014-08-28 Dodji Seketeli <dodji@redhat.com>
During redundancy marking start with the current node as non redundant
* src/abg-comparison.cc (ENSURE_DIFF_NODE_TRAVERSED_ONCE): If the
diff node is being traversed for the first time, mark it as being
in the NOT_REDUNDANT_CATEGORY. I don't know why I was doing this
only for classes and basic types. Update comments.
* tests/data/test-diff-filter/test16-report.txt: New test input.
* tests/data/test-diff-filter/test16-v0.cc: Source code of new
test input.
* tests/data/test-diff-filter/test16-v0.o: New test input.
* tests/data/test-diff-filter/test16-v1.cc: Source code of new
test input.
* tests/data/test-diff-filter/test16-v1.o: New test input.
* tests/data/test-diff-filter/test17-0-report.txt: Likewise.
* tests/data/test-diff-filter/test17-1-report.txt: Likewise.
* tests/data/test-diff-filter/test17-v0.cc: Source code of new
test input.
* tests/data/test-diff-filter/test17-v0.o: Likewise.
* tests/data/test-diff-filter/test17-v1.cc: Source code of new
test input.
* tests/data/test-diff-filter/test17-v1.o: Likewise.
* tests/Makefile.am: Add the new files to the source distribution.
* tests/test-diff-filter.cc (in_out_spec): Run this test harness
over the new test inputs.
2014-08-28 Dodji Seketeli <dodji@redhat.com>
Give anonymous struct the name "__anonymous_struct__"
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Set
the name of anonymous structs to '__anonymous_struct_'.
2014-08-28 Dodji Seketeli <dodji@redhat.com>
Style fix in the comparison engine
* src/abg-comparison.cc (represent): Remove useless white space.
2014-08-27 Dodji Seketeli <dodji@redhat.com>
In bidiff, change --no-linkage-names to --no-linkage-name
* tools/bidiff.cc (display_usage): Change--no-linkage-names -o
--no-linkage-name in the help string.
(parse_command_line): Adjust the command line parsing accordingly.
* tests/test-diff-filter.cc (in_out_specs): Adjust.
2014-08-27 Dodji Seketeli <dodji@redhat.com>
In diff reports, show symbol version info in linkage names
* src/abg-comparison.cc (represent, corpus_diff::report): show
symbol version info in linkage name info.
2014-08-27 Dodji Seketeli <dodji@redhat.com>
In diff reports, fns & members add/remove at the top, changes later.
* src/abg-comparison.cc (class_diff::report): Put virtual member
function adding/removal/change first, then data members
add/removal, then the rest (including data members changes).
(corpus_diff::report): Put function adding/removal first, then
function changes. Likewise for variables.
* tests/data/test-bidiff/test-struct0-report.txt: Adjust.
* tests/data/test-bidiff/test-struct1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-dwarf/test1-report.txt: Adjust.
* tests/data/test-diff-dwarf/test12-report.txt: Adjust.
* tests/data/test-diff-dwarf/test8-report.txt: Adjust.
* tests/data/test-diff-dwarf/test9-report.txt: Adjust.
* tests/data/test-diff-filter/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test01-report.txt: Adjust.
* tests/data/test-diff-filter/test1-report.txt: Adjust.
* tests/data/test-diff-filter/test13-report.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
* tests/data/test-diff-filter/test3-report.txt: Adjust.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
2014-08-27 Dodji Seketeli <dodji@redhat.com>
Consider symbol versions' public-ness during comparison
* src/abg-ir.cc (elf_symbol::operator==): Rather than comparing
bindings, compare public-ness here. That is, if two symbol
versions' differ because one is GLOBAL and the other one is WEAK,
they should still be considered equal, from an ABI standpoint.
2014-08-27 Dodji Seketeli <dodji@redhat.com>
Lookup proper names of symbol during determination of deleted/added decls
* src/abg-comparison.cc
({class,corpus}_diff::ensure_lookup_tables_populated): Now that in the
intermediate maps we store symbol *ids* rather than symbol names,
make sure to really refer to symbol names for symbol lookups,
rather than (wrongly) referring to symbol ids.
2014-08-26 Dodji Seketeli <dodji@redhat.com>
Cleanup bidiff help string some more
* tools/bidiff.cc (display_usage): Add help strings for --harmless
and --no-harmful.
(main): Emit the help string to stdout, not stderr.
2014-08-26 Dodji Seketeli <dodji@redhat.com>
bidiff --no-harmless is no more
* tools/bidiff.cc (display_usage): Remove the help string for the
--no-harmless option that doesn't exist anymore, as it's on by
default.
2014-08-26 Dodji Seketeli <dodji@redhat.com>
During comparison use symbol name + version as decl ID
* include/abg-ir.h ({var,function}_decl::get_id): New member
function declarations.
* src/abg-ir.cc ({var,function}_decl::get_id): New member function
definitions.
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): Use the
::get_id() function to get an identifier for the function or
variable.
* src/abg-corpus.cc (symtab_build_visitor_type::build_id): Use the
get_id of the function/variable.
2014-08-26 Dodji Seketeli <dodji@redhat.com>
Fix access to alternate die -> decl map
* src/abg-dwarf-reader.cc (read_context::alternate_die_decl_map):
Return the real alternate die decl map, rather than what we was
doing previously b/c of a stupid copy/paste. Oh well.
2014-08-25 Dodji Seketeli <dodji@redhat.com>
Take symbol versions in account when computing added/removed decls
* include/abg-corpus.h
(corpus::lookup_{function,variable}_symbol): Add an overload
declaration that takes the version of the symbol to lookup.
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): So when looking
up the corpora for symbols, take their versions in account.
* src/abg-corpus.cc (corpus::lookup_{function,variable}_symbol):
Add an overload definition that takes the version of the symbol to
lookup.
(symtab_build_visitor_type::build_id): New
member functions.
(corpus::priv::build_public_decl_table): Use the new member
functions above.
* src/abg-ir.cc (elf_symbol::version::operator==): Do not take the
is_default flag in account when comparing two symbol versions.
* libtest12-v{0,1}.so: New test input files.
* libtest12-v{0,1}.c: Source code for the test input files.
* test12-version-script: Version script to build the files above.
* test12-report.txt: Test input file.
* tests/Makefile.am: Add the new test input files above to the
source distribution.
* tests/test-diff-dwarf.cc (in_out_specs[]): Add an entry to this
table for the new test input files.
2014-08-25 Dodji Seketeli <dodji@redhat.com>
Misc style cleanups
* include/abg-corpus.h (corpus::lookup_function_symbol)
(corpus::lookup_variable_symbol): Add the name of the function
parameter in the declaration.
* include/abg-ir.h (elf_symbol::version::version): Properly indent
this constructor declaration.
* src/abg-corpus.cc
(symtab_build_visitor_type::symtab_build_visitor_type): Properly
indent constructor parameters.
* src/abg-ir.cc (function_decl::operator==): Fix typo in
comments.
2014-08-25 Dodji Seketeli <dodji@redhat.com>
bidiff --harmful is not supported anymore
* tools/bidiff.cc (display_usage): remove the '--harmful' line
from the help string as this option is now activated by default.
It's --harmless that exists now.
2014-08-22 Dodji Seketeli <dodji@redhat.com>
A builtin type name change is not harmless - fix that
* include/abg-comp-filter.h (has_harmless_name_change): New
function declaration.
* include/abg-comparison.h
(diff_category::DECL_NAME_CHANGE_CATEGORY): Renamed this into
HARMLESS_DECL_NAME_CHANGE_CATEGORY.
(diff_category::EVERYTHING_CATEGORY): Update.
* include/abg-fwd.h (is_enum): New function declaration.
(is_var_decl): Return the shared_ptr<var_decl> rather than a bool.
(is_data_member): New overload that takes a shared_ptr<decl_base>.
* src/abg-comp-filter.cc (decl_name_changed): Consider the
qualified name here.
(has_harmless_name_change): Define new function declaration.
(harmless_filter::visit): Use the new has_harmless_name_change
function.
* src/abg-comparison.cc (represent)
(report_name_size_and_alignment_changes, enum_diff::report)
(typedef_diff::report, is_data_member): Use the new
filtering::has_harmless_name_change function to simplify logic of
emitting the name change related diff
* tools/bidiff.cc (set_diff_context_from_opts): Adjust
DECL_NAME_CHANGE_CATEGORY -> HARMLESS_DECL_NAME_CHANGE_CATEGORY.
* src/abg-ir.cc (is_data_member, is_enum): New function definitions.
(is_var_decl): Return the var_decl_sptr rather than just a bool.
* tests/data/test-diff-filter/test13-report.txt: Adjust.
* tests/data/test-diff-filter/test6-report.txt: Adjust.
2014-08-18 Ondrej Oprala <ooprala@redhat.com>
Support C and C++ array type.
* include/abg-comparison.h (array_diff): Declare new class.
(array_diff_sptr): Shared pointer to type array_diff.
(compute_diff): Overload the function to take type
array_diff_sptr as the first two arguments.
* include/abg-fwd.h (array_type_def): Declare new class.
(subrange_type): Likewise.
(is_array_def): Declare new function.
* include/abg-ir.h (array_type_def_sptr): Shared pointer
to type array_type_def.
(array_type_def): Declare new class.
(ir_node_visitor::visit): Declare a new virtual function
taking a pointer to type array_type_def as an argument.
* src/abg-comparison.cc (compute_diff_for_types): Add
try_to_diff for two instances of type array_type_def.
(array_diff::priv): declare struct for holding private members
of type array_diff.
(array_diff::array_diff): Define constructor.
(array_diff::{first,second}_array):Define new
member functions.
(array_diff::element_type_diff): Likewise.
(array_diff::{length,report,traverse}): Likewise.
(compute_diff): Define function overloaded in
include/abg-comparison.h.
* src/abg-dwarf-reader.cc (build_array_type): Define new
function. Handle DW_TAG_array_type and DW_TAG_subrange type.
(build_ir_node_from_die): Amend case DW_TAG_array_type with
a call to build_array_type.
* src/abg-hash.cc (array_type_def::hash): Declare new struct.
(type_base::dynamic_hash::operator()): Attempt to dynamic_cast
the argument to type array_type_def as well.
(array_type_def::hash): Declare new struct.
* src/abg-ir.cc (array_type_def::array_type_def): Define
constructors.
(array_type_def::priv): declare struct for holding private members
of type array_type_def.
(array_type_def::operator==(const decl_base&):
Define new operator.
(array_type_def::operator==(const type_base&):
Likewise.
(array_type_def::append_subrange{,s}): Define
new functions.
(array_type_def::{set,get}_size_in_bits): Likewise.
(array_type_def::get_dimension_count): Likewise.
(array_type_def::get_qualified_name): Likewise.
(array_type_def::get_pretty_representation): Likewise.
(array_type_def::get_subrange_representation): Likewise.
(array_type_def::traverse): Likewise.
(array_type_def::get_{element_type,location,subranges}): Likewise.
(array_type_def::is_infinite): Likewise.
(array_type_def::~array_type_def): Define destructor.
(ir_node_visitor::visit): Define function, taking
pointer to array_type_def as an argument.
* src/abg-reader.cc (map_id_and_node): Check if node
is an array.
(is_array_def): Check if object is an array.
(handle_element_node): Handle array_type_def as well.
(build_subrange_type): Define new function.
(build_array_type_def): Likewise.
(build_type): Build type array_type_def as well.
(build_type_composition): Likewise.
(handle_array_type_def): Define new function.
* src/abg-writer.cc: (write_decl): Output arrays
as well.
(write_member_type): Likewise.
(write_type_composition): Likewise.
(write_array_type_def): Define new function.
* tests/data/test-diff-dwarf/test{10,11}-v{0,1}.{cc,o}: New test source
files
* tests/data/test-diff-dwarf/test{10,11}-report.txt: Likewise.
* tests/data/test-diff-dwarf/test10-report.txt: New test input.
* tests/data/test-read-dwarf/test7.cc: New test source
file.
* tests/data/test-read-dwarf/test7.so: New input binary
to read.
* tests/data/test-read-dwarf/test7.so.abi: New reference
test to compare against.
* tests/data/test-read-write/test25.xml: New test source
file.
* tests/test-diff-dwarf.cc: Adjust to launch the new test.
* tests/test-read-dwarf.cc: Likewise.
* tests/test-read-write.cc: Likewise.
* test/Makefile.am: Add the new test inputs to the source
distribution.
2014-08-19 Dodji Seketeli <dodji@redhat.com>
Ignore variables which type couldn't be read from DWARF
* src/abg-dwarf-reader.cc (build_var_decl): Drop the var on the
floor if its type couldn't be built.
2014-08-19 Dodji Seketeli <dodji@redhat.com>
Support TLS variables
* src/abg-ir.cc (elf_symbol::is_variable): Accept TLS objects as
variables too.
* src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr)
(die_location_address): Add an output parameter to say if the
resulting constant value is a tls address or not.
(lookup_public_variable_symbol_from_elf): Use the proper
elf_symbol::is_variable() method, rather than trying to figure out
the low levels of what a variable is here. Also, cleanup the
condition.
(read_context::load_symbol_maps): Consider symbols of type
STT_TLS, when loading symbols for variables. Also, to avoir
symbols that are for versions, filter out symbols of type
STT_OBJECT and with a SHN_ABS section index.
(read_context::get_variable_address): If the address is for a tls
variable, do no try to adjust the address to arrange for things
like prelink. As that doesn't seem to affect TLS variables.
(dwarf_expr_eval_context::set_tls_addr): New data member.
(dwarf_expr_eval_context::dwarf_expr_eval_context): Initialize it.
(dwarf_expr_eval_context::set_tls_address): New accessors.
(dwarf_expr_eval_context::op_manipulates_stack): Handle
DW_OP_GNU_push_tls_address, a bit like DW_OP_form_tls_address, but
then, its result is a constant. Set the
dwarf_expr_eval_context::set_tls_addr flag when these two OPs are
run.
(die_member_offset): Adjust to the new signature of
eval_last_constant_dwarf_sub_expr.
* tests/data/test-diff-dwarf/libtest9-v0.so: New test input.
* tests/data/test-diff-dwarf/libtest9-v1.so: Likewise.
* tests/data/test-diff-dwarf/test9-report.txt: Likewise
* tests/data/test-diff-dwarf/test9-v0.cc: Source code for the
first input.
* tests/data/test-diff-dwarf/test9-v1.cc: Source code for the
second input.
* tests/test-diff-dwarf.cc: Run this harness on the two new inputs
above.
* tests/Makefile.am: Add the new inputs to the source distribution.
2014-08-18 Dodji Seketeli <dodji@redhat.com>
Update copyright for abg-dwarf-reader.cc
* src/abg-dwarf-reader.cc: Update copyright year.
2014-08-18 Dodji Seketeli <dodji@redhat.com>
Make the link to the alt debug info file relative
* tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
Make this link be relative.
2014-08-15 Dodji Seketeli <dodji@redhat.com>
White space fix
* tests/test-lookup-syms.cc: Remove useless white space.
2014-08-15 Dodji Seketeli <dodji@redhat.com>
Update copyright notice
* tests/test-lookup-syms.cc: Update year in copyright notice.
* tools/bidw.cc: Likewise.
2014-08-15 Dodji Seketeli <dodji@redhat.com>
Support alternate debug info sections
* include/abg-dwarf-reader.h (class read_context)
(typedef read_context_sptr, create_read_context)
(has_alt_debug_info): Declare these.
(read_corpus_from_elf): Declare new overload.
* src/abg-dwarf-reader.cc (find_alt_debug_info)
(is_die_attribute_resolved_through_gnu_ref_alt)
(build_primary_die_parent_relations_under)
(build_alternate_die_parent_relations_under):
Define new static functions.
(read_context::{alt_dwarf_,
alt_debug_info_path_, alternate_die_decl_map_,
alternate_die_parent_map_}): New data members.
(read_context::{alt_dwarf, alt_debug_info_path,
alternate_die_decl_map, associate_die_to_decl_primary,
associate_die_to_decl_alternate, associate_die_to_decl,
lookup_decl_from_die_offset_primary,
lookup_decl_from_die_offset_alternate,
lookup_decl_from_die_offset, alternate_die_parent_map}): New
member functions.
(read_context::load_debug_info): Painfully Get a handle on the
alternate debug info section too. We shouldn't have to do all
this work; we could use the new dwarf_getalt() function from
libdw, but we cannot as we want to support supports that predate
that api. When a version of elfutils gets released with that api
though, we should conditionally use that instead.
(build_ir_node_from_die, get_parent_die, get_scope_for_die)
(build_namespace_decl_and_add_to_ir)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type, build_typedef_type)
(build_var_decl, build_function_decl): Take a new parameter that
tells if the input DIE is from alternate debug info. Adjust their
code accordingly.
(die_die_attribute): Take a new output parameter that tells if the
resolved DIE is from alternate debug info. Also take a new
parameter that tells if the input DIE is from alternate debug info
sections.
(build_die_parent_relations_under): Take the DIE -> parent map to
act upon. Also, add a new overload that takes a flag saying if
the DIE is from alternate debug info or not, and act upon that.
(build_die_parent_maps): Renamed build_die_parent_map into this
and make it build DIE -> parent DIE relationship for the alternate
debug info file as well.
(find_last_import_unit_point_before_die, ): Adjust to use the
information about if the relevant DIEs are in alternate debug info
or not.
(build_translation_unit_and_add_to_ir): Clear the alternate DIE ->
decl map, that is per TU just as the primary DIE -> decl map.
Adjust to use the information about if the relevant DIEs are in
alternate debug info or not.
(read_debug_info_into_corpus): Build the two DIE -> DIE parent
maps (one for the primary debug info and one for the alternate
debug info).
(create_read_context, has_alt_debug_info): Define new public entry
points.
(read_corpus_from_elf): New entry point overload that takes a
read_context.
* tools/bidw.cc (options::{check_alt_debug_info_path,
show_base_name_alt_debug_info_path}): New data members.
(display_usage): Update for the two new options
--check-alternate-debug-info and
check-alternate-debug-info-base-name.
(parse_command_line): Parse the two options above.
(main) Handle the two new options above.
* tests/Makefile.am: Build the new runtestaltdwarf test. Add the
new data/test-alt-dwarf-file/* files to the build system.
* tests/test-alt-dwarf-file.cc: New test driver.
* tests/data/test-alt-dwarf-file/test0-common.cc: New test input
files.
* tests/data/test-alt-dwarf-file/libtest0-common.so: Likewise.
* tests/data/test-alt-dwarf-file/test0.cc: Likewise.
* tests/data/test-alt-dwarf-file/libtest0.so: Likewise.
* tests/data/test-alt-dwarf-file/test0.h: Likewise.
* tests/data/test-alt-dwarf-file/test0-common-dwz.debug: Likewise.
* tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
Likewise.
* tests/data/test-alt-dwarf-file/test0-debug-dir/test0-common-dwz.debug:
Likewise.
* tests/data/test-read-dwarf/test1.abi: Adjust. bidw doesn't emit
an abstract constructor/destructor anymore. It emits just the
functions matching the cdtor symbols found in the binary.
* tests/data/test-read-dwarf/test2.so.abi: Likewise.
2014-07-26 Dodji Seketeli <dodji@redhat.com>
Better handle corner cases of void* DWARF parsing
* src/abg-dwarf-reader.cc (build_pointer_type_def): Better
support cases where the underlying type of the pointer is not
know. In that case, the pointer should not be created.
2014-07-20 Dodji Seketeli <dodji@redhat.com>
Support finding symbols with bias wrt DWARF references
* src/abg-dwarf-reader.cc (get_binary_load_address): New function
definition.
(read_context::elf_handle): Add comment.
(read_context::{dwarf_elf_handle, dwarf_is_splitted,
maybe_adjust_address_for_exec_or_dyn}): New method definitions.
(maybe_adjust_fn_sym_address)
(maybe_adjust_var_sym_address): Move these so they become members
of read_context. Also, For shared libraries and executable (that
could have been e.g prelinked), consider their loading address
when trying to find which symbol resides at a given place in
memory.
(read_context::{get_function_address, get_variable_address):
Adjust.
(build_translation_unit_and_add_to_ir): Fix comment.
2014-07-20 Dodji Seketeli <dodji@redhat.com>
Reset the scope of void_type_decl for each new translation unit
* src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
Clear the void_type_decl on new translation units.
2014-07-18 Dodji Seketeli <dodji@redhat.com>
Update INSTALL file
* INSTALL: Adjust the copyright year information because autotools
2.69 did.
2014-07-18 Dodji Seketeli <dodji@redhat.com>
Correctly write the name of a const reference type
* src/abg-dwarf-reader.cc (maybe_strip_qualification): Define new
function.
(build_ir_node_from_die): Use the maybe_strip_qualification when
building a qualified type.
* src/abg-ir.cc (qualified_type_def::build_name): Fix the
representation of the name of a reference that is const.
* tests/data/test-read-dwarf/test1.abi: Adjust.
* tests/data/test-diff-dwarf/test0-report.txt: Likewise.
* tests/data/test-diff-dwarf/test1-report.txt: Likewise.
* tests/data/test-diff-dwarf/test6-report.txt: Likewise.
* tests/data/test-diff-dwarf/test7-report.txt: Likewise.
* tests/data/test-diff-dwarf/test8-report.txt: Likewise.
* tests/data/test-diff-filter/test0-report.txt: Likewise.
* tests/data/test-diff-filter/test01-report.txt: Likewise.
* tests/data/test-diff-filter/test2-report.txt: Likewise.
* tests/data/test-diff-filter/test3-report.txt: Likewise.
* tests/data/test-diff-filter/test9-report.txt: Likewise.
* tests/data/test-diff-filter/test10-report.txt: Likewise.
* tests/data/test-diff-filter/test13-report.txt: Likewise.
* tests/data/test-diff-filter/test14-0-report.txt: Likewise.
* tests/data/test-diff-filter/test14-1-report.txt: Likewise.
2014-07-01 Sinny Kumari <skumari@redhat.com>
Consider symbols with STB_GNU_UNIQUE binding as public
* src/abg-ir.cc (is_public): Change in function to consider
symbols with STB_GNU_UNIQUE binding as public
* tests/data/test-read-dwarf/test6.cc: Test file to generate
STB_GNU_UNIQUE binding symbols
* tests/data/test-read-dwarf/test6.so: Test shared library having
STB_GNU_UNIQUE binding symbols
* tests/data/test-read-dwarf/test6.so.abi: XML file containing
dwarf information from test6.so
* tests/test-read-dwarf.cc (in_out_specs): Add the new test above
* tests/Makefile.am: Add tests/data/test-read-dwarf/test6.cc,
tests/data/test-read-dwarf/test6.so and
tests/data/test-read-dwarf/test6.so.abi to the distribution
2014-07-01 Dodji Seketeli <dodji@redhat.com>
Add comment to test-read-write.cc
* tests/test-read-write.cc: Update copyright notice and add a
meaningful comment for the file.
2014-06-23 Dodji Seketeli <dodji@redhat.com>
Support reading void* type from DWARF
* include/abg-ir.h (type_decl::get_void_type_decl): Declare new
static method.
* src/abg-ir.cc (type_decl::get_void_type_decl): Define it.
* src/abg-dwarf-reader.cc (build_ir_node_for_void_type): Define
new static function.
(build_pointer_type_def): Support void* type nodes here.
* tests/data/test-read-dwarf/test5.cc: Source code for new test
input.
* tests/data/test-read-dwarf/test5.o: New test input.
* tests/data/test-read-dwarf/test5.o.abi: Likewise.
* tests/Makefile.am: Add the above to the source distribution.
2014-06-23 Dodji Seketeli <dodji@redhat.com>
Update a comment in abg-dwarf-reader.cc
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Update a
comment here.
2014-06-23 Mark Wielaard <mjw@redhat.com>
Handle C99 restrict qualifier and DWARFv3 DW_TAG_restrict_type.
* src/abg-dwarf-reader.cc (build_qualified_type): Handle
DW_TAG_restrict_type by adding CV_RESTRICT.
(build_ir_node_from_die): Call build_qualified_type for
DW_TAG_restrict_type.
* src/abg-reader.cc (build_qualified_type_decl): Handle
"restrict" attribute by adding CV_RESTRICT.
* src/abg-writer.cc (write_qualified_type_def): Output
"restrict" attribute for CV_RESTRICT.
* tests/data/test-read-dwarf/test4.c: New test file.
* tests/data/test-read-dwarf/test4.so: Likewise.
* tests/data/test-read-dwarf/test4.so.abi: Likewise.
* tests/data/test-read-write/test24.xml: Likewise.
* tests/test-read-dwarf.cc (in_out_specs): Add test4.
* tests/test-read-write.cc (in_out_specs): Add test24.xml.
2014-06-23 Dodji Seketeli <dodji@seketeli.org>
Add subdir-objects automake option where it is needed
* src/Makefile.am: Add the subdir-object automake option here.
Do not specify absolute paths for the input files as Automake now
takes care of that just fine.
* tests/Makefile.am: Likewise.
* tools/Makefile.am: Likewise.
2014-06-23 Dodji Seketeli <dodji@seketeli.org>
Remove autotools artifacts from the repository
* config.guess: Remove from revision control system.
* config.sub: Likewise.
* depcomp: Likewise.
* m4/libtool.m4: Likewise.
* missing: Likewise.
2014-06-23 Dodji Seketeli <dodji@redhat.com>
Avoid reporting diff nodes that have already been reported
* include/abg-comp-filter.h (class harmful_filter): Update
comment.
(class redundant_filter): Declare new filter.
* include/abg-comparison.h (enum
diff_category::NOT_REDUNDANT_CATEGORY): New category. Update the
values of the other enumerators.
(diff_context::{add_diff, diff_has_been_traversed}): New overloads.
(diff_context::{categorizing_redundancy, show_redundant_changes}):
Declare new methods.
(diff_context::remove_from_category): Define new inline method.
* src/abg-comparison.cc (noop_deleter::operator()): Constify the
parameter.
(CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
(UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE): New macros.
(TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY): Use the new
CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE and
UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE macros above.
(ENSURE_DIFF_NODE_TRAVERSED_ONCE)
(ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): If the (type_decl or class)
node hasn't been yet traversed, mark it as non-redundant.
(diff_context::priv::categorizing_redundancy): New member.
(diff_context::priv::priv): Initialize it.
(diff_context::{add_diff, diff_has_been_traversed): Define new
overloads.
(diff_context::mark_diff_as_traversed): Intern a diff node that is
marked as being traversed.
(diff_context::{categorizing_redundancy, show_redundant_changes}):
Define new methods.
(diff::is_filtered_out): A redundant function or top-level
variable is considered filtered-out. Otherwise, the new
NOT_REDUNDANT_CATEGORY doesn't play any role when comparing
allowed categories with the set of categories a diff node belongs
to.
(corpus::priv::categorize_redundant_changed_sub_nodes): Define
new member function.
(corpus_diff::priv::apply_filters_and_compute_diff_stats): Change
this to first walk the changed functions and variables to apply
filters, then categorize redundant changed functions, and then
walk the changed functions and variables again to count
filtered-out diff nodes.
(filtering::redundant_filter::visit): Define new member function.
* tools/bidiff.cc (options::show_redundant_changes): New data
member.
(options::options): Initialize it.
(display_usage): Add help string for the --redundant command line
option.
(parse_command_line): Add support for the --redundant command line
option.
(set_diff_context_from_opts): Take the --redundant command line
option in account.
* tests/test-diff-filter.cc: Update this to add new test inputs.
* tests/data/test-diff-filter/test14-0-report.txt: New test input.
* tests/data/test-diff-filter/test14-1-report.txt: Likewise.
* tests/data/test-diff-filter/test14-v0.cc: Likewise.
* tests/data/test-diff-filter/test14-v0.o: Likewise.
* tests/data/test-diff-filter/test14-v1.cc: Likewise.
* tests/data/test-diff-filter/test14-v1.o: Likewise.
* tests/data/test-diff-filter/test15-0-report.txt: Likewise.
* tests/data/test-diff-filter/test15-1-report.txt: Likewise.
* tests/data/test-diff-filter/test15-v0.cc: Likewise.
* tests/data/test-diff-filter/test15-v0.o: Likewise.
* tests/data/test-diff-filter/test15-v1.cc: Likewise.
* tests/data/test-diff-filter/test15-v1.o: Likewise.
* tests/Makefile.am: Add the above to the build system.
2014-06-23 Dodji Seketeli <dodji@redhat.com>
A name that couldn't be demangled remains the same
* src/abg-ir.cc (demangle_cplus_mangled_name): When the demangler
fails to demangle a name, just return the input name as-is.
2014-06-23 Dodji Seketeli <dodji@redhat.com>
Update copyright notice for a bunch of files
* include/abg-comp-filter.h: Update copyright notice.
* include/abg-comparison.h: Likewise.
* src/abg-comparison.cc: Likewise.
* src/abg-ir.cc: Likewise.
* tools/bidiff.cc: Likewise.
* tests/test-diff-filter.cc: Likewise.
2014-06-19 Sinny Kumari <skumari@redhat.com>
Keep symbol's multiple aliases within single attribute separated by comma
* src/abg-writer.cc (write_elf_symbol_aliases): Changing function
to keep multiple symbol aliases within one alias attribute
* src/abg-reader.cc (build_elf_symbol_db): Changing function to read
symbol's alias attribute and split if multiple alias exist with comma(,)
asi a delimiter and add all aliases to main symbol
* tests/data/test-read-dwarf/test3.c: Test file to generate multiple aliases
* tests/data/test-read-dwarf/test3.so: Test shared library having multiple
aliases of a symbol
* tests/data/test-read-dwarf/test3.so.abi: XML file containing dwarf
information from test3.so
* tests/test-read-dwarf.cc (in_out_specs): Add the new test above
* tests/Makefile.am: Add tests/data/test-read-dwarf/test3.c,
tests/data/test-read-dwarf/test3.so and tests/data/test-read-dwarf/test3.so.abi
to the distribution
2014-06-18 Mark Wielaard <mjw@redhat.com>
DW_TAG_mutable_type doesn't exist.
* src/abg-dwarf-reader.cc (is_type_tag): Remove DW_TAG_mutable_type.
(build_ir_node_from_die): Likewise.
2014-06-05 Dodji Seketeli <dodji@redhat.com>
Look at first parm type and artificial-ness to detect static-ness
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): To
tell if a member function is static, look if the first parm is a
pointer to the type of the enclosing class, and if it's
artificial. Don't bother trying to be smart by looking at the
non-presence of DW_AT_object_pointer b/c that attribute wasn't
emitted by GCC 4_4.
2014-06-04 Dodji Seketeli <dodji@redhat.com>
Harden debug info path management & better error reporting
* include/abg-dwarf-reader.h (enum status): New enum.
(read_corpus_from_elf): Return an instance of status above, and
return the corpus by parameter.
* src/abg-dwarf-reader.cc (create_default_dwfl): Add a comment
about elfutils wanting the Dwfl_Callbacks::debuginfo_path to be an
absolute path.
(read_corpus_from_elf): Return an instance of status above, and
return the corpus by parameter.
* tools/abg-tools-utils.h (make_path_absolute): Declare new function.
* tools/abg-tools-utils.cc (make_path_absolute): New
implementation.
* tools/bidiff.cc (options::di_root_path[12]): Make these be
shared pointers.
(parse_command_line): ensure the debug info root paths are
absolute.
(main): Adjust. Give meaningful errors when the debug info or
symbol files couldn't be read.
* tools/bidw.cc (options::di_root_path): Make this be a shared
pointer.
(parse_command_line): Ensure the debug info root path is absolute.
(main): Adjust. Give meaningful errors when the debug info or
symbol files couldn't be read.
* tools/bilint.cc (options::di_root_path): Make this be a shared
pointer.
(parse_command_line): Ensure the debug info root path is absolute.
(main): Adjust. Give meaningful errors when the debug info or
symbol file couldn't be read.
* tests/test-diff-dwarf.cc (main): Adjust.
* tests/test-read-dwarf.cc (main): Likewise.
2014-06-02 Dodji Seketeli <dodji@redhat.com>
Do not choke on AR archives
* tools/abg-tools-utils.h (file_type::FILE_TYPE_AR): New enumerator.
* tools/abg-tools-utils.cc (guess_file_type): Recognize AR archive
files.
* tools/bidiff.cc (main): Support AR archives.
* tools/bidw.cc (main): Likewise.
* tools/bilint.cc (main): Likewise.
2014-05-30 Dodji Seketeli <dodji@redhat.com>
Honor linkage name showing when displaying added/removed member functions
* src/abg-comparison.cc (represent): Take a diff_context. If
instructed to show linkage names, show the linkage name of the
member function.
(class_diff::report): Adjust for the new signature of represent().
2014-05-30 Dodji Seketeli <dodji@redhat.com>
Make bidiff filter output and display symbol names by default
* tools/bidiff.cc (options::options): Initialize
options::show_linkage_names to true and
options::show_harmful_changes to false.
(parse_command_line): Change --linkage-names into
--no-linkage-names as the linkage names are now displayed by
default. Change --no-harmless into --harmless as harmless changes
are now filtered by default.
(display_usage): Update help string for the --linkage-names ->
--no-linkage-names and --no-harmful -> --harmful change.
* tests/test-diff-filter.cc: Adjust.
2014-05-29 Dodji Seketeli <dodji@redhat.com>
Ensure added/removed member functions have their symbols added/removed
* include/abg-comparison.h (diff_context::{set_corpora,
get_first_corpus, get_second_corpus}): Declare new member
functions.
* src/abg-comparison.cc (diff_context::{set_corpora,
get_first_corpus, get_second_corpus}): Define them.
(compute_diff): In the overload for corpus_sptr stick the corpora
being compared, into the diff context.
(class_diff::ensure_lookup_tables_populated): If a member function
is allegedly removed, check that its underlying symbol is removed
from the corpus as well. Otherwise, consider that the member
function hasn't been removed. Likewise, if a member function is
allegedly added, check that its underlying symbol has been added
to the corpus as well. Otherwise, consider that the member
function hasn't been added. The symbols can now be accessed
through the two corpora that are now present in the diff context.
2014-05-29 Dodji Seketeli <dodji@redhat.com>
Fix scope for DIEs with specification or abstract_origin attributes
* src/abg-dwarf-reader.cc (get_scope_for_die): If the DIE has a
DW_AT_specification or DW_AT_abstract_origin attribute, get the
scope of the referred-to DIE.
(build_ir_node_from_die): For a variable DIE that has a
DW_AT_{specification,abstract_origin} attribute, do not add the
built variable IR node to its scope because it is already in a
scope. It's in a scope because that built variable is for the DIE
that is referred-to by the DW_AT_{specification,abstract_origin}
attribute. Likewise for member functions. Also, now,
get_scope_for_die can return a class for a function DIE because
get_scope_for_die now returns the *logical* scope of the DIE; that
is, it follows DW_AT_{specification,abstract_origin} attributes.
* tests/data/test-read-dwarf/test1.abi: Adjust.
2014-05-28 Dodji Seketeli <dodji@redhat.com>
Add a symbol database to the ABI Corpus & support symbol aliases
* include/abg-corpus.h (corpus::{g,s}et_{fun,var}_symbol_map{_sptr}):
Declare new accessors.
(corpus::lookup_{variable,function}_symbol): Declare new member
functions.
* src/abg-corpus.cc (corpus::{g,s}et_{fun,var}_symbol_map{_sptr}):
Define new accessors.
(corpus::lookup_{variable,function}_symbol): Define new member
functions.
* include/abg-ir.h (string_elf_symbol_sptr_map_type)
(string_elf_symbol_sptr_map_sptr, elf_symbols)
(string_elf_symbols_map_type, string_elf_symbols_map_sptr): New
convenience typedefs.
(elf_symbol::{get_main_symbol, is_main_symbol, get_next_alias,
has_aliases, add_alias, get_id_string,
get_name_and_version_from_id, operator=}): Declare new member
functions.
* src/abg-ir.cc (elf_symbol::{get_main_symbol, is_main_symbol,
get_next_alias, has_aliases, add_alias, get_id_string,
get_name_and_version_from_id, operator=}): Define new member
functions.
* include/abg-reader.h (read_corpus_from_file): Take a shared
pointer to corpus.
* src/abg-reader.cc (read_context::{g,s}et_corpus): Define these.
(build_elf_symbol_db, build_elf_symbol_from_reference)
(read_symbol_db_from_input): Define new functions.
(read_corpus_from_input): Adjust. Make it read symbol databases.
(build_elf_symbol): Harden this.
(build_{var,function}_decl): Read the symbol reference. Do not
read the local symbol serialization anymore.
(read_corpus_from_archive): Adjust.
(read_corpus_from_file): Take a reference to a shared pointer to
corpus, rather than a reference to the corpus.
(read_corpus_from_native_xml): Only keep the overload that returns
a corpus. Set the current context with the corpus.
* src/abg-dwarf-reader.cc (addr_elf_symbol_sptr_map_type)
(addr_elf_symbol_sptr_map_sptr): New convenience typedefs.
(read_context::{fun_sym_addr_sym_index_map_,
var_sym_addr_sym_index_map_): Remove.
(read_context::{fun,var}_addr_sym_map_): New. Replace the above
that got removed.
(read_context::{var,fun}_syms_): New.
(read_context::lookup_elf_{fn,var}_symbol_from_address): Adjust.
(read_context::{fun,var}_addr_sym_map{_sptr}): New.
(read_context::{fun,var}_syms{_sptr}): New.
(read_context::load_symbol_maps): Replace
read_context::load_symbol_addr_to_index_maps. Adjust to load all
the new maps.
(read_context::maybe_load_symbol_maps): New.
(read_debug_info_into_corpus): Renamed build_corpus into this.
Update to load symbol maps and set it to the corpus.
* src/abg-writer.cc (write_context::get_fun_symbol_map): New
accessor.
(write_elf_symbol_aliases, write_elf_symbol_reference)
(write_elf_symbols_table): Define new static functions.
(write_var_decl): Write the reference to the underlying symbol of
the variable. Do not write the full symbol here anymore.
(write_function_decl): Likewise, write the reference to the
underlying symbol of the function. Do not write the full symbol
here anymore.
(write_corpus_to_native_xml): Write the symbol databases at the
beginning of the corpus document.
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): Now that the
corpus has symbols, check if a the symbol of an allegedly deleted
function (resp. variable) is deleted; if not, then do not report
the function (resp. variable) as deleted. Similarly, check if the
symbol of an allegedly added function (resp. variable) is added.
if not, the do not report the function (resp. variable) as added.
* tests/test-write-read-archive.cc (main): Adjust.
* tools/biar.cc (extract_tus_from_archive): Likewise.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
* tests/data/test-read-dwarf/test0.abi: Likewise.
* tests/data/test-read-dwarf/test1.abi: Likewise.
* tests/data/test-read-dwarf/test2.so.abi: Likewise.
2014-05-21 Dodji Seketeli <dodji@redhat.com>
Rename 'symbol' in fn names to 'public decl' in abg-corpus.{cc,h}
* src/abg-corpus.cc (lots of places): Rename references to
'symbol' in function & variable names to 'public_decl'.
2014-05-22 Dodji Seketeli <dodji@redhat.com>
Support debug info files being outside the expected system directories
* include/abg-dwarf-reader.h (read_corpus_from_elf): Take a
debug_info_root_path parameter.
src/abg-dwarf-reader.cc (create_default_dwfl): Take a
debug_info_root_path. Use that to initialize the Dwfl_Callbacks
structure used by dwfl_begin.
(create_default_dwfl_sptr, read_corpus_from_elf): Likewise, Take a
debug_info_root_path parameter.
* tests/test-diff-dwarf.cc (main): Adjust.
* tests/test-read-dwarf.cc (main): Likewise.
* tools/bidiff.cc (options::dir_root_path[12]): New member.
(options::options): Initialize it.
(display_usage): Add help string for the --debug-info-dir[12]
options.
(parse_command_line): Handle the new --debug-info-dir[12] options.
(main): Pass the debug info directories to read_corpus_from_elf.
* bidw.cc (options::::di_root_path): New member.
(options::options): Initialize it.
(display_usage): Add help string for the new --debug-info-dir
option.
(parse_command_line): Handle the new --debug-info-dir.
(main): Pass the debug info root path to read_corpus_from_elf.
* tools/bilint.cc (options::di_root_path): New member.
(options::options): Initialize it.
(display_usage): Add help string for the new --debug-info-dir.
(parse_command_line): Handle --debug-info-dir command line option.
(main): Pass the debug info root path to read_corpus_from_elf.
2014-05-21 Dodji Seketeli <dodji@redhat.com>
Fix detection of destructors
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Simply
detect that the destructor starts with a '~'.
2014-05-21 Dodji Seketeli <dodji@redhat.com>
Add clone in the scope of the cloned decl they logically belong to
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Do not try to
add the cloned function/variable to the current scope because
cloning should have added the decl into the scope of the cloned
target.
* src/abg-ir.cc ({var,function}_decl::clone): Insert the clone
decl into the scope of the cloned decl. My understanding is that
it's where they belong.
* tests/data/test-read-dwarf/test1.abi: Update this to incorporate
all the abstract constructors/destructors *and* their clones into
the classes where they belong.
* tests/data/test-read-dwarf/test1.abi: Adjust for the abstract
cdtor being added to the class, as well as their cloned concrete
instances.
* tests/data/test-read-dwarf/test2.so.abi: Likewise.
2014-05-20 Dodji Seketeli <dodji@redhat.com>
Support decl cloning when seeing DW_AT_abstract_origin
* include/abg-ir.h ({var,function}_decl::clone): New method.
* src/abg-dwarf-reader.cc (die_die_attribute): Add a flag to avoid
looking through DW_AT_abstract_origin attribute here.
(build_function_decl): Set the linkage name from
DW_AT_linkage_name if it's not set yet.
(build_ir_node_from_die): For DW_TAG_{variable,subprogram}, when
we see DW_AT_abstract_origin, clone the decl they refer to.
Also, avoid dropping the DIE on the floor just because it doesn't
have die_is_artificial here.
* src/abg-ir.cc ({var,function}_decl::clone): Implement this.
2014-05-19 Dodji Seketeli <dodji@redhat.com>
Don't share types across TUs when DW_TAG_partial_unit are involved
* src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
Clear the part of the context that needs to be per TU.
(build_ir_node_from_die): Assert that this should not be called
for partial and imported unit because for now our practical
assumption is that DIEs under partial unit are lazily read only
when referenced by DIEs that are under DW_TAG_compile_unit.
* tests/Makefile.am: Add the new test files to the build system.
* tests/data/test-read-dwarf/test2.so.abi: Fix the reference
output here to avoid sharing types across TUs, making the output
valid for bilint.
2014-05-19 Dodji Seketeli <dodji@redhat.com>
Initial support for DW_TAG_partial_unit
* src/abg-dwarf-reader.cc (read_context::cur_tu_die_): New member.
(read_context::read_context): Initialize the new member.
(read_context::cur_tu_die): New accessors.
(find_last_import_unit_point_before_die): New static function.
(get_parent_die): Take a logical current die offset parameter. If
the die we want the parent for is a partial unit, then find the
last DW_TAG_imported_unit that imports that partial unit before
the logical current die and return the parent of that
DW_TAG_imported_unit die.
(get_scope_for_die): Take a logical current die offset parameter.
Adjust.
(build_translation_unit_and_add_to_ir): Set/unset the current
translation unit DIE in the context. Adjust.
(build_namespace_decl_and_add_to_ir)
(build_class_type_and_add_to_ir, build_qualified_type)
(build_pointer_type_def, build_reference_type, build_typedef_type)
(build_var_decl, build_function_decl, build_ir_node_from_die):
Take a logical current die offset parameter. Adjust.
(build_corpus): Accept that we can have DIE that are not
DW_TAG_compile_unit at the top level, because, well, we can now
have DW_TAG_partial_unit too.
* tests/data/test-read-dwarf/test2-{0,1}.cc: New test source
files.
* tests/data/test-read-dwarf/test2.h: Likewise.
* tests/data/test-read-dwarf/test2.so: New input binary to read.
* tests/data/test-read-dwarf/test2.so.abi: New reference test to
compare against.
* tests/test-read-dwarf.cc: Adjust to launch the new test.
2014-05-14 Dodji Seketeli <dodji@redhat.com>
Re-build a test input file with debug info
* tests/data/test-lookup-syms/test1.so: Rebuild this with debug
info.
2014-05-14 Dodji Seketeli <dodji@redhat.com>
Serialize and de-serialize elf symbols for var & function decls
* abg-ir.h (string_to_elf_symbol_type, string_to_elf_symbol_binding):
Declare new entry points.
* src/abg-ir.cc (string_to_elf_symbol_type)
(string_to_elf_symbol_binding): Define new entry points.
* include/abg-libxml-utils.h (xml_char_sptr_to_string): Declare
new entry points.
* src/abg-libxml-utils.cc (xml_char_sptr_to_string): Define new
entry points.
* src/abg-reader.cc (read_elf_symbol_type)
(read_elf_symbol_binding, build_elf_symbol): Define new static
functions.
(build_function_decl, build_var_decl): Use the new
build_elf_symbol and set the symbol to the function. Flag the
function as having a public symbol in the symbol table if the
symbol is public.
* src/abg-writer.cc (write_elf_symbol_type)
(write_elf_symbol_binding, write_elf_symbol): Define new static
functions.
(write_var_decl, write_function_decl): Use the new
write_elf_symbol to serialize the symbol for the decl.
* tests/data/test-read-dwarf/test[01].abi: Adjust.
2014-05-14 Dodji Seketeli <dodji@redhat.com>
Don't crash when de-serializing an empty function parm xml node
* src/abg-reader.cc (build_function_parameter): Do not crash if
the xml node is NULL.
2014-05-14 Dodji Seketeli <dodji@redhat.com>
Fix a typo in serializing a decl_base::binding
* src/abg-ir.cc (operator<<(std::ostream&, decl_base::binding)):
Fix a typo here.
2014-05-14 Dodji Seketeli <dodji@redhat.com>
Add a help string for the --no-absolute-path option of bisym
* tools/bisym.cc (show_help): Add a missing help string.
2014-05-13 Dodji Seketeli <dodji@redhat.com>
Do not try to use ELF hash tables in demangling lookup mode
* src/abg-dwarf-reader.cc (lookup_symbol_from_elf): If in
demangling mode, do not use ELF hash tables.
2014-05-13 Dodji Seketeli <dodji@redhat.com>
Use the proper symbol table for and set linkage_name to symbol name
* src/abg-dwarf-reader.cc (find_symbol_table_section): Return the
.symtab if we are looking at an executable or relocatable file and
.dynsym if we are looking at a DSO.
(find_symbol_table_section_index): Likewise. Implement this in
terms of find_symbol_table_section.
(build_{function,var}_decl): Set the linkage_name to the symbol
name, if the symbol name is not empty.
* tests/data/test-diff-filter/test9-report.txt: Adjust.
2014-05-13 Dodji Seketeli <dodji@redhat.com>
Remove redundant "'" around linkage names in diff reports
* src/abg-comparison.cc (corpus_diff::report): Remove the
redundant "'" from the linkage names in the diff.
2014-05-08 Dodji Seketeli <dodji@redhat.com>
Initial support for elf symbol (versionning) during decl comparison
* include/abg-fwd.h (get_linkage_name): Remove.
* include/abg-dwarf-reader.h (enum symbol_type)
(enum symbol_binding): Move these into abg-ir.h.
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
Adjust.
* src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr):
Declare this before using it.
(die_address_attribute, die_location_address)
(stt_to_elf_symbol_type, stb_to_elf_symbol_binding)
(find_hash_table_section_index, find_symbol_table_section)
(find_symbol_table_section_index, find_text_section)
(find_bss_section, compare_symbol_name)
(get_symbol_versionning_sections get_version_for_symbol)
(lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab, get_elf_class_size_in_bytes)
(bloom_word_at, setup_gnu_ht, lookup_symbol_from_elf_hash_tab)
(lookup_symbol_from_symtab, maybe_adjust_fn_sym_address)
(maybe_adjust_var_sym_address): New static functions.
(enum hash_table_kind): New enum.
(struct gnu_ht): New struct.
(read_context::var_decls_to_add_): Renamed var_decls_to_add into
this.
(read_context::{fun, var}_sym_addr_sym_index_map_): New member.
(read_context::{lookup_symbol_from_elf,
lookup_elf_symbol_from_index, lookup_elf_fn_symbol_from_address,
lookup_elf_var_symbol_from_address, fun_sym_addr_sym_index_map,
var_sym_addr_sym_index_map, load_symbol_addr_to_index_maps,
get_function_address, get_variable_address}): New member
functions.
(read_context::lookup_public_{variable,
function}_symbol_from_elf): Adjust.
(op_pushes_constant_value): Fix a bug here.
(lookup_symbol_from_elf): Adjust. Support cases where there is no
elf hash table, e.g, for relocatable files.
(lookup_public_function_symbol_from_elf)
(lookup_public_variable_symbol_from_elf): Adjust.
(build_var_decl): Allow updating the var_decl to associate it with
its underlying symbol. In that case, if the linkage name is not
set, set it to the symbol name.
(build_function_decl): Likewise for function_decl.
(operator<<(std::ostream&, symbol_type)):
(operator<<(std::ostream&, symbol_binding)): Move these do
abg-ir.cc.
* include/abg-ir.h (class elf_symbol): Declare new class. Move
enum symbol_binding and enum symbol_type (from abg-dwarf-reader.h) to
elf_symbol::binding and elf_symbol::type here.
(operator<<(std::ostream&, elf_symbol::type))
(operator<<(std::ostream&, elf_symbol::binding))
(operator==(const elf_symbol_sptr, const elf_symbol_sptr)): New
operators.
(class elf_symbol::version): Declare new class.
(class var_decl): Make this pimpl, and add ...
(var_decl::{g,s}et_symbol): ... new member functions.
(class function_decl): Likewise, make this pimpl and add ...
(function_decl::{g,s}et_symbol): ... new member functions.
* src/abg-ir.cc (struct elf_symbol, elf_symbol::priv): New
types.
(elf_symbol::*): Lots of new members and member functions.
(operator==(const elf_symbol_sptr, const elf_symbol_sptr)): New.
(operator<<(std::ostream&, elf_symbol::type)): New.
(operator<<(std::ostream&, elf_symbol::binding)): New.
(elf_symbol::version::priv): New type.
(elf_symbol::version::*): Lots of member functions.
(get_linkage_name): Removed.
(var_decl::priv): New type. Pimplify the thing.
(var_decl::{s,g}et_symbol): New.
(var_decl::operator==): Take symbols in account in the comparison.
(function_decl::priv): New type.
(function_decl::*): Pimplify.
(function_decl::{s,g}et_symbol): New.
(function_decl::operator==): Take symbols in account in the
comparison.
* include/abg-comparison.h (diff_context::show_linkage_name): New
member function.
* src/abg-comparison.cc (diff_context::priv::show_linkage_name_):
New member.
(diff_context::priv::priv): Initialize it.
(diff_context::show_linkage_names): New member function.
(corpus_diff::report): If the user used --show-linkage-names,
display the linkage name after the name of the functions. Add
missing "'" in the some spots.
* tools/bidiff.cc (options.show_linkage_names): New member.
(display_usage, parse_command_line): Support --linkage-names.
* tools/bisym.cc (show_help): Add '\n' at the end of help string
for --demangle. Add --no-absolute-path option.
(parse_command_line): Support --no-absolute-path.
(main): Adjust for symbol (versionning) support. Consider that
the program successfully completed even when the symbol wasn't
found. Support --no-absolute-path.
* tests/data/test-lookup-syms/test0-report.txt: New.
* tests/data/test-lookup-syms/test01-report.txt: New.
* tests/data/test-lookup-syms/test02-report.txt: New.
* tests/data/test-read-dwarf/test0.abi: Adjust.
* tests/data/test-read-dwarf/test1.abi: Adjust.
* tests/data/test-diff-dwarf/test7-report.txt: Adjust.
* tests/data/test-diff-filter/test10-report.txt: Adjust.
* tests/data/test-diff-filter/test12-report.txt: Adjust.
* tests/data/test-lookup-syms/test1-[123]-report.txt: New.
* tests/data/test-lookup-syms/test1.c: New.
* tests/data/test-lookup-syms/test1.version-script: New.
* tests/test-lookup-syms.cc: Adjust for new tests.
* test/Makefile.am: Adjust makefile.
2014-05-07 Dodji Seketeli <dodji@redhat.com>
Rename decl_base::get_mangled_name into decl_base::get_linkage_name
* include/abg-ir.h (decl_base::get_linkage_name): Renamed
decl_base::get_mangled_name into this.
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated)
(function_decl_diff::report, type_decl_diff::report)
(corpus_diff::priv::ensure_lookup_tables_populated)
(corpus_diff::report, compute_diff): Adjust.
* src/abg-corpus.cc ({var_comp, func_comp}::operator()): Likewise.
(corpus::priv::build_symbol_table): Likewise.
* src/abg-dwarf-reader.cc (die_linkage_name): Renamed
die_mangled_name into this.
(die_loc_and_name, build_translation_unit_and_add_to_ir)
(build_namespace_decl_and_add_to_ir, build_type_decl)
(build_enum_type, build_class_type_and_add_to_ir)
(build_typedef_type, build_var_decl, build_function_decl, ): Adjust.
* src/abg-hash.cc (decl_base::hash::operator()): Likewise.
* src/abg-ir.cc (decl_base::priv::linkage_name_): Renamed
decl_base::priv::mangled_name_ into this.
(decl_base::priv::priv, decl_base::{decl_base, operator==})
(get_linkage_name, typedef_decl::typedef_decl, var_decl::var_decl)
(function_decl::function_decl, class_decl::base_spec::base_spec)
(class_decl::method_decl::method_decl): Adjust.
(decl_base::{g,s}et_linkage_name): Renamed
decl_base::{g,s}et_mangled_name into this.
* src/abg-writer.cc (write_decl, write_typedef_decl)
(write_var_decl, write_function_decl, dump): Adjust.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Drop symbols not global in a symtab from corpus symtab
* src/abg-corpus.cc (corpus_priv::build_symbol_table): If a
function or variable symbol is not public (global or weak) and
present in an elf symbol table, drop it from the corpus symbol
table. As a result functions are variables (not present in the
elf symbol tables) that we were previously taking in account are
not dropped on the floor, leading to much less noise.
* tests/data/test-diff-dwarf/test0-v0.cc: Update to avoid
generating inline functions.
* tests/data/test-diff-dwarf/test0-v0.o: Likewise.
* tests/data/test-diff-dwarf/test0-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test0-v1.o: Likewise.
* tests/data/test-diff-dwarf/test7-v0.o: Likewise.
* tests/data/test-diff-dwarf/test7-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test7-v1.o: Likewise.
* tests/data/test-diff-dwarf/test8-v0.cc: Likewise.
* tests/data/test-diff-dwarf/test8-v0.o: Likewise.
* tests/data/test-diff-dwarf/test8-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test8-v1.o: Likewise.
* tests/data/test-diff-filter/test0-v0.cc: Likewise.
* tests/data/test-diff-filter/test0-v0.o: Likewise.
* tests/data/test-diff-filter/test0-v1.cc: Likewise.
* tests/data/test-diff-filter/test0-v1.o: Likewise.
* tests/data/test-diff-filter/test10-v0.cc: Likewise.
* tests/data/test-diff-filter/test10-v0.o: Likewise.
* tests/data/test-diff-filter/test10-report.txt: Likewise.
* tests/data/test-diff-filter/test10-v1.o: Likewise.
* tests/data/test-diff-filter/test13-v0.cc: Likewise.
* tests/data/test-diff-filter/test13-v0.o: Likewise.
* tests/data/test-diff-filter/test13-v1.cc: Likewise.
* tests/data/test-diff-filter/test13-v1.o: Likewise.
* tests/data/test-diff-filter/test2-v0.cc: Likewise.
* tests/data/test-diff-filter/test2-v0.o: Likewise.
* tests/data/test-diff-filter/test2-v1.cc: Likewise.
* tests/data/test-diff-filter/test2-v1.o: Likewise.
* tests/data/test-diff-filter/test4-v0.cc: Likewise.
* tests/data/test-diff-filter/test4-v0.o: Likewise.
* tests/data/test-diff-filter/test4-v1.cc: Likewise.
* tests/data/test-diff-filter/test4-v1.o: Likewise.
* tests/data/test-diff-filter/test9-v0.o: Likewise.
* tests/data/test-diff-filter/test9-v1.cc: Likewise.
* tests/data/test-diff-filter/test9-v1.o: Likewise.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Fix mangled name setting for static data members from DWARF
* src/abg-dwarf-reader.cc (build_var_decl): Support adding
properties to an existing var_decl. For now just add mangled
name.
(build_ir_node_from_die): Accept DW_TAG_member too. This helps
for when this function is used to add additional properties to an
existing DW_TAG_member representing a static data member. Then,
use build_var_decl to really add the value of the additional
mangled name property.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Always show pretty representation of variables in report
* src/abg-comparison.cc (corpus_diff::report): Display the pretty
representation of the variable, no matter what.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Set "is_in_public_symbol_table" property for vars & fns
* src/abg-dwarf-reader.cc (build_var_decl, build_function_decl):
Set the "is_in_public_symbol_table" property for the variable or
function decl.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Support symbol lookups from ELF
* include/abg-dwarf-reader.h (symbol_type, symbol_binding): New
enums.
(operator<<): Declare new overloads for the new enums above.
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
Declare new entry points.
* src/abg-dwarf-reader.cc (lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf)
(lookup_public_variable_symbol_from_elf): Define new static
functions.
(read_context::elf_{module_, handle}_): New data members.
(read_context::{elf_module, elf_handle}): New accessors.
(read_context::load_debug_info): Store the elf module into
read_context::_elf_module_. Adjust.
(read_context::{lookup_symbol_from_elf,
lookup_public_function_symbol_from_elf,
lookup_public_variable_symbol_from_elf}): New member functions.
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
(operator<<): Define public entry points.
* tools/bisym.cc: New tool to lookup a symbol in an elf file.
* tools/Makefile.am: Add the bisym.cc source file to the
distribution and arrange to compile it into a 'bisym' executable.
* tests/test-lookup-syms.cc: New test harness.
* tests/data/test-lookup-syms/test0-report.txt: New test input
for the harness above.
* tests/data/test-lookup-syms/test0.cc: Likewise.
* tests/data/test-lookup-syms/test0.o: Likewise
* tests/data/test-lookup-syms/test01-report.txt: Likewise.
* tests/data/test-lookup-syms/test02-report.txt: Likewise.
* tests/Makefile.am: Build the new runtestlookupsyms test and add
the new files to the distribution.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Add corpus::{s,g}et_origin accessors
* include/abg-corpus.h (enum corpus::origin): New enum.
(corpus::{g,s}et_origin): New accessors.
* src/abg-corpus.cc (corpus::priv::origin): New data member.
(corpus::priv::is_symbol_table_built): Move this up.
(corpus::priv::priv): Adjust.
(corpus::{g,s}et_origin): Define accessors.
* src/abg-dwarf-reader.cc (read_corpus_from_elf): Set the corpus
origin. Also set the path. Oops.
* src/abg-reader.cc (read_corpus_from_input)
(read_corpus_from_archive): Set the corpus origin.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Add a get_linkage_name function.
* include/abg-fwd.h (is_at_global_scope): Declare a new overload.
(get_linkage_name): Declare ...
* src/abg-ir.cc (get_linkage_name): ... these new entry points.
(is_at_global_scope): Define these new overloads useful for the
new get_linkage_name.
2014-04-21 Dodji Seketeli <dodji@redhat.com>
Pimplify decl_base and add decl_base::{s,g}et_is_in_public_symbol_table
* include/abg-ir.h (struct decl_base::priv): New pimpl type.
(decl_base::priv_): New pimpl.
(decl_base::{hashing_started, peek_hash_value,
peek_qualified_name, set_qualified_name}): Declare new protected
methods.
(decl_base::{get_context_rel, set_qualified_name, get_location,
set_location, set_name, set_mangled_name, get_visibility,
set_visibility}): Move these out-of-line.
(decl_base::{g,s}et_is_public_symbol_table):
(class_decl::hashing_started): Remove this as we now have
decl_base::hashing_started.
(decl_base::{hash_, hashing_started, location_, context_, name_,
qualified_parent_name_, qualified_name_, mangled_name_,
visibility_}): Move all these members into the new ...
* src/abg-ir.cc (struct decl_base::priv): ... pimpl type.
(decl_base::decl_base): Move these out-of-line here. Adjust the
other overloads.
(decl_base::{hashing_started, peek_hash_value,
peek_qualified_name, set_qualified_name}): Define these new
protected methods.
(decl_base::{get_context_rel, set_context_rel, get_location,
set_location, set_name, get_mangled_name, set_mangled_name,
get_visibility, set_visibility}): Define these out-of-line here.
(decl_base::{get_hash, set_hash, get_scope,
get_qualified_parent_name, get_qualified_name, operator==,
set_scope}): Adjust.
(qualified_type_def::get_qualified_name): Likewise.
(pointer_type_def::get_qualified_name): Likewise.
(reference_type_def::get_qualified_name): Likewise.
(var_decl::set_scope): Likewise.
(class_decl::base_spec): Likewise.
(class_decl::method_decl::set_scope): Likewise.
(decl_base::{g,s}et_is_in_public_symbol_table): Define new accessors.
* src/abg-hash.cc ({decl_base, type_decl, scope_decl,
scope_type_decl, qualified_type_def, pointer_type_def,
reference_type_def, enum_type_decl, typedef_decl, var_decl,
class_decl}::hash::operator): Adjust.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Categorize base class changes as SIZE_OR_OFFSET_CHANGE_CATEGORY
* include/abg-comparison.h (class_diff::{deleted, inserted,
changed}_bases): Declare new member functions ...
* src/abg-comparison.cc ((class_diff::{deleted, inserted,
changed}_bases)): ... and define them.
* src/abg-comp-filter.cc (base_classes_added_or_removed): Define
new static functions.
(harmless_filter): Categorize base classes added or removed.
* tests/data/test-diff-dwarf/test8-report.txt: New test input.
* tests/data/test-diff-dwarf/test8-v0.cc: Likewise.
* tests/data/test-diff-dwarf/test8-v0.o: Likewise.
* tests/data/test-diff-dwarf/test8-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test8-v1.o: Likewise.
* tests/data/test-diff-filter/test13-report.txt: New test input.
* tests/data/test-diff-filter/test13-v0.cc: Likewise.
* tests/data/test-diff-filter/test13-v0.o: Likewise.
* tests/data/test-diff-filter/test13-v1.cc: Likewise.
* tests/data/test-diff-filter/test13-v1.o: Likewise.
* tests/Makefile.am: Add the new files above to the source distribution.
* tests/test-diff-dwarf.cc: Use the new relevant input above to
run more tests.
* tests/test-diff-filter.cc: Likewise.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Fix class diff reporting issues for base classes
* src/abg-comparison.cc (class_diff::report): For base classes,
report their pretty representation. Do not try to report a the
diff of a changed base class that got filtered out. Avoid
emitting too many vertical white spaces.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Simplify SIZE_OR_OFFSET_CHANGE_CATEGORY categorizing
* src/abg-comp-filter.cc (harmful_filter::visit): Now that
type_size_changed is correctly geared to not be fulled by
decl-only classes, there is no need for its caller to handle that
case. And data_member_offset_changed ain't affected by decl-only
classes anyway. So the code is now much simpler.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Fix API doc for static_data_member_type_size_changed
* src/abg-comp-filter.cc (static_data_member_type_size_changed):
Fix API doc comment.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Don't blindly drop DIEs defined in the scope of a function
* src/abg-dwarf-reader.cc (get_scope_for_die): Do not drop a DIE
on the floor just because it is in the scope of a function. We
were dropping a function parameter because its type is a typedef
defined right before the parameter, in the scope of the function.
Urgh. So with this change, that function parameter is not dropped
anymore. I have seen that happening in a DWARF generated by GCC
4.7.1 on libstdc++.so. Hard to come up with a regression test
case for this one.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Useless code killing
* src/abg-comparison.cc (decls_equal::operator()(const decls_type,
const decls_type)): Kill dead code. Note that there is a proper
equality operator for decl_base_sptr already.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
File static data member changes in STATIC_DATA_MEMBER_CHANGE_CATEGORY
* include/abg-comparison.h
(diff_category::STATIC_DATA_MEMBER_CHANGE_CATEGORY): New category.
(diff_category::EVERYTHING_CATEGORY): Update
* src/abg-comp-filter.cc (static_data_member_type_size_changed)
(static_data_member_added_or_removed): Define new static
functions.
(harmless_filter::visit): Categorize changes to static data
members as STATIC_DATA_MEMBER_CHANGE_CATEGORY.
* tools/bidiff.cc (set_diff_context_from_opts):
STATIC_DATA_MEMBER_CHANGE_CATEGORY is falls into the harmless
group.
* tests/data/test-diff-filter/test12-report.txt: New test input.
* tests/data/test-diff-filter/test12-v0.cc: Likewise.
* tests/data/test-diff-filter/test12-v0.o: Likewise.
* tests/data/test-diff-filter/test12-v1.cc: Likewise.
* tests/data/test-diff-filter/test12-v1.o: Likewise.
* tools/bidiff.cc: Run this test with the additional input data
above.
* tests/Makefile.am: Adjust.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Fix typo in comments
* include/abg-comparison.h
(diff_category::NON_VIRT_MEM_FUN_CHANGE_CATEGORY): Fix typo in
comments.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Only non-static data member changes are SIZE_OR_OFFSET_CHANGE_CATEGORY
* src/abg-comp-filter.cc
(non_static_data_member_type_size_changed): Renamed
data_member_offset_changed into this. Make sure the test detects
changes on *non-static* data members only.
(non_static_data_member_added_or_removed): Likewise for
data_member_offset_changed that got renamed into this.
(harmful_filter::visit): Adjust.
2014-04-17 Dodji Seketeli <dodji@redhat.com>
Fix comments in categorization code
* src/abg-comp-filter.cc (data_member_added_or_removed): Fix
comments.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Really detect static-ness of data members. Oops.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Let's
consider that a data member being not laid out (i.e, not having a
data_member_location) is is a static data member. Otherwise, we
were not detecting static data members at all. Well we were only
inferring their presence from seeing the static variable
definition later on. That means we were missing most of the
static variables. Woops.
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): Now that we
are really seeing static data members, let's be prepare to the
fact that we can the same static data member being declared
several times in a corpus.
* tests/data/test-diff-dwarf/test7-report.txt: New test input file.
* tests/data/test-diff-dwarf/test7-v0.cc: Likewise.
* tests/data/test-diff-dwarf/test7-v0.o: Likewise.
* tests/data/test-diff-dwarf/test7-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test7-v1.o: Likewise.
* tests/test-diff-dwarf.cc: Update this to consume the new test
input files.
* tests/Makefile.am: Update this to add the missing test files to
the source distribution.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Add dumping routines for declaration location
* include/abg-fwd.h (get_global_scope()): New overload for const
decl_base&. Move the other overloads up in the file.
(get_translation_unit): Add an overload for decl_base&. Constify
the others.
(dump_decl_location): Declare new functions.
* src/abg-ir.cc (get_global_scope): Define the overload for const
decl_base&. Write the other overloads in terms of this one.
(get_translation_unit): Likewise, define the overload for const
decl_base&. Write the other overloads in terms of this one.
(dump_decl_location): Define these new overloads.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Fix dumping function to make them use generic ostream
* src/abg-writer.cc (dump(const decl_base_sptr, std::ostream&)):
Do not dump the content to cerr here. Rather dump to the output
stream given in parameter. Oops.
(dump(const translation_unit&, std::ostream&)): Likewise.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-ir.cc (get_translation_unit): Remove useless vertical
white space.
(is_global_scope): Add missing API doc.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
A virt mem fn deleted and added to the same offset is not harmful
* src/abg-comp-filter.cc (has_virtual_mem_fn_change): A virtual
member that gets deleted and added back again to the same vtable
offset is not considered as being a virtual member function change
suitable for VIRTUAL_MEMBER_CHANGE_CATEGORY. Likewise for a
function sub-type change not involving a change in the vtable
offset.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Do not categorize size/offset changes when a decl-only class is involved
* src/abg-comp-filter.cc (there_is_a_decl_only_class)
(diff_involves_decl_only_class): New static functions.
(type_size_changed, data_member_added_or_removed)
(has_virtual_mem_fn_change, has_non_virtual_mem_fn_change): Bail
out if one of the types involved is a decl-only class.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Work around "mangled name vanishing from one version of mem fn decl" bug
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): If the first version
of the member function decl doesn't have a mangled name while the
second has it, try the lookups using the pretty representation of
the function.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Do not try to represent the offset for a static data member
* src/abg-comparison.cc (represent_data_member(var_decl_sptr,
ostream&)): If the data member is static, do not try to represent
its offset.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
A static data member shouldn't be checked for having been laid out
* src/abg-comparison.cc (represent_data_member(var_decl_sptr,
ostream&)): If the data member is static do not check for it
having been laid out.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Prefix pretty representation of static data members with 'static'
* src/abg-ir.cc (var_decl::get_pretty_representation): Prefix
pretty representation of static data members with 'static'.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Provide a robust way of getting the size of a qualified type
* include/abg-ir.h (qualified_type_def::get_size_in_bits): Declare
new member function ...
* src/abg-ir.cc (qualified_type_def::get_size_in_bits): ... and
define it. Keep in mind that some times the size of the
underlying type can change between the moment the qualified type
is created and the end of its life time. That is because a
subsequent DIE (from DWARF) can alter the size of the underlying
type. This overload allows the user to always query the size of
the underlying type and keep the size of the qualified type in
sync with it.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Add an assert to the pointer diff reporting code
* src/abg-comparison.cc (pointer_diff::report): If the pointer
diff node is deemed to be reported then the underlying diff node
should be reported as well.
2014-04-16 Dodji Seketeli <dodji@redhat.com>
Little style adjustment in diff node categorization code
* src/abg-comp-filter.cc (harmful_filter::visit): Factorize the
categorization into SIZE_OR_OFFSET_CHANGE_CATEGORY for data member
adding or removal and for data member type size change.
2014-04-15 Dodji Seketeli <dodji@redhat.com>
If a diff node is in NO_CHANGE_CATEGORY do not report it anymore
* src/abg-comparison.cc (diff::is_filtered_out): Now that we seem
to be flagging every changes to a class into a category, we do not
need to dive into reporting a diff not that is categorized as
NO_CHANGE_CATEGORY anymore. So let's have the implementation that
one would expect for this function.
2014-04-15 Dodji Seketeli <dodji@redhat.com>
Categorize changes to virt mem fncts as VIRTUAL_MEMBER_CHANGE_CATEGORY
* src/abg-comp-filter.cc (has_virtual_mem_fn_change): New static
function.
(harmful_filter): Categorize changes to virtual member functions
into VIRTUAL_MEMBER_CHANGE_CATEGORY.
* src/abg-comparison.cc
(class_diff::priv::count_filtered_changed_dm): Move this up, right
after class_diff::priv::count_filtered_subtype_changed_dm.
(SKIP_MEM_FN_IF_VIRTUALITY_DISALLOWED): New macro.
(class_diff::priv::count_filtered_{changed, inserted,
deleted}_mem_fns): Modify these to properly take member function
virtual-ness in account.
2014-04-15 Dodji Seketeli <dodji@redhat.com>
Do not hash non-virtual member functions when hashing a class
* src/abg-hash.cc (class_decl::hash::operator): Do not hash
non-virtual member functions.
2014-04-15 Dodji Seketeli <dodji@redhat.com>
Fix a missing new line in the reports
* src/abg-comparison.cc (represent(class_decl::method_decl_sptr,
ostream&)): Add a missing new line.
* tests/data/test-bidiff/test-struct1-report.txt: Adjust.
2014-04-14 Dodji Seketeli <dodji@redhat.com>
Add more pretty printing facilities
* include/abg-comparison.h (get_pretty_representation(diff*)):
Declare new function.
* include/abg-fwd.h (get_pretty_representation): Declare functions
for decl_base*, type_base*, decl_base_sptr and type_base_sptr.
* src/abg-comparison.cc (get_pretty_representation): Implement
this for diff*.
* src/abg-ir.cc (get_pretty_representation): Define
implementations for decl_base*, type_base*, decl_base_sptr and
type_base_sptr.
2014-04-14 Dodji Seketeli <dodji@redhat.com>
Don't compare non-virtual member functions in class comparison
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Use the virtual
member functions here, not the member functions in general.
(compute_diff): Consider virtual member functions only, not
non-virtual ones.
* src/abg-ir.cc (class_decl::operator==): Do not compare
non-virtual member functions. Only compare virtual member
functions.
* tests/data/test-bidiff/test-struct1-report.txt: New test input.
* tests/data/test-diff-dwarf/test0-report.txt: New test input.
* tests/data/test-diff-filter/test0-report.txt: New test input.
* tests/data/test-diff-filter/test01-report.txt: New test input.
* tests/data/test-diff-filter/test10-report.txt: New test input.
* tests/data/test-diff-filter/test11-report.txt: New test input.
* tests/data/test-diff-filter/test2-report.txt: New test input.
* tests/data/test-diff-filter/test9-report.txt: New test input.
2014-04-14 Dodji Seketeli <dodji@redhat.com>
Recognize virtual member functions better and store them appart
* include/abg-fwd.h (set_member_function_is_virtual): Declare new
function.
* include/abg-ir.h (class class_decl): Declare
set_member_function_is_virtual and member_function_is_virtual as
friends of class_decl.
(class_decl::add_member_function): Take an is_virtual flag.
(class_decl::get_num_virtual_functions): Remove.
(class_decl::get_virtual_mem_fns): New member function.
(mem_fn_context_rel::is_virtual_): New member.
(mem_fn_context_rel::mem_fn_context_rel): Adjust to initialize the
new is_virtual_ member.
(mem_fn_context_rel::is_virtual): New member functions.
* src/abg-comparison.cc (represent): Adjust.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Adjust.
* src/abg-ir.cc (member_function_is_virtual): Change this to use
mem_fn_context_rel::is_virtual.
(set_member_function_is_virtual): Define this new function.
(class_decl::priv::virtual_mem_fns_): New member to hold virtual
member functions.
(class_decl::get_virtual_mem_fns): Implement this member function.
(class_decl::get_num_virtual_functions): Remove.
(class_decl::add_member_function): Take a new is_virtual flag.
Add virtual member functions to
class_decl::priv::virtual_mem_fns_.
* src/abg-reader.cc (build_class_decl): Adjust.
2014-04-13 Dodji Seketeli <dodji@redhat.com>
Filter non-virtual member fns insertions/deletions from class changes
* include/abg-fwd.h (member_function_is_virtual): Declare new
function.
* include/abg-comparison.h
(diff_category::{NON_VIRT_MEM_FUN_CHANGE_CATEGORY,
VIRTUAL_MEMBER_CHANGE_CATEGORY}): New enumerators.
(diff_category::EVERYTHING_CATEGORY): Adjust.
(class_diff::{changed, deleted, inserted}_member_fns): Declare new
member functions.
* src/abg-comp-filter.cc (data_member_added_or_removed): Add
missing comments.
(has_non_virtual_mem_fn_change): New static predicate function.
(harmless_filter::visit): Categorize non-virtual member function
changes in a diff into NON_VIRT_MEM_FUN_CHANGE_CATEGORY.
* src/abg-comparison.cc
(TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY): New macro.
(report_mem_header): Count filtered functions for added/deleted
functions as well.
(class_diff::priv::count_filtered_changed_mem_fns): Renamed
priv::count_filtered_member_functions into this. Filter out
changes to non-virtual member functions here.
(class_diff::priv::count_filtered_{inserted, deleted}_mem_fns):
New member functions.
(class_diff::{deleted, inserted, changed}_member_fns): Define new
member functions.
(class_diff::report): Adjust count for filtered inserted/deleted
member functions. Do not report NON_VIRT_MEM_FUN_CHANGE_CATEGORY
if it's disallowed.
(class_diff::traverse): Propagate only
VIRTUAL_MEMBER_CHANGE_CATEGORY from member functions to their
enclosing class.
* src/abg-ir.cc (member_function_is_virtual): Define new
functions.
* tools/bidiff.cc (set_diff_context_from_opts): Adjust to add
NON_VIRT_MEM_FUN_CHANGE_CATEGORY into the harmless group and
VIRTUAL_MEMBER_CHANGE_CATEGORY into the harmful one.
* tests/data/test-diff-filter/test0-report.txt: New test input.
* tests/data/test-diff-filter/test10-report.txt: Likewise.
* tests/data/test-diff-filter/test10-v0.cc: Likewise.
* tests/data/test-diff-filter/test10-v0.o: Likewise.
* tests/data/test-diff-filter/test10-v1.cc: Likewise.
* tests/data/test-diff-filter/test10-v1.o: Likewise.
* tests/data/test-diff-filter/test11-report.txt: Likewise.
* tests/data/test-diff-filter/test11-v0.cc: Likewise.
* tests/data/test-diff-filter/test11-v0.o: Likewise.
* tests/data/test-diff-filter/test11-v1.cc: Likewise.
* tests/data/test-diff-filter/test11-v1.o: Likewise.
* tests/data/test-diff-filter/test2-report.txt: Likewise.
* tests/data/test-diff-filter/test9-report.txt: Likewise.
* tests/data/test-diff-filter/test9-v0.cc: Likewise.
* tests/data/test-diff-filter/test9-v0.o: Likewise.
* tests/data/test-diff-filter/test9-v1.cc: Likewise.
* tests/data/test-diff-filter/test9-v1.o: Likewise.
* tests/test-diff-filter.cc: Consume the test input above to run
more tests.
2014-04-13 Dodji Seketeli <dodji@redhat.com>
Make class_decl pimpl and harden comparison infloop prevention
* include/abg-ir.h (class_decl::{priv}): New private data member.
(class_decl::{get_is_declaration_only, set_is_declaration_only,
is_struct, get_definition_of_declaration, get_earlier_declaration,
add_base_specifier, get_base_specifiers, get_member_types,
get_data_members, get_member_functions,
get_member_function_templates, get_member_class_templates}): Move
these methods out-of-line.
(class_decl::{comparison_started_,
declaration_,is_declaration_only_, definition_of_declaration,
is_struct_, bases_, member_types_, data_members_,
member_functions_, member_function_template,
member_class_templates_}): Move these data members into the pimpl
in ...
* src/abg-ir.cc
(class_decl::priv::{declaration_,is_declaration_only_,
definition_of_declaration, is_struct_, bases_, member_types_,
data_members_, member_functions_, member_function_template,
member_class_templates_}): ... here.
(class_decl::priv::classes_being_compared_): New data member.
(class_decl::priv::priv): Initialize the data members.
(class_decl::priv::{mark_as_being_compared,
unmark_as_being_compared, comparison_started): New methods.
(class_decl::{get_is_declaration_only, set_is_declaration_only,
is_struct, get_definition_of_declaration, add_base_specifier,
get_base_specifiers, get_member_types, get_data_members,
get_member_functions, get_member_function_templates,
get_member_class_templates}): Move these out-of-line in here.
(class_decl::{class_decl, set_definition_of_declaration,
set_earlier_declaration, insert_member_type, add_member_type,
add_data_member, add_member_function,
add_member_function_template, add_member_class_template,
has_no_base_nor_member}): Adjust.
(class_decl::operator==): Harden inf-loop prevention during class
comparison using the new priv::mark/unmark_as_being_compared()
functions. Now comparison of a class really compares member
functions again. And it is *slooow*. I should probably change
this to compare only virtual member functions. But at least this
should be correct and robust for now.
* tests/data/test-diff-filter/test0-report.txt: Adjust.
* test01-report.txt: Adjust.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Remove the parent member of the diff node
* include/abg-comparison.h (diff::parent_): Remove.
(diff::diff): Adjust.
(diff::{get, set}_parent): Remove.
* src/abg-comp-filter.cc (harmless_filter::visit): Remove category
propagation to the parent.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Update the decl_base copy constructor for forgotten members
* src/abg-ir.cc (decl_base::decl_base): Copy forgotten decl_base
members hashing_started_, qualified_parent_name_, qualified_name_.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Comment fix in filtering code
* src/abg-comp-filter.cc (harmful_filter::visit): Fix comment
typos.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Put data member type size changes in SIZE_OR_OFFSET_CHANGE_CATEGORY
* src/abg-comp-filter.cc (type_size_changed): New overload for
type_base_sptr.
(data_member_type_size_changed): New predicate.
(harmful_filter::visit): Use the new predicate to categorize data
member type size changes into the SIZE_OR_OFFSET_CHANGE_CATEGORY.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Represent a removed+added data member at a given offset as changed
* include/abg-fwd.h (get_data_member_offset): Declare new overload for
decl_base_sptr.
* include/abg-comparison.h (unsigned_decl_base_sptr_map)
(unsigned_changed_type_or_decl_map): New typedefs.
* src/abg-ir.cc (get_data_member_offset): Define new overload for decl_base_sptr.
* src/abg-comparison.cc (diff_kind::subtype_change_kind): New
enumerator for a change about a type or sub-type of a member of a
structure/enum.
(report_mem_header): Handle the new enumerator above.
(class_diff::priv::{deleted_dm_by_offset_, inserted_dm_by_offset_,
changed_dm_}): New data members.
(class_diff::priv::subtype_changed_dm_): Renamed
class_diff::priv::changed_data_members_ into this.
(class_diff::priv::subtype_changed_dm): Renamed
class_diff::priv::data_member_has_changed into this. Adjust.
(class_diff::count_filtered_subtype_changed_dm): Renamed
count_filtered_data_members into this. Adjust.
(class_diff::priv::count_filtered_changed_dm): New member
function.
(class_diff::lookup_tables_empty): Adjust.
(class_diff::ensure_lookup_tables_populated): Adjust. Detect when
a data member is deleted and added back to offset N, and be
prepared to present that as a change of data member at offset N.
(class_diff::report): Adjust. Report data members of a given
offset that have changed.
* tests/data/test-diff-dwarf/test6-report.txt: New reference
report for new test input.
* tests/data/test-diff-dwarf/test6-v0.cc: Source code for new test
input binary.
* tests/data/test-diff-dwarf/test6-v0.o: New test input binary.
* tests/data/test-diff-dwarf/test6-v1.cc: Source code for new test
input binary.
* tests/data/test-diff-dwarf/test6-v1.o: New test input binary.
* tests/test-diff-dwarf.cc: Adjust to include the new test inputs above.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Unmark class_diff node as being traversed once traversal is finished
* src/abg-comparison.cc (class_diff:traverse): Unmark class_diff
node as being traversed once traversal is finished
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Do not use the parent diff node link for category propagation
* src/abg-comparison.cc (class_diff::traverse): Use the new
TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY macro to propagate
categorization from the children diff nodes to the current one for
bases, data members and member functions.
(scope_diff::traverse): Likewise, use the
TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY to propagate
categorization from the children diff nodes to the current one.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Ensure that each diff node is traversed just once
* include/abg-comparison.cc (pointer_map): New typedef.
(diff_context::{has_diff_for}): New overload for diff*.
(diff_context::{diff_has_been_traversed, mark_diff_as_traversed,
forget_traversed_diffs}): Declare new methods.
* src/abg-comparison.cc (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
(ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Define new macros.
(diff_context::priv::traversed_diff_nodes_): New data member.
(diff_context::has_diff_for): New overload for diff*
(diff_context::{diff_has_been_traversed, mark_diff_as_traversed,
forget_traversed_diffs}): Define new member functions.
(diff_context::maybe_apply_filters): Forget the traversed diffs
before applying a filter.
({distinct_diff, var_diff, pointer_diff, reference_diff,
qualified_type_diff, enum_diff, class_diff, base_diff, scope_diff,
function_decl_diff, type_decl_diff, typedef_diff,
translation_unit_diff}::traverse): Ensure that the diff node is
traversed only once.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Factorize diff sub-tree traversal and category propagation code
* src/abg-comparison.cc
(TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
(TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY): New macros.
({distinct_diff, pointer_diff, reference_diff,
qualified_type_diff, enum_diff, base_diff, function_decl_diff,
typedef_diff}::traverse): Use the new macro above in lieu of the
duplicated sub-tree traversal code in there.
2014-04-11 Dodji Seketeli <dodji@redhat.com>
Style fixes in the diff nodes traversing code
* src/abg-comparison.cc (TRY_{PRE, PRO}_VISIT, TRY_{PRE,
PRO}_VISIT_CLASS_DIFF, ): Add a white space.
2014-04-10 Dodji Seketeli <dodji@redhat.com>
Supporting reporting data member name change
* src/abg-comparison.cc (represent): Support reporting data member
name change.
2014-04-10 Dodji Seketeli <dodji@redhat.com>
Consider added/removed data members as changing size or offset
* src/abg-comp-filter.cc (data_member_added_or_removed): New
static function.
(harmless_filter::visit): Re-organize logic. Categorize data
member addition/removal into SIZE_OR_OFFSET_CHANGE_CATEGORY.
2014-04-10 Dodji Seketeli <dodji@redhat.com>
Add missing comment
* src/abg-ir.cc (non_type_tparameter::get_hash): Add missing api doc.
2014-04-09 Dodji Seketeli <dodji@redhat.com>
Fix and add missing hashing through the virtual decl_base::get_hash
* include/abg-ir.h (struct {scope_decl, non_type_tparameter,
type_composition, class_decl}::hash): Declare hashers.
({scope_decl, var_decl, non_type_tparameter, type_composition,
class_decl}::get_hash): Provide new overloads of the get_hash.
* src/abg-hash.cc ({type_decl, scope_type_decl,
qualified_type_def, pointer_type_def, reference_type_def,
enum_type_decl, typedef_decl, var_decl,
function_decl}::hash::operator()): If the hash is being
calculated, do not use the not-yet fully calculated hash value.
Rather, calculate the hash, cache it and return the value.
({class_decl, non_type_tparameter}::hash::operator()): Moved the
{class_decl, non_type_tparameter}::hash declaration out of here
and stick it in include/abg-ir.h. Keep the definition of the
hashing operators here though.
(type_composition::hash::operator()): New operator definition.
* src/abg-ir.cc ({scope_decl, var_decl, class_decl,
non_type_tparameter, type_composition}::get_hash): Define new
virtual overload.
2014-04-08 Dodji Seketeli <dodji@redhat.com>
Fix mis-hashing of base specifiers and function_decl during comparison
* include/abg-ir.h (function_decl::get_hash): Declare new virtual
overload.
* src/abg-hash.cc (class_decl::base_spec::hash::operator()):
Properly hash the base specifier so that it doesn't collide with
hashing a class.
* src/abg-ir.cc (decl_base::get_hash): Abort if we detect a
missing overload for this;
(function_decl::get_hash() const): Implement this missing
overload, allowing using the virtual decl_base::get_hash for
function_decl.
2014-04-08 Dodji Seketeli <dodji@redhat.com>
Properly place opening quote and add missing closing quote in report
* src/abg-comparison.cc (corpus_diff::report): Move the [{A,D}]
marker before the opening quote. And add a closing quote.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test01-report.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
2014-04-08 Dodji Seketeli <dodji@redhat.com>
Drive-by indentation fix
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Fix
indentation.
2014-04-08 Dodji Seketeli <dodji@redhat.com>
Drop ABI artifacts that are local to a function
* src/abg-dwarf-reader.cc (get_scope_for_die): If the parent die
is DW_TAG_subprogram then just drop the whole thing on the floor.
(build_ir_node_from_die): When the scope is NULL, just drop the
whole thing on the floor.
2014-04-08 Dodji Seketeli <dodji@redhat.com>
Fix the static data member recognition hack
* src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
When trying to recognize the global var_decl as being definition
variables for static data members, lookup the declaration for the
data member in the relevant class. If found, then just flag the
var_decl for the data member as being static; no need to add a
var_decl as data member in that case, that would duplicate the
data member.
2014-04-08 Dodji Seketeli <dodji@redhat.com>
Fix looking up a node inside a class
* src/abg-ir.cc (lookup_node_in_scope): Do not forget to actually
look at the class members. Sigh.
2014-04-07 Dodji Seketeli <dodji@redhat.com>
Work around old dwarf producers forgetting mangled names for functions
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): If lookup
using mangled name for a deleted function yields nada, try the
lookup with the pretty representation for the function.
2014-04-07 Dodji Seketeli <dodji@redhat.com>
Make type_base::get_{size,alignment}_in_bits virtual
* include/abg-ir.h (type_base::get_{size,alignment}_in_bits): Make
this virtual.
(typedef_decl::get_{size,alignment}_in_bits): Add new member
functions. Get the size,alignment from the underlying type and
update the current size/alignment if they differ. Keep in mind
that the size of an underlying class_decl can change over its
lifetime, given how the dwarf reader reads the type information,
i.e, there can be a DIE for a class type with no size information
that will lead to the creation of a class_decl with size zero.
Later during the DWARF reading process, another DIE will
supplement the type information, adding size information to that
class_decl. In between, a typedef_decl might have been created
with the first version of the class_decl that has a zero size. I
guess this should be extended to the other type constructs that
have an underlying type (qualified types, references and pointers).
2014-04-07 Dodji Seketeli <dodji@redhat.com>
Look through typedefs when setting SIZE_OR_OFFSET_CHANGE_CATEGORY
* include/abg-fwd.h (is_class_type): Declare new functions.
* src/abg-comp-filter.cc (harmful_filter::visit): Use the above to
convert a type into a class.
* src/abg-ir.cc (is_class_type): Define the new function.
2014-04-06 Dodji Seketeli <dodji@redhat.com>
Add a new DECL_NAME_CHANGE_CATEGORY change category
* include/abg-comparison.h (enum
diff_category::DECL_NAME_CHANGE_CATEGORY): New enumerator.
* src/abg-comparison.cc (report_name_size_and_alignment_changes)
({enum, typedef}_diff::report): Adjust to avoid emitting name
change report if the DECL_NAME_CHANGE_CATEGORY category of change
is currently disallowed.
* abg-comp-filter.cc (decl_name_changed): New static function.
(harmless_filter::visit): Detect that the decl name changed and
put the current diff node (and its parents) into the
DECL_NAME_CHANGE_CATEGORY category.
* tools/bidiff.cc (set_diff_context_from_opts): Set the new
DECL_NAME_CHANGE_CATEGORY category into the harmless_changes group
of categories.
* tests/data/test-diff-filter/test6-report.txt: New test input file.
* tests/data/test-diff-filter/test6-v0.cc: Likewise.
* tests/data/test-diff-filter/test6-v0.o: Likewise.
* tests/data/test-diff-filter/test6-v1.cc: Likewise.
* tests/data/test-diff-filter/test6-v1.o: Likewise.
* tests/data/test-diff-filter/test7-report.txt: Likewise.
* tests/data/test-diff-filter/test7-v0.cc: Likewise.
* tests/data/test-diff-filter/test7-v0.o: Likewise.
* tests/data/test-diff-filter/test7-v1.cc: Likewise.
* tests/data/test-diff-filter/test7-v1.o: Likewise.
* tests/test-diff-filter.cc: Take the new inputs above to run new tests.
* tests/Makefile.am: Add the new files above to the distribution.
2014-04-05 Dodji Seketeli <dodji@redhat.com>
Emit qualified name for typedefs
* src/abg-comparison.cc (typedef_diff::report): Emit qualified
names for typedefs in diff reports about typedef name changes.
2014-04-05 Dodji Seketeli <dodji@redhat.com>
Fix indentation in distinct type diff report
* src/abg-comparison.cc (distinct_diff::report): Do not forget to
change line.
2014-04-05 Dodji Seketeli <dodji@redhat.com>
Really compare return types for function types
* src/abg-ir.cc (compare_function_types): Compare return types,
unless this is a method and the return type is the same type as
the containing class type.
* tests/data/test-diff-dwarf/test5-report.txt: Reference report
for the comparison of the two input binaries below.
* tests/data/test-diff-dwarf/test5-v0.cc: Source code for the
input binary below.
* tests/data/test-diff-dwarf/test5-v0.o: Test input binary.
* tests/data/test-diff-dwarf/test5-v1.cc: Source code for the
input binary below.
* tests/data/test-diff-dwarf/test5-v1.o: Test input binary.
2014-04-05 Dodji Seketeli <dodji@redhat.com>
Add missing tests for previous commits
* tests/data/test-diff-dwarf/test4-report.txt: Adjust.
* tests/test-diff-dwarf.cc: Run tests for
data/test-diff-dwarf/test3-report.txt" and
data/test-diff-dwarf/test4-report.txt.
2014-04-05 Dodji Seketeli <dodji@redhat.com>
Categorize through compatible distinct type diffs
* src/abg-comparison.cc (report_size_and_alignment_changes): Split
this static function out of ...
(report_name_size_and_alignment_changes): ... this one.
(distinct_diff::report): If the typedef-stripped variants of the
diff subjects are of the same kind, display their diff.
Otherwise, tell explicitly is the distinct type diff involves a
type size change.
(distinct_diff::traverse): If the typedef-stripped variants of the
diff subjects are of the same kind, traverse that underlying diff
sub-tree and propagate the categorizing possibly resulting from
that traversal.
* tests/data/test-diff-dwarf/test4-v0.o: New test input binary.
* tests/data/test-diff-dwarf/test4-v0.cc: Source code for the
input binary above.
* tests/data/test-diff-dwarf/test4-v1.o: New test input binary.
* tests/data/test-diff-dwarf/test4-v1.cc: Source code for the
input binary above.
* tests/data/test-diff-dwarf/test4-report.txt: Reference report
for the difference between the two binaries above.
* tests/data/test-diff-filter/test5-v0.o: New test input binary.
* tests/data/test-diff-filter/test5-v0.cc: Source code for the
input binary above.
* tests/data/test-diff-filter/test5-v1.o: New test input binary.
* tests/data/test-diff-filter/test5-v1.cc: Source code for the
input binary above.
* tests/data/test-diff-filter/test5-report.txt: Reference report
for the difference between the two binaries above.
* tests/test-diff-filter.cc: Adjust to produce a filtered diff for
the two input binaries above.
* tests/Makefile.am: Adjust to add missing test files to the
distribution.
2014-04-04 Dodji Seketeli <dodji@redhat.com>
Slight run-by fixes
* src/abg-comparison.cc
(corpus_diff::priv::apply_filters_and_compute_diff_stats)
(corpus_diff::report): Use compute_diff for types which it has an
overload rather than going through the compute_diff_for_decls that
would use dynamic casting.
2014-04-04 Dodji Seketeli <dodji@redhat.com>
Do not hook type diff nodes to a parent
* abg/comparison.cc (var_diff::var_diff): Do not set parent node
for the type diff of the var_diff.
(var_diff::traverse): Handle category propagation from the
type diff node to the var_diff node.
(pointer_diff::underlying_type_diff)
(reference_diff::underlying_type_diff)
(qualified_type_diff::underlying_type_diff, enum_diff::enum_diff)
(base_diff::get_underlying_class_diff)
(typedef_diff::underlying_type_diff): Do not set the parent node
here.
({pointer_diff, reference_diff, qualified_type, enum_diff,
class_diff, base_diff, function_decl_diff,
typedef_diff}::traverse): Handle category propagation here.
* tests/data/test-diff-filter/test4-v0.o: New input binary.
* tests/data/test-diff-filter/test4-v0.cc: Source code for the
input binary above.
* tests/data/test-diff-filter/test4-v1.o: New input binary.
* tests/data/test-diff-filter/test4-v1.cc: Source code for the
input binary above.
* tests/data/test-diff-filter/test4-report.txt: Reference diff
report for the input binaries above.
* tests/test-diff-filter.cc:: Run bidiff --no-harmless on the
binaries above.
2014-04-04 Dodji Seketeli <dodji@redhat.com>
Fix off-by one comparison bug in comparing function parameters
* src/abg-comparison.cc
(function_decl_diff::ensure_lookup_tables_populated): Function
parameters that are diff'ed start at the first non-implicit
parameter, not at the first parameter. Oops.
* tests/data/test-diff-dwarf/test3-v0.o: New test input binary.
* tests/data/test-diff-dwarf/test3-v0.cc: Source code for the
binary above.
* tests/data/test-diff-dwarf/test3-v1.o: New test input binary.
* tests/data/test-diff-dwarf/test3-v1.cc: Source code for the
binary above.
* tests/data/test-diff-dwarf/test3-report.txt: Reference report
for the diff of the new test inputs.
* tests/test-diff-dwarf.cc: Use the test inputs above to run new
tests.
2014-04-03 Dodji Seketeli <dodji@redhat.com>
Do not forget parm sub-type changes as opposed to parm changes
* src/abg-comparison.cc
(function_decl_diff::ensure_lookup_tables_populated): A parm
change is valid only when the added parm has a different name from
the removed parm. Both have the same index, of course. In that
case, do not try to remove the corresponding parm sub-type change.
* tests/data/test-bidiff/test-enum0-report.txt: Adjust.
* tests/data/test-bidiff/test-enum1-report.txt: Adjust.
* tests/data/test-bidiff/test-qual-type0-report.txt: Adjust.
* tests/data/test-bidiff/test-struct0-report.txt: Adjust.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
* tests/data/test-diff-dwarf/test1-report.txt: Adjust.
* tests/data/test-diff-filter/test0-report.txt: Adjust.
* tests/data/test-diff-filter/test01-report.txt: Adjust.
* tests/data/test-diff-filter/test1-report.txt: Adjust.
* tests/data/test-diff-filter/test2-report.txt: Adjust.
* tests/data/test-diff-filter/test3-report.txt: Adjust.
2014-04-03 Dodji Seketeli <dodji@redhat.com>
Remove useless white space
* src/abg-ir.cc (look_through_decl_only_class): Remove useless
white space.
2014-04-02 Dodji Seketeli <dodji@redhat.com>
Use mangled name for decl comparison when it's present
* src/abg-ir.cc (decl_base::operator==(const decl_base& other)
const): Use the mangled name of the decl in priority.
* src/abg-hash.cc (struct decl_base::hash::operator()): Likewise.
* src/abg-comparison.cc (function_decl_diff::report): Do not
report a function name change if it doesn't involve a mangled name
change. This might change when we start dealing with templates.
2014-04-02 Dodji Seketeli <dodji@redhat.com>
A change involving a decl-only class is not SIZE_OR_OFFSET_CHANGE_CATEGORY
* src/abg-comp-filter.cc (harmful_filter::visit): If a size change
involves a decl-only class, it certainly shouldn't trigger putting
the sub-tree into the SIZE_OR_OFFSET_CHANGE_CATEGORY category.
2014-04-02 Dodji Seketeli <dodji@redhat.com>
Fix heuristics to detect function static-ness for DWARF < 3
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Make
the heuristics work for functions with no parameters.
2014-04-02 Dodji Seketeli <dodji@redhat.com>
Avoid emitting local filtered-out changes in more spots
* src/abg-comparison.cc (maybe_report_diff_for_member): Take the
diff_context in parameter. Use that to check if local changes of
category ACCESS_CHANGE_CATEGORY are filtered-out and do not report
the change in that case.
({var_diff, enum_diff, class_diff, base_diff,
function_decl_diff}::report): Adjust.
2014-04-02 Dodji Seketeli <dodji@redhat.com>
Add a COMPATIBLE_TYPE_CHANGE_CATEGORY to bidiff --no-harmless
* include/abg-comparison.h
(diff_category::COMPATIBLE_TYPE_CHANGE_CATEGORY): New enumerator.
(operator|=(diff_category&, diff_category)): New declaration.
* include/abg-fwd.h (is_typedef, strip_typedef)
(types_are_compatible): New declarations.
* include/abg-ir.h (operator==(const decl_base_sptr, const
decl_base_sptr)): Added the consts here.
(operator==(const type_base_sptr, const type_base_sptr)): New
declaration.
* src/abg-comp-filter.cc (is_compatible_change): New static
function.
(harmless_filter::visit): Detect compatible changes and add the
sub-tree into the new COMPATIBLE_TYPE_CHANGE_CATEGORY if
applicable. Cleanup the logic.
* src/abg-comparison.cc (operator|=(diff_category&,
diff_category)): Define new function.
(operator==(const decl_base_sptr l, const decl_base_sptr r)): Add
consts.
(operator==(const type_base_sptr l, const type_base_sptr r)):
Define new operator.
(is_typedef, strip_typedef, types_are_compatible): New function
definitions.
* tests/data/test-diff-filter/test3-report.txt: New test report
reference.
* tests/data/test-diff-filter/test3-v0.cc: Source code for new
test input.
* tests/data/test-diff-filter/test3-v0.o: New test input.
* tests/data/test-diff-filter/test3-v1.cc: Source code for new
test input.
* tests/data/test-diff-filter/test3-v1.o: New test input.
* tests/test-diff-filter.cc: Adjust to consume the new tests
inputs above.
* tools/bidiff.cc: Add the new COMPATIBLE_TYPE_CHANGE_CATEGORY
into the --harmless group.
2014-04-01 Dodji Seketeli <dodji@redhat.com>
Don't emit local filtered-out changes
* src/abg-comparison.cc (represent): For var_decl, do not emit
filtered-out local size/offset/access changes.
(report_name_size_and_alignment_changes): Take the diff context.
Do not report filtered-out local size/offset changes.
({var_diff, enum_diff, class_diff, type_decl_diff}::report):
Adjust.
* test0-report.txt: Adjust.
* test01-report.txt: New reference report for the same inputs
test0-v{1,0}.o, but called without the --no-harmless command line.
* tests/data/test-diff-filter/test2-v0.cc: Source code for new test input.
* tests/data/test-diff-filter/test2-v1.cc: Likewise.
* tests/data/test-diff-filter/test2-v0.o: New test input.
* tests/data/test-diff-filter/test2-v1.o: Likewise.
* tests/data/test-diff-filter/test2-report.txt: Reference report
for new test input.
* tests/test-diff-filter.cc: Consume the test inputs above.
* tests/Makefile.am: Add the new test inputs above to the
distribution.
2014-04-01 Dodji Seketeli <dodji@redhat.com>
Compact & intuitive reporting for changed function parameters
* include/abg-comparison.h (unsigned_changed_parm_map)
(unsigned_parm_map): New typedefs.
* src/abg-comparison.cc
(function_decl_diff::subtype_changed_parms): Renamed this from
changed_parms.
(function_decl_diff::priv::subtype_changed_parms_}): Renamed this
from changed_parms_;
(function_decl_diff::priv::{deleted_parms_by_id_,
added_parms_by_id_, changed_parms_by_id_}): New members.
(function_decl_diff::ensure_lookup_tables_populated): Update the
new priv::changed_parms_by_id_ member to contain the parameters
that got changed, as opposed to the subtype_changed_parms_ member
that contain parameters that got a sub-type change. The other
priv::*_by_id_ members are helpers for this. Update them too.
(function_decl_diff::subtype_changed_parms): Renamed this from
::changed_parms.
(function_decl_diff::report): Report separately about parameters
having a sub-type change, and parameters that got changed. Note
that in both cases, the change is necessarily to a compatible
type.
* data/test-diff-dwarf/test2-v0.cc: New test file.
* data/test-diff-dwarf/test2-v0.o: Likewise.
* data/test-diff-dwarf/test2-v1.cc: Likewise.
* data/test-diff-dwarf/test2-v1.o: Likewise.
* data/test-diff-dwarf/test2-report.txt: Likewise.
* tests/Makefile.am: Add the new test files above to the
distribution.
* tests/test-diff-dwarf.cc: Consume the input files above to
actually perform a regression test.
2014-03-31 Dodji Seketeli <dodji@redhat.com>
Fix thinko class_diff traversing.
* src/abg-comparison.cc (class_diff::traverse): Fix thinking in
introduced by commit "6709478 Fix infinite loop when traversing
classes and their members"
* tests/data/test-diff-filter/test1-v{0,1}.o: New test binary input files.
* tests/data/test-diff-filter/test1-v{0,1}.cc: Source code for the
above.
* tests/data/test-diff-filter/test1-report.txt: Reference report
for the diffing of the two binary input files above.
* tests/test-diff-filter.cc: Make the test run on the new input above.
* tests/Makefile.am: Add the new material to the distribution.
2014-03-31 Dodji Seketeli <dodji@redhat.com>
Add forgotten test output adjustment
* tests/data/test-diff-filter/test0-report.txt: Adjust for the
commit "a8d5284 Fix diff report indentation issue"
* tests/data/test-diff-dwarf/test{0,1}-report.txt: Likewise.
2014-03-31 Dodji Seketeli <dodji@redhat.com>
Add forgotten source file for binary test input
* tests/data/test-diff-dwarf/test1-v0.cc: New file.
* tests/data/test-diff-dwarf/test1-v1.cc: Likewise.
2014-03-31 Dodji Seketeli <dodji@redhat.com>
Fix diff report indentation issue
* abg-comparison.cc (corpus_diff::report): Indent the details of
function changes.
2014-03-31 Dodji Seketeli <dodji@redhat.com>
Fix infinite loop when traversing classes and their members
* src/abg-comparison.cc (TRY_{PRE,POST}_VISIT_CLASS_DIFF): New
macros.
(class_diff::priv::traversing_): New flag.
(class_diff::priv::priv): New constructor to initialize the new
flag above.
(class_diff::traversing): Do not traverse the diff again if it's
being traversed already.
2014-03-31 Dodji Seketeli <dodji@redhat.com>
Fix access_changed and data_member_offset_changed predicates
* src/abg-comp-filter.cc (access_changed)
(data_member_offset_changed): Fix detection of membership.
2014-03-29 Dodji Seketeli <dodji@redhat.com>
Take filtering in account in diff stats & better categorizing
* include/abg-comparison.h
(diff_category::ACCESS_CHANGE_CATEGORY): Renamed
ACCESS_CHANGED_CATEGORY into this.
(diff_category::SIZE_OR_OFFSET_CHANGE_CATEGORY): Renamed
SIZE_CHANGED_CATEGORY into this. Changed its semantics to
incorporate offset changes as well.
* src/abg-comparison.cc (struct noop_deleter): Move this up.
(represent): Do not report filtered out data members.
(report_mem_header): Add a new num_filtered parameter to take
filtered-out members in account in members report headers.
Adjust.
(class_diff::priv::{count_filtered_bases,
count_filtered_data_members, count_filtered_member_functions}):
New member functions. When a member is filtered, do not report
it all.
({enum_diff, class_diff}::report): Adjust. Take filtered members
into account in headers.
(corpus_diff::priv::apply_filters_and_compute_diff_stats): New
member function.
(corpus_diff::priv::emit_diff_stats): Renamed
emit_corpus_diff_stats into this. Change it to take the stats in
parameter.
(corpus_diff::report): Adjust to re-use the above. Filter
varibles as well. Take the filtered functions & variables in
account in the stats. Do not report filtered-out functions &
variables at all.
* src/abg-comp-filter.cc (type_size_changed, access_changed)
(data_member_offset_changed): New predicates.
({harmless, harmful}_filter::visit): Adjust to use the new
predicates above. Update the harmful variant for the new
SIZE_OR_OFFSET_CHANGE_CATEGORY category.
* tools/bidiff.cc (set_diff_context_from_opts): Adjust for the
categories name changes.
* tests/data/test-diff-filter/test0-report.txt: New test input.
* tests/data/test-diff-filter/test0-v0.cc: Likewise.
* tests/data/test-diff-filter/test0-v0.o: Likewise.
* tests/data/test-diff-filter/test0-v1.cc: Likewise.
* tests/data/test-diff-filter/test0-v1.o: Likewise.
* tests/test-diff-filter.cc: New test harness.
* tests/Makefile.am: Add the new test files above to the
distribution.
2014-03-29 Dodji Seketeli <dodji@redhat.com>
Fix var_diff length determination
* src/abg-comparison.cc (var_diff::length): Just compare the two
diff subjects.
2014-03-29 Dodji Seketeli <dodji@redhat.com>
Fix typos in the test-diff-dwarf.cc source code
* tests/test-diff-dwarf.cc: Fix various typos.
2014-03-27 Dodji Seketeli <dodji@redhat.com>
Initial implementation of diff tree node filtering
* include/abg-comp-filter.h: New file.
* include/Makefile.am: Add the new include/abg-comp-filter.h to
the source distribution.
* include/abg-comparison.h (enum visiting_kind, diff_category): New enums.
(operator|): Declare new operator declaration for the new
visiting_kind enum.
(operator{|,^,&,~}): Declare new operator decl for the new
diff_category enum.
(diff_context::{get_allowed_category, set_allowed_category,
switch_categories_on, switch_categories_off, diff_filters,
add_diff_filter, maybe_apply_filters}): Declare new member functions.
(diff::{parent_, category_}): New members.
(diff::diff): Adjust.
(diff::{get_parent, set_parent, get_category, add_to_category,
is_filtered_out, to_be_reported}): New members.
(diff_node_visitor::{get_visiting_kind, set_visiting_kind}): New
members.
(diff_node_visitor::visit): Add a new flag to saying if the
visitor is being called in post or pre children traversing mode.
* src/abg-comparison.cc (operator|): Declare new operator
declaration for the new visiting_kind enum.
(operator{|,^,&,~}): Declare new operator decl for the new
diff_category enum.
(diff_context::priv::{allowed_category_, filters_}): New members.
(diff_context::diff_context): Add all known filters.
(diff_context::{get_allowed_category, set_allowed_category,
switch_categories_on, switch_categories_off, diff_filters,
add_diff_filter, maybe_apply_filters}): Define new member
functions.
(diff::{is_filtered_out, to_be_reported}): Define new members.
(*::report): Use the new diff::to_be_reported function.
(*::traverse): Adjust for pre/post visiting.
(var_diff::var_diff): Chain the type diff node to its parent.
({pointer_diff, reference_diff, qualified_type_diff,
typedef_diff}::underlying_type_diff): Chain the underlying type
diff node to its parent.
(enum_diff::enum_diff): Likewise.
(base_diff::underlying_class_diff): Likewise.
({class_diff, corpus_diff}::report): Do not report changed
(member) functions that have been filtered out. Rather report
that they have been filtered out.
({function_decl_diff, class_diff}::traverse): Chain underlying
type diff nodes to their parent.
(diff_node_visitor::visit): Add a new flag to saying if the
visitor is being called in post or pre children traversing mode.
Make sure to call the default diff::visit overload.
* src/abg-comp-filter.cc: New file.
* src/Makefile.am: Add the new abg-comp-filter.cc to the source
distribution.
* tools/bidiff.cc (options::show_harm{ful,less}_changes): New
members.
(display_usage): Add usage strings for --no-harmless and
--no-harmful options.
(parse_command_line): Parse --no-harmless and --no-harmful command
line options.
(set_diff_context_from_opts): Populate the diff context
accordingly.
2014-03-26 Dodji Seketeli <dodji@redhat.com>
Add missing headers double inclusion guards
* include/abg-comparison.h: Add a missing double inclusion guard.
* include/abg-diff-utils.h: Likewise.
2014-03-26 Dodji Seketeli <dodji@redhat.com>
Add a missing apostrophe to access reporting
* src/abg-comparison.cc (represent): For member var_decls, add a
missing apostrophe after the access.
* tests/data/test-diff-dwarf/test0-report.txt: Update test report.
2014-03-21 Dodji Seketeli <dodji@redhat.com>
Fix diff emptiness detection for function_decl_diff nodes
* src/abg-comparison.cc (function_decl_diff::length): Just compare
the two functions here, damit.
* tests/data/test-diff-dwarf/test0-report.txt: Adjust.
2014-03-21 Dodji Seketeli <dodji@redhat.com>
Fixlets in the bidiff regression testing harness
* tests/test-bidiff.cc (main): Fix a typo. Fix the path to the
output path.
2014-03-21 Dodji Seketeli <dodji@redhat.com>
Initial regression test for dwarf diffing
* tests/test-diff-dwarf.cc: New dwarf diffing regression test
harness.
* tests/data/test-diff-dwarf/test0-report.txt: New test input.
* tests/data/test-diff-dwarf/test0-v0.cc: Likewise.
* tests/data/test-diff-dwarf/test0-v0.o: Likewise.
* tests/data/test-diff-dwarf/test0-v1.cc: Likewise.
* tests/data/test-diff-dwarf/test0-v1.o: Likewise.
* tests/Makefile.am: Add the new test inputs from
tests/test-diff-dwarf.cc and tests/data/test-diff-dwarf/* to
the build system.
2014-03-21 Dodji Seketeli <dodji@redhat.com>
Rename test-walker.cc into test-ir-walker.cc
* tests/test-ir-walker.cc: Renamed test-walker.cc into this.
* tests/Makefile.am: Adjust. The generated binary is now testirwalker.
2014-03-21 Dodji Seketeli <dodji@redhat.com>
Initial diff tree traversal infrastructure
* include/abg-comparison.h (struct diff_traversable_base, struct
diff_node_visitor): New type.
(class diff): Extends the new diff_traversable_base.
({diff, distinct_diff, var_diff, pointer_diff, reference_diff,
qualified_type_diff, enum_diff, class_diff, base_diff, scope_diff,
function_decl_diff, type_decl_diff, typedef_diff,
translation_unit_diff, corpus_diff}::traverse): New methods.
(function_decl_diff::return_type_diff): New accessor. Renamed
return_diff into this.
(translation_unit_diff::{first, second}_translation_unit): New
accessors.
(corpus_diff::{deleted, added, changed}_functions): New accessors.
* src/abg-comparison.cc ({distinct_diff, var_diff,
pointer_diff, reference_diff, qualified_type_diff, enum_diff,
class_diff, base_diff, scope_diff, function_decl_diff,
type_decl_diff, typedef_diff, translation_unit_diff,
corpus_diff}::traverse): New function implementations.
(maybe_report_diff_for_member): Renamed
maybe_report_diff_for_class_members into this.
(var_diff::report): Adjust.
(struct translation_unit_diff::priv): New private type.
(translation_unit_diff::translation_unit_diff): Instantiate the
new priv_ member.
(translation_unit_diff::{first,second}_translation_unit): New
accessors.
(corpus_diff::{deleted, added, changed}_functions): New function
implementations.
(diff_node_visitor::visit): New function implementations.
2014-03-19 Dodji Seketeli <dodji@redhat.com>
Make tree walking preemptive
* include/abg-traverse.h (traversable_base::traversable): Change
the signature of this to return a boolean.
* include/abg-ir.h (ir_traversable_base::traverse): Change the
signature of this to return a boolean.
(*::traverse): Adjust.
(ir_node_visitor::visit): Change the signature of this to return a
boolean.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Adjust.
* src/abg-ir.cc (::traverse): Adjust.
* tests/test-walker.cc (name_printing_visitor::visit): Adjust.
2014-03-26 Jonathan Wakely <jwakely@redhat.com>
Fix comment typos
* include/abg-diff-utils.h (compute_diff): Fix typo in apidoc
comment.
2014-03-24 Dodji Seketeli <dodji@redhat.com>
Follow DW_AT_abstract_origin and add missing mangled name
* src/abg-dwarf-reader.cc (build_function_decl): Change signature
to take function_decl to which one shall add properties that got
added by subsequent DIEs later.
(build_class_type_and_add_to_ir): Adjust.
(build_function_decl): Allow adding new properties to an existing
function_decl. Add the mangled name in particular.
* tests/data/test-read-dwarf/test1.abi: Update test.
2014-03-20 Dodji Seketeli <dodji@redhat.com>
Fix destructor naming.
* src/abg-ir.cc (function_decl::get_pretty_representation): In
DWARF at least, the destructor function name already contains the
'~'. No need to add it.
2014-03-20 Dodji Seketeli <dodji@redhat.com>
Better static function determination heuristic
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Better
heuristic.
2014-03-20 Dodji Seketeli <dodji@redhat.com>
Dynamically wire class_decl::base_spec hashing
* include/abg-ir.h (decl_base::get_hash): Make this virtual.
(class_decl::base_spec::get_hash): Declare a new virtual overload.
* src/abg-ir.cc (class_decl::base_spec::get_hash): Define.
2014-03-20 Dodji Seketeli <dodji@redhat.com>
Slight indentation fix in the diff report
* src/abg-comparison.cc (class_diff::report): Indentation fix for
member function changes report.
2014-03-20 Dodji Seketeli <dodji@redhat.com>
Get rid of class_decl::member_function
* include/abg-fwd.h (is_member_function)
(get_member_function_is_{ctor,dtor,const})
(get_member_function_vtable_offset): New function declarations.
* include/abg-ir.h (class_decl::member_function): Remove.
(class_decl::member_functions): Adjust. This is now just a vector
of method_decl_sptr.
(class_decl::add_member_function): Remove the overload taking
class_decl::member_function. Adjust the other overload to take a
method_decl_sptr.
(class mem_fn_context_rel): New class.
(class_decl::method_decl::set_scope): New virtual overload.
(class_decl::member_function): Remove.
(operator==): Remove the overload taking a
class_decl::member_function.
(class_decl::member_function::hash): Remove.
(ir_node_visitor::visit): Remove the overload taking a
class_decl::member_function.
* include/abg-comparison.h (changed_member_function_sptr)
(string_member_function_sptr_map): Adjust.
* src/abg-comparison.cc (represent): Adjust the overload taking a
class_decl::member_function to take a class_decl::method_decl.
(class_diff::{report, ensure_lookup_tables_populated}): Adjust.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Remove the
overload taking a class_decl::member_function.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Adjust.
* src/abg-hash.cc (decl_base::hash::operator()): Use the fully
qualified name of the decl in the hash, to increase the likelihood
of avoiding hash collisions.
(method_type::hash::operator()): Likewise.
(function_decl::hash::operator()): Take member functions in
account.
(class_decl::member_function::hash::operator()): Remove.
(class_decl::hash::operator()): Adjust.
(type_base::dynamic_hash::operator()): Adjust.
* src/abg-ir.cc (is_member_function)
(get_member_function_is_{ctor,dtor,const})
(get_member_function_vtable_offset): New function definitions.
(function_decl::get_pretty_representation): Adjust.
(function_decl::operator): Take member functions in account here.
(class_decl::insert_member_decl): Adjust.
(mem_fn_context_rel::~mem_fn_context_rel): New definition.
(class_decl::member_function::*): Remove.
(class_decl::method_decl::set_scope): New definition.
(class_decl::get_num_virtual_functions): Adjust.
(class_decl::add_member_function): Remove overload taking a
class_decl::member_function. Define a new overload taking a
class_decl::method_decl.
(ir_node_visitor::visit): Remove the overload taking a
class_decl::member_function.
* src/abg-reader.cc (build_class_decl): Adjust.
* src/abg-writer.cc (write_voffset, write_class_decl): Adjust.
2014-03-19 Dodji Seketeli <dodji@redhat.com>
Get rid of class_decl::data_member
* include/abg-fwd.h (has_scope): Delete the overloads for
type_base.
(get_member_is_static): Add an overload for decl_base*.
({is,get,set}_data_member,{get_,set}_data_member_is_laid_out)
({get,set}_data_member_offset): New access declarations.
* include/abg-ir.h (class context_rel): Move up.
(decl_base::set_context_rel): New definition.
(class dm_context_rel): New type.
(decl_base::hash_as_member): Remove.
(var_decl::set_scope): Declare new virtual member.
(class_decl::data_member): Remove.
(ir_node_visitor::visit): Remove the overload for
class_decl::data_member.
(represent_data_member): Remove the represent overload for
class_decl::data_member into this. Make it take a var_decl.
(represent): Change the overload that takes two
class_decl::data_member take two var_decl. And adjust it.
(class_diff::report): Adjust.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Remove the
overload that takes a class_decl::data_member*. Adjust the
overload that takes a var_decl to recognize (static) data members.
* src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir)
(build_class_type_and_add_to_ir, build_ir_node_from_die):
Adjust.
* src/abg-hash.cc (var_decl::hash::operator()): Adjust.
(class_decl::data_member::hash::operator()): Remove.
(decl_base::hash::operator()): Take the context relationship in
account here.
(decl_base::hash_as_member::operator()): Remove.
({enum_type_decl,typedef_decl}::hash::operator()): Adjust.
(class_decl::member_function::hash::operator()): Adjust.
(type_base::dynamic_hash::operator()): Adjust.
* src/abg-ir.cc (dm_context_rel::~dm_context_rel): New definition.
(has_scope): Remove overload for type_base.
(get_member_is_static): New overload for decl_base*.
(is_data_member): New function definition.
({get,set}_data_member_{offset,is_laid_out}): Define new
accessors.
(var_decl::set_scope): Define new member function. Make this set
a dm_context_rel as the context relationship.
(var_decl::operator==): Adjust to take in account the new data
member relationship.
(class_decl::class_decl): Adjust.
(class_decl::insert_member_decl): Adjust.
(class_decl::add_data_member): Remove the overload for
class_decl::data_member.
(class_decl::add_data_member): Adjust the overload for var_decl.
(operator==): Remove overload for class_decl::data_member*.
(class_decl::data_member::operator==): Likewise.
(ir_node_visitor::visit): Remove overload for
class_decl::data_member.
* src/abg-writer.cc (write_layout_offset, write_class_decl):
Adjust.
* tests/data/test-read-write/test20.xml: Adjust.
2014-03-18 Dodji Seketeli <dodji@redhat.com>
Better base class diff reporting
* include/abg-comparison.h (class base_diff): New.
* include/abg-ir.h (function_decl::get_first_non_implicit_parm):
New member function.
(function_type::get_first_non_implicit_parm): Likewise.
* src/abg-comparison.cc (base_has_changed): Change parm to take
class_decl::base_spec_sptr.
(class_diff::ensure_lookup_tables_populated): Compare the base
specs not just the base classes.
(class_diff::report): Adjust. Report sub-type changes in the
member functions.
(base_diff::*): Define member functions.
(compute_diff): Define an overload for base_diff_sptr.
* src/abg-hash.cc ({function_type,
method_type}::hash::operator()): Do not hash the implicit parm of
member functions.
(class_decl::hash::operator()): Do not hash member types.
* src/abg-ir.cc (decl_base::decl_base): Initialize the
hashing_started_ member that got moved here from class_decl.
(decl_base::get_hash): Do not set the hash if it's being set b/c
we are in a class_decl.
(decl_base::operator==) Do not compare hashes for now. Two decls
can have different hashes and compare equal; think about an
incomplete type foo, that compares equal with a complete foo.
Their hashes will be different though. So for now, just avoid
comparing these.
(compare_function_types): Avoid comparing the implicit parameter
for member functions.
({function, method}_type::get_first_non_implicit_parm): New
definition.
* tests/data/test-read-write/test20.xml: Update.
2014-03-13 Dodji Seketeli <dodji@redhat.com>
Do not report change in typedef underlying type is there is none
* src/abg-comparison.cc (typedef_diff::report): Do not forget to
check the length of the diff of the underlying type before sending
its diff report down the wire.
2014-03-13 Dodji Seketeli <dodji@redhat.com>
Avoid hashing a access & static-ness of member types twice
* src/abg-hash.cc (class_decl::hash::operator()): Do hash the
'member' part of the member types here, it has been hashed
already.
2014-03-13 Dodji Seketeli <dodji@redhat.com>
Set class {size,loc} when adding members to a decl-only class
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
forget to set class size and location when adding members to a
declaration-only class, turning it into a definition class.
2014-03-13 Dodji Seketeli <dodji@redhat.com>
Use the same representation for member and non-member types
* include/abg-fwd.h (is_at_class_scope): Add new oveloads.
(as_non_member_type, as_non_member_class_decl): Remove.
(has_scope, is_member_decl, is_member_type): New function
declarations. (get_member_is_static, set_member_is_static):
Likewise. * include/abg-ir.h (enum access_specifier): Move to
the abigail:: namespace, from ...
(class_decl::access_specifier): ... here. (class
context_rel): New type. (decl_base::hash_as_member): New
hasher. (decl_base::context_): Change the type of this to
context_rel_sptr. (decl_base::get_context_rel): New protected
getter. (decl_base::get_scope): Move this out-of-line.
(class_decl::member_type): Remove.
(class_decl::member_types): Adjust this typedef.
(class_decl::{insert,add}_member_type): Make these take a
type_base_sptr now. (class_decl::add_member_type): Change the
overload that returned a member_type to return a
type_base_sptr. (get_member_access_specifier,
set_member_access_specifier): New function declarations. *
include/abg-comparison.h (class member_type_diff): Remove.
(compute_diff): Remove the overload for member_type_diff. *
src/abg-comparison.cc (compute_diff_for_types): Adjust for the
removal of class_decl::member_type.
(maybe_report_diff_for_class_members): New static function.
(report_name_size_and_alignment_changes): Do not report a name
change just because of a struct -> class change. ({var_diff,
enum_diff, function_decl_diff}::report): Use the new
maybe_report_diff_for_class_members. (class_diff::report):
Adjust for the removal of class_decl::member_type. Use the
new maybe_report_diff_for_class_members. (class member_diff):
Remove. * src/abg-dwarf-reader.cc (die_access_specifier)
(get_scope_for_die, build_translation_unit_and_add_to_ir)
(build_class_type_and_add_to_ir, build_function_decl)
(build_ir_node_from_die): Adjust. * abg-hash.cc (struct
decl_base::hash_as_member): Define. ({scope_type_decl,
enum_type_decl, typedef_decl}::hash::operator()): Use the
decl_base::hash_as_member.
* src/abg-ir.cc (decl_base::decl_base): Adjust.
(decl_base::get_scope): New out-of-line getter.
(decl_base::{operator==, set_scope): Adjust.
(has_scope, is_member_decl, is_member_type)
(get_member_access_specifier, set_member_access_specifier)
(get_member_is_static, set_member_is_static, is_at_class_scope):
New function definitions.
(as_non_member_type, as_non_member_class_decl): Remove.
(get_node_name): Adjust.
(class_decl::{class_decl, set_earlier_declaration,
insert_member_decl, insert_member_type, add_member_type):
Likewise.
(class_decl::member_type::*) Remove.
* src/abg-reader.cc (read_access, build_qualified_type_decl)
(build_reference_type_def, build_typedef_decl)
(build_class_decl): Adjust.
* src/abg-writer.cc (write_access, write_member_type)
(write_class_decl): Likewise.
2014-03-12 Dodji Seketeli <dodji@redhat.com>
Avoid more static_casts in the (comparison) code
* src/abg-ir.cc (class_decl::insert_member_type, operator==):
Remove static_casts.
(class_decl::member_type::operator==): Likewise.
(class_decl::member_class_template::operator==): Likewise.
2014-03-12 Dodji Seketeli <dodji@redhat.com>
Allow adding members to decl-only classes making them defined classes
* include/abg-fwd.h (lookup_type_in_scope)
(lookup_var_decl_in_scope): New declarations.
* include/abg-ir.h (class_decl::get_is_declaration_only): Rename
is_declaration_only on this.
(class_decl::set_is_declaration_only):
* src/abg-comparison.cc (try_to_diff<class_decl>)
(class_diff::ensure_lookup_tables_populated)
(scope_diff::ensure_lookup_tables_populated): Update for the
get_is_declaration_only renaming.
* src/abg-dwarf-reader.cc (get_scope_for_die): Likewize.
(build_class_type_and_add_to_ir): Make sure that a member type or
data member is not already present in the class before adding it.
Also, if a decl-only class gets a data member, it's not a
decl-only class anymore.
* src/abg-hash.cc (class_decl::hash::operator()): Update for the
get_is_declaration_only renaming.
* src/abg-ir.cc (scope_decl::find_iterator_for_member)
(look_through_decl_only_class): Likewise.
(lookup_type_in_scope, lookup_var_decl_in_scope, get_node_name)
(convert_node_to_decl, lookup_node_in_scope)
(lookup_type_in_scope): New definitions.
(class_decl::{set_definition_of_declaration,
set_earlier_declaration, operator==}): Update for the
get_is_declaration_only renaming.
* src/abg-reader.cc (build_class_decl): Likewise.
* src/abg-writer.cc (write_class_is_declaration_only): Likewise.
2014-03-12 Jonathan Wakely <jwakely@redhat.com>
Fixed typos in abg-diff-utils.h
* include/abg-diff-utils.h (compute_diff): Fix typos in the API
doc.
2014-03-11 Dodji Seketeli <dodji@redhat.com>
Initialize a variable
* tools/bilint.cc (main): Initialize the 'r' variable.
2014-03-11 Dodji Seketeli <dodji@redhat.com>
Do not declare classes before defining them anymore
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
declare classes before defining them because both the declaration
and the definition now compare equal.
* tests/data/test-read-dwarf/test1.abi: Update test.
* tests/data/test-read-write/test20.xml: Likewise.
2014-03-11 Dodji Seketeli <dodji@redhat.com>
Little style fix
* src/abg-comparison.cc (class_diff::report): Slight style fix.
2014-03-10 Dodji Seketeli <dodji@redhat.com>
Better support for decl-only classes in diffing and comparison
* include/abg-fwd.h (look_through_decl_only_class): New function
declaration.
* src/abg-comparison.cc (class_diff::length): Just compare the two
classes.
(compute_diff): Look through the two classes if they are
decl-only, and use their declaration for the diffing.
* src/abg-ir.cc (look_through_decl_only_class): Define this new
entry point.
(class_decl::set_definition_of_declaration): Allow setting a
definition that is itself a declaration-only.
* src/abg-writer.cc (write_class_decl): Declaration-only can now
have members, namely member types.
2014-03-10 Dodji Seketeli <dodji@redhat.com>
Fix comparison wrt hash number
* src/abg-ir.cc (decl_base::operator==): Do not consider empty
hashes.
(class_decl::operator==): Better support for comparing decl-only
classes against non-decl-only classes.
2014-03-10 Dodji Seketeli <dodji@redhat.com>
Better support of class DIEs with DW_AT_specification
* src/abg-dwarf-reader.cc (get_scope_for_die): The definition of a
declaration-only class can be NULL. Do not look through in that
case.
(build_class_type_and_add_to_ir): Support adding class members to
an existing class.
(build_ir_node_from_die): If a class DIE has a DW_AT_specification,
get the specification DIE, get its matching IR node and add the
current members of the current DIE to that IR node.
2014-03-10 Dodji Seketeli <dodji@redhat.com>
Tell struct and class apart
* include/abg-ir.h (class_decl::is_struct_): New member.
(class_decl::class_decl): Take an additional is_struct member.
(class_decl::is_struct): New getter.
* src/abg-ir.cc (class_decl::class_decl): Initialize the new
is_struct_ data member.
(class_decl::get_pretty_representation): Tell struct and class
apart.
* abg-reader.cc (read_is_struct): New static function.
(build_class_decl): Capture the struct-ness of the class.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Likewise.
* src/abg-writer.cc (write_is_struct): New static function.
(write_class_decl): Write the struct-ness of the class.
* tests/data/test-read-dwarf/test1.abi: Update test.
2014-03-06 Dodji Seketeli <dodji@redhat.com>
Fix typedef_diff emptyness detection
* src/abg-comparison.cc (typedef_diff::length): Do not mask away the
dynamic type of the typedef_decl before the comparison.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Style fix in the dwarf reader
* src/abg-dwarf-reader.cc (die_is_public_decl): Rename
is_public_decl into this.
(die_is_declaration_only): Rename is_declaration_only into this.
(build_class_type_and_add_to_ir, build_var_decl)
(build_function_decl): Adjust for the renames above.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Skip artificial (member) functions from DWARF
* src/abg-dwarf-reader.cc (die_is_artificial): New static
function.
(build_class_type_and_add_to_ir, build_ir_node_from_die): Use the
die_is_artificial function to test if the function DIE is
artificial and then skip it.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix function parameter addition/deletion/change detection
* include/abg-ir.h (function_decl::parameter::get_name_id):
Declare new entry point.
* src/abg-comparison.cc
(function_decl_diff::ensure_lookup_tables_populated): Use the new
function_decl::parameter::get_name_id() for the unique name of the
parameter. Also, fix a little logic error: if a parm is deleted
and inserted, in all cases, consider it as not deleted.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Add a --stat option to bidiff
* include/abg-comparison.h (diff_context::show_stats_only):
Declare new accessors.
* src/abg-comparison.cc
(diff_context::priv::show_stats_only_): New member.
(diff_context::show_stats_only): Define new accessors.
(corpus_diff::report): If showing stats only, quit right after
showing the summary.
* tools/bidiff.cc (options::show_stats_only): New data member.
(options::options): Initialize the new data member.
(display_usage): Add help string for --stat.
(parse_command_line): Parse the --stat option.
(set_diff_context_from_opts): Update to set the show_stats_only
onto the context. Cleanup the logic to make it more compact.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Report about functions of different names
* src/abg-comparison.cc (function_decl_diff::report): Consider the
case of functions with different names. This doesn't happen in
the current pipeline b/c they just show up as deleted/added
functions so the function reporter doesn't see them as they have
been already reported by now.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix length calculation for type diffs.
* src/abg-comparison.cc (diff_length_of_type_bases): Fix stupid
harmful thinko here.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix calculation of the length of distinct_diff
* src/abg-comparison.cc (distinct_diff::length): Also perform a
deep comparison here.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix diff length calculation for typedef diffs
* src/abg-comparison.cc (typedef_diff::length): Just use
comparison for this.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix layout of diff summary
* src/abg-comparison.cc
(corpus_diff::priv::emit_corpus_diff_stats): Remove useless
vertical and horizontal white spaces.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix indentation of pieces of class diff report
* src/abg-comparison.cc (represent, class_diff::report): Fix
indentation.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Fix detection of entities of different kinds for diff purposes
* src/abg-comparison.cc
(distinct_diff::entities_are_of_distinct_kinds): Consider two NULL
decls are distinct types for the purpose of diffing. This is just
a shortcut to avoid creating a null_diff type for now. But then,
stop considering same pointers as different. This was a bug.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Constify function_decl::parameter::get_type_pretty_representation()
* include/abg-ir.h
(function_decl::parameter::get_type_pretty_representation): This
is now const.
2014-02-28 Dodji Seketeli <dodji@redhat.com>
Improve API doc for the location machinery
* include/abg-ir.h (class location): Improve doc.
(decl_base::{get,set}_location): Likewise.
2014-02-26 Dodji Seketeli <dodji@redhat.com>
Remove useless dynamic cast
* src/abg-ir.cc (class_decl::insert_member_decl): Remove useless
dynamic cast from here.
2014-02-26 Dodji Seketeli <dodji@redhat.com>
Insert reference, pointers and qual types at their declaration point
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Insert
reference, pointers and qualified types at the point where we see
them, in their scope, rather than under the scope of their
underlying type. This is because their might be first declared as
member types and we don't want to loose that information.
2014-02-24 Dodji Seketeli <dodji@redhat.com>
Fix documentation for the diff_utils namespace
* include/abg-diff-utils.h (namespace diff_utils): Add comment.
(compute_diff): Update comments for some overloads where they were
missing.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): use
as_non_member_class_decl rather that complicated casting.
src/abg-ir.cc (var_decl::get_pretty_representation): Use
get_type_declaration rather than casting.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Fix a glitch in member data diff reporting
* src/abg-comparison.cc (represent): Do not forget the "'" around
the access specifier.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Proper support for diffing member types
* include/abg-comparison.h (class member_type_diff): New class.
(member_type_diff_sptr): New convenience typedef.
(compute_diff): New overload for member_type_diff.
* src/abg-comparison.cc (struct member_type_diff::priv): New
definition.
(member_type_diff::{first_member_type, second_member_type,
underlying_type_diff, length}): New member function definitions.
(compute_diff): New definition for member type diffs.
(compute_diff_for_types): Support diffing
member types.
(class_diff::report): Do not use strip member types now that we
can properly diff them.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Fix the support for printing cv-qualified names
* include/abg-ir.h (decl_base::{location_, name_,
qualified_parent_name_, qualified_name_}): Make these data members
protected rather than private.
(decl_base::get_qualified_parent_name): Declare new member
functions.
(decl_base::get_qualified_name): Make the core overload virtual.
Simplify the other overload that calls the core one.
(qualified_type_def::build_name): Declare new protected helper
function.
(qualified_type_def::{get_cv_quals_string_prefix,
get_qualified_name}): Declare new functions.
(pointer_type_def::{get_qualified_name}}): Likewise.
(class_decl::member_type::get_qualified_name): Likewise.
* src/abg-ir.cc (decl_base::get_qualified_parent_name): New
definition.
(decl_base::get_name): Make this out-of-line.
(decl_base::get_qualified_name): The signature of this got
simplified. Make it use the new get_qualified_parent_name.
(qualified_type_def::{build_name, get_qualified_name,
get_cv_quals_string_prefix}): New definitions.
(qualified_type_def::qualified_type_def): Update the constructor
to use the new build_name function above.
(pointer_type_def::get_qualified_name): New definitions.
(reference_type_def::get_qualified_name): Likewise.
(class_decl::member_type::get_qualified_name): Likewise.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Misc style fix
* src/abg-comparison.cc (represent): Remove useless curly braces
and vertical spaces.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Support DW_AT_specification on class/struct DIEs
* src/abg-dwarf-reader.cc (build_ir_node_from_die): Support
DW_AT_specification on DW_TAG_{class,structure}type.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Avoid comparing member types and class templates
* src/abg-comparison.h (compute_diff): For class_decl_sptr, do not
compare member types and member class templates. This adds a lots
of noise that is not necessarily useful for now.
* tests/data/test-bidiff/test-qual-type0-report.txt: Update tests.
* tests/data/test-bidiff/test-struct0-report.txt: Likewise.
* tests/data/test-bidiff/test-struct1-report.txt: Likewise.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Fix the report of added/removed function parameters
* src/abg-comparison.cc
(function_decl_diff::priv::{inserted_parms_, removed_parms_}):
Remove these.
(function_decl_diff::ensure_lookup_tables_populated): Fix thinko.
Avoid using the members removed above. Use one less loop to
update the changed params.
(function_decl_diff::report): Avoid using the removed_parms_
data member that was removed above.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Put the setter of access specifiers in class_decl::member_base
* include/abg-ir.h
(class_decl::member_base::set_access_specifier): Put the setter
for access specifier here, where it belongs ...
(class_decl::member_type::set_access_specifier): ... not here.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
First approach to avoid duplication of IR nodes for forward-declared classes
* src/abg-dwarf-reader.cc (is_declaration_only): Put this back (I
removed it earlier).
(build_class_type_and_add_to_ir): If the class is a
declaration-only (a forward declaration), do not add a new
declaration only IR node.
2014-02-21 Dodji Seketeli <dodji@redhat.com>
Do not forget to set the indexes of fn parms
* include/abg-ir.h (function_type::function_type): In the
constructor that takes a vector of parms, walk the vector and set
the indexes of the parms.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Misc diff reporting output cleanup
* src/abg-comparison.cc (function_decl_diff::report): Do not talk
about changed function anymore. Rather, say that some indirect
sub-types changed in the function.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Do not forget some member types/functions we built IR nodes for
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Associate the member type IR node to the offset of the die of the
member type.
(build_ir_node_from_die): For a DW_TAG_subprogram DIE that has a
DW_AT_specification pointing to another subprogram DIE, associate
the offset of this DIE to the IR node of that other DIE.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Better support of static member variables
* include/abg-fwd.h (fqn_to_components)
(lookup_type_in_translation_unit, demangle_cplus_mangled_name):
Declare new public entry points
* src/abg-comparison.cc (corpus_diff::report): Report stuff about
global variables using their mangled name, and demangle them. If
there is no mangled name for the variable, then use its pretty
representation.
(compute_diff): For the corpus overload, compare global variables
using their mangled name, if its available; otherwise, fall back
to using their pretty representation.
* src/abg-corpus.cc (var_comp::operator()(const var_decl*,
const_var_decl*)): Compare variables using their mangled name in
priority. If it's not available then use their pretty
representation.
* src/abg-dwarf-reader.cc
(read_context::var_decls_to_re_add_to_tree): New accessor.
(build_translation_unit_and_add_to_ir): If there is what appears
to be a definition of a static member variable variable -- this is
in case this definition lacks the DW_AT_specification attribute
that links it to the DW_TAG_member or DW_TAG_variable DIE that is
a child of the right class/structure DIE -- that is not at the
right place in the DIE tree, remove it from the its current place
in the tree and try to hang it off of the right DIE. To do this,
de-mangle its mangled name, look at what is supposed to be the
parent class name, look it up in the translation unit IR, and if
found, stick the variable IR node in there, as a static member
variable. If not found, then bad luck.
(build_class_type_and_add_to_ir): Do not try to see if a member
variable is static here as the way I was doing it was unreliable.
Build the data member node directly w/o going through building a
variable node first. Register the data member in the die offset
-> IR node map.
(build_ir_node_from_die): When seeing DW_TAG_variable, look for a
DW_AT_specification attribute. If there is one, then it points to
a the DIE of a data member and means that data member is static.
Flag the IR node of that data member as static thus. Update the
die offset -> IR node map. If there is no DW_AT_specification
attribute or if it doesn't point to a data member DIE, schedule
this variable tag for a stage when after the whole IR is built for
the translation unit, the variable's mangled named is inspected,
its hypothetical parent struct/class is looked up and the variable
IR node is put into the node of the right struct/class IR node.
* src/abg-ir.cc (enum lookup_entity_kind): New.
(fqn_to_components, iterator, lookup_type_in_translation_unit)
(lookup_node_in_translation_unit, lookup_type_in_translation_unit)
(demangle_cplus_mangled_name): New function definitions.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Shorten an accessor name in the DWARF reader
* src/abg-dwarf-reader.cc (read_context::cur_tu): Rename
read_context::current_translation_unit into this.
(read_context::current_scope, die_location)
(build_translation_unit_and_add_to_ir, build_enum_type)
(build_function_decl): Adjust wrt the change above.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Unset decl scope when removing the decl from its scope
* src/abg-ir.cc (remove_decl_from_scope): Unset the scope of the
decl.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Support adding data member from var_decl
* src/abg-ir.cc (class_decl::insert_member_decl): Support taking
a var_decl.
(class_decl::add_data_member): Do not insert a data member twice.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Fix qualified type pretty printing
* src/abg-ir.cc (qualified_type_def::qualified_type_def): Remove
useless white space.
2014-02-19 Dodji Seketeli <dodji@redhat.com>
Add class_decl::member_base::set_is_static() accessor
* include/abg-ir.h (class_decl::member_base::get_is_static):
Rename is_static into get_is_static.
(class_decl::member_base::set_is_static): New accessor.
* src/abg-comparison.cc (represent): Adjust for
class_decl::member_base::is_static -> get_is_static.
* src/abg-corpus.cc (symtab_build_visitor_type::visit): Likewise.
src/abg-hash.cc (class_decl::member_function::hash::operator()):
Likewise.
* src/abg-ir.cc (class_decl::member_base::operator==): Likewise.
* src/abg-writer.cc (write_class_decl): Likewise.
2014-02-13 Dodji Seketeli <dodji@redhat.com>
Fixes needed to diff libstdc++ v4_4 against master
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Support several
instances of the same member function being deleted. That can
happen when the same member function was present in the initial
class several times. Yeah, I've seen that in dwarf.
* src/abg-corpus.cc (corpus::priv::build_symbol_table): Do not add
the same variable (identified by its mangled name) twice in the
variable symbol table.
2014-02-13 Dodji Seketeli <dodji@redhat.com>
Fix wrong deleted functions count when diffing corpora
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): If a function
has changed, deleted it from the list the removed functions.
2014-02-13 Dodji Seketeli <dodji@redhat.com>
Several fixes needed to read libstdc++.so
* src/abg-reader.cc (read_context::map_id_and_node): Allow
duplicated class and basic type declarations.
(build_type_decl): Allow duplicated type decls.
(build_qualified_type_decl, build_pointer_type_def)
(build_reference_type_def): As there can be several distinct
duplicated types, compare them by value.
(build_class_decl): There can be duplicated class decls.
* src/abg-writer.cc (write_enum_type_decl): The name of the enum
needs to be xml-escaped.
2014-02-12 Dodji Seketeli <dodji@redhat.com>
qualified, pointer and reference types can be member types
* src/abg-reader.cc (build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def): Consider that
these types can be member types.
2014-02-12 Dodji Seketeli <dodji@redhat.com>
Consider two typedefs with different names to be different
* src/abg-ir.cc (typedef_decl::operator==): Consider two typedefs
with different names to be different.
2014-02-12 Dodji Seketeli <dodji@redhat.com>
Really Avoid trying to build IR nodes for non-public functions
* src/abg-dwarf-reader.cc (build_ir_node_from_die): For the
DW_TAG_subprogram case, bail out early if the current function is
non-public.
2014-02-12 Dodji Seketeli <dodji@redhat.com>
Add --{changed,deleted,added}-{fns,vars} options to bidiff
* include/abg-comparison.h
(diff_context::{show_{deleted,changed_added}_{fns,vars}}): Declare
new accessors.
(corpus_diff::context): Declare new getter.
* src/abg-comparison.cc
(diff_context::{show_{deleted,changed_added}_{fns,vars}}): Define
these new accessors.
(corpus_diff::priv::emit_corpus_diff_stats): Define new function.
(corpus_diff::context()): Define new getter.
(corpus_diff::report): Use the new
corpus_diff::priv::emit_corpus_diff_stats to emit diff stats at
the beginning of the report. Conditionalise emitting the
different parts of the reports (changed,deleted,added stuff) on
the values of the new properties that were just added.
* tools/bidiff.cc
(options::{show_{deleted,changed,added}_{fns,vars}): New
properties.
(display_usage, parse_command_line): Update for the newly added
--{changed,deleted,added}-{fns,vars} command line options.
(set_diff_context_from_opts): Define new static function.
(main): Create a diff context, initialize it from the options
(using set_diff_context_from_opts) and pass it to compute_diff.
2014-02-11 Dodji Seketeli <dodji@redhat.com>
Add --show-symtabs to bidiff
* tools/bidiff.cc (display_usage): Update usage string.
(parse_command_line): Recognize the --show-symtab cmdline option.
(display_symtabs): New static function.
(main): Call the new display_symtabs.
2014-02-11 Dodji Seketeli <dodji@redhat.com>
Harden class_decl node traversal code
* src/abg-ir.cc (class_decl::traverse): Add a few asserts here and there.
2014-02-11 Dodji Seketeli <dodji@redhat.com>
Fix the pretty representation for member functions
* src/abg-ir.cc (function_decl::get_pretty_representation): Fix
this to properly display the representation of member functions.
* tests/data/test-bidiff/test-enum0-report.txt: Update this.
* tests/data/test-bidiff/test-enum1-report.txt: Likewise.
* tests/data/test-bidiff/test-qual-type0-report.txt: Likewise.
* tests/data/test-bidiff/test-struct0-report.txt: Likewise.
* tests/data/test-bidiff/test-struct1-report.txt: Likewise.
2014-02-11 Dodji Seketeli <dodji@redhat.com>
Do not forget to traverse member types
* include/abg-ir.h (class_decl::member_type::traverse): Declare new virtual
function.
(ir_node_visitor::visit): Declare new virtual function
* src/abg-ir.cc (class_decl::member_type::traverse): Implement the
traversal of a member type.
(ir_node_visitor::visit): Provide a default implementation for the
visitor of member type.
2014-02-11 Dodji Seketeli <dodji@redhat.com>
From DWARD, avoid adding IR nodes for member functions twice
* include/abg-fwd.h (as_non_member_class_decl): Declare new overload.
* src/abg-ir.cc (as_non_member_class_decl): Define new overload.
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Add
member functions to the DIE -> IR Node map.
(build_ir_node_from_die): Assert that DW_TAG_subprogram cannot be
for a member function here because getting the scope of the member
function would have constructed the entire class that contains it,
including the member function. Then, calling
build_ir_node_from_die for the DIE of the member function would
find the already IR Node in the DIE -> IR Node map.
2014-02-11 Dodji Seketeli <dodji@redhat.com>
Fix access specifiers value
* include/abg-ir.h (class_decl::enum access_specifier): Give the enumerators
the same values as what the DWARF spec says.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Misc diff report cleanups
* include/abg-ir.h (function_decl::parameter::get_type_name): Add
comment.
(function_decl::parameter::get_type_pretty_representation): New
member fn.
* src/abg-comparison.cc (represent): When representing changed
members, use their pretty representation.
(function_decl_diff::{ensure_lookup_tables_populated, report}): Use the
pretty representation of parameters type.
(typedef_diff::report): Enclose the underlying type in "'".
(corpus_diff::report): Add proper spacing.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Re-organize the output of diffing two corpora
* src/abg-comparison.cc (corpus_diff::report): Emit
information about the number of added/removed/changed
functions. If the report is big, prefix any added
function with '[A]' deleted function with '[B]'. Also,
fix indentation.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Support diffing entities of different kinds.
* include/abg-comparison.h (class distinct_diff): Declare new
type.
(compute_diff_for_distinct_kinds): Declare new function.
* src/abg-comparison.cc (distinct_diff::{distinct_diff, first,
second, entities_are_of_distinct_kinds, length, report}): Define
new member functions.
(compute_diff_for_distinct_kinds, try_to_diff_distinct_kinds):
Define new function.
(compute_diff_for_types, compute_diff_for_decls): Support diffing
entities of different kinds.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Avoid recursive comparison on class_decl & perform some optimizations
* src/abg-ir.cc (class_decl::operator==(const decl_base& other)
const): Bail out early in case of recursive comparison, or if type
hashes are different. Do not try to compute qualified name unless
it's really necessary. The optimizations part of this change were
hinted by profiling.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Handle the DIE for a fn that has a 'specification' attribute
* src/abg-dwarf-reader.cc (build_ir_node_from_die): For the
DW_TAG_subprogram case, if the function has a DW_AT_specification
attribute, build the IR node for the specification DIE instead.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Add an assert in the dwarf reader
* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
Assert that the result of build_function_decl on a member function
is a method_decl.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Do not forget that build_ir_node_from_die can return member types
* src/abg-dwarf-reader.cc (get_scope_for_die): Handle member class
types.
(build_function_decl): Likewise.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
A member function can have an empty mangled name
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): If a member function
has an empty mangling name, use its pretty representation.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Remove too eager asserts
* src/abg-comparison.cc
(class_diff::ensure_lookup_tables_populated): Do not assert that
the same member type cannot be deleted/inserted twice. It
actually can for, pointers, references, typedefs, etc.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Fix some new line handling in diff reports
* src/abg-comparison.cc (represent): Remove extra new line after
reporting virtual function number.
(class_diff::report): Do not forget to emit a new line between two
inserted functions.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Perform the diff of changed functions and variables in the right order
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): In a changed
function or variable, do not mix up the new and old value.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Fix typo in report
* src/abg-comparison.cc (reference_diff::report): Fix typo
refereneced -> referenced.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Fix various crashes
* src/abg-comparison.cc (decls_equal::operator()(const decls_type,
const decls_type) const): Do not crash when of the decl_types is
NULL.
({pointer_diff, reference_diff, enum_diff}::length): Avoid
crashing if the underlying type is NULL.
* abg-ir.cc (function_decl::get_pretty_representation): Avoid
crashing on member functions with empty parameter set.
signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-10 Dodji Seketeli <dodji@redhat.com>
More optimizations hinted by profiling
* include/abg-ir.h (decl_base::qualified_name_): New member.
(decl_base::get_qualified_name): Cache the qualified name.
(decl_base::get_type): Return a reference on the shared pointer.
(method_type::get_class_type): Likewise.
(class_decl::get_definition_of_declaration): Likewise.
(class_decl::member_type::get_underlying_type): Likewise.
(class_decl::base_spec::get_base_class): Likewise.
* src/abg-ir.cc (decl_base::get_qualified_name): Implement the
caching.
(class_decl::member_type::get_qualified_name): Return a reference
on the shared pointer.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Avoid crashing when getting function parm type name
* include/abg-ir.h (function_decl::parameter::get_type_name): New
member function.
* src/abg-comparison.cc
(function_decl_diff::ensure_lookup_tables_populated): Use the new
member function above.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Small optimization hinted by profiling
* include/abg-diff-utils.h (d_path_vec::max_d): Avoid using member
functions. This is relevant only when compiling w/o optimization.
2014-02-10 Dodji Seketeli <dodji@redhat.com>
Fix allocation of diff_utils::d_path_vec
* include/abg-diff-utils.h (d_path_vec::d_path_vec): Do not
forget to allocate enough data for reverse vectors as well. The
comment of the constructor is accurate.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* include/abg-hash.h (combine_hashes): Remove trailing white
spaces.
* include/abg-ir.h (class function_decl): Add end-of-class
comment.
(struct type_base::cached_hash): Fix comment.
* src/abg-comparison.cc: Remove useless new line.
* src/abg-corpus.cc: Likewise.
* src/abg-writer.cc: Likewise.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Support looking through decl-only classes and update diff reports accordingly
* include/abg-comparison.h (class diff_context): New class.
(class diff::{ctxt_, reported_once_, currently_reporting_}): New
data members.
(diff::diff): Initialize the new data members above.
(diff::{context, currently_reporting, reported_once}): New
accessors.
(compute_diff, var_diff::var_diff, pointer_diff::pointer_diff)
(reference_diff::reference_diff, qualified_type_diff)
(enum_diff:enum_diff, class_diff::class_diff)
(scope_diff::scope_diff, function_decl_diff::function_decl_diff)
(type_decl_diff::type_decl_diff, typedef_diff::typedef_diff)
(translation_unit_diff::translation_unit_diff, corpus_diff::corpus_diff):
Take an additional pointer to diff_context.
* abg-comparison.cc (diff_context::{has_diff_for,
has_diff_for_types, add_diff}): New methods.
(try_to_diff, compute_diff_for_types, compute_diff_for_decls)
(represent): Take an additional pointer to
diff_context in argument. In the later function, do not re-report
a diff if it has already been reported, or if it's being reported
already.
(var_diff::var_diff, pointer_diff::pointer_diff)
(reference_diff::reference_diff)
(qualified_type_diff::qualified_type_diff, enum_diff::enum_diff)
(class_diff::class_diff, scope_diff::scope_diff)
(function_decl_diff::function_decl_diff, type_decl::type_decl)
(typedef_diff::typedef_diff)
(translation_unit_diff::translation_unit_diff)
(corpus_diff::corpus_diff): Take an additional pointer to
diff_context in argument.
({pointer_diff, qualified_type_diff,
reference_type_diff}::report): do not re-report a diff about the
underlying type if it has already been reported, or if it's being
reported already.
(enum_diff::report): Fix this to properly use the populated lookup
tables.
(compute_diff): take an additional pointer to diff_context in
argument. For the var_decl, pointer_diff reference_type_diff,
qualified_type_diff enum_diff, scope_diff, function_decl_diff,
type_decl_diff and typedef_diff overloads, do not re-build a diff
object, if one exits already. Otherwise, record the new diff
object created so that it can be re-used later.
(enum_diff::ensure_lookup_tables_populated): Fix logic to avoid
one loop.
(class_decl::priv::{deleted_member_functions_,
inserted_member_functions_, changed_member_function_}): New
members to support reporting about member functions changes.
(class_decl::{lookup_tables_empty, clear_lookup_tables, length):
Update for the new additions above.
(class_decl::ensure_lookup_tables_populated): Likewise. Fix to
properly use the lookup tables and also avoid a going through
several loops to compute the changed members.
(class_decl::report): Flip a switch to make the beginning and end
of the reporting, in the context. Also, do not try to report
again, if we were already reporting this diff. Fix quite some
spots to properly use the lookup tables.
(scope_diff::ensure_lookup_tables_populated): Skip decl-only
classes during comparison. Fix some thinkos. Fix logic to avoid a
loop.
(scope_diff::report): Adjust to pass a context to
compute_diff_for_types.
(function_decl_diff::ensure_lookup_tables_populated): Fix logic to
avoid a loop.
(function_decl_diff::report): Adjust call to
compute_diff_for_types to pass the context.
(typedef::report): Avoid re-reporting the diff of the underlying
types, if we are already reporting it.
(corpus_diff::priv::ensure_lookup_tables_populated): Use the
pretty representation of the function rather than its name to key
the maps of deleted and added functions. Fix logic to avoid going
through an additional loop for the changed functions.
(corpus_diff::report): Add a title for removed/added/changed
functions. Fix indentation for added/removed/changed functions.
* include/abg-ir.h (class_decl::comparison_started_): New member
* src/abg-dwarf-reader.cc (is_public_decl): Style fix.
(is_declaration_only_): New static function.
(build_class_type_and_add_to_ir): Create decl-only classes (IR) for
classes flagged as declaration-only in the DWARF.
* src/abg-hash.cc (class_decl::hash::operator()): Do not forget to
include the "is_declaration_only" flag into the hashing.
* src/abg-ir.cc (class_decl::operator==): Look through decl-only
classes to get their definitions and compare the definitions
instead. Avoid comparing member types and fns if the comparison
of this type has already started.
* src/abg-reader.cc (build_class_decl): Set the definition of a
declaration, when we see it.
* tests/data/test-bidiff/test-qual-type0-report.txt: Update.
* tests/data/test-bidiff/test-struct0-report.txt: Likewise.
* tests/data/test-bidiff/test-struct1-report.txt: Likewise.
signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Support reading *.bi input with duplicated qualified type ids.
* src/abg-reader.cc (read_context::map_id_and_node): Support
qualified types with duplicated ids.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Fix comparison of member types
* src/abg-ir.cc (class_decl::member_type::operator==): Compare the
underlying type of the member type.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Avoid duplicated entries in the symbol tables of the corpus
* include/abg-ir.h ({var_decl, function_decl}::ptr_equal): New
equality functor for pointers to var_decl and function_decl.
({function_decl, var_decl}::hash): Make these hashing functors
public.
* include/abg-hash.cc (struct var_decl::hash, struct
function_decl::hash): Remove these from here. There are now in
the public abg-ir.h.
({var_decl, function_decl}::hash::operator()): Define these here.
* src/abg-corpus.cc (symtab_build_visitor_type::{fns_map,
fn_is_in_map, add_fn_to_map, vars_map, var_is_in_map,
add_var_to_map}): New accessors.
(corpus::priv::build_symbol_table): Avoid duplicated entries in
variables and functions symbols tables.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Ease debugging of abigail::diff_utils::compute_diff
* include/abg-diff-utils.h (compute_diff): Add asserts on for the
length of the shortest edit script during the divide and conquer
part of the diff algorithm.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Fix further reaching reverse path calculation in core diff algo
* include/abg-diff-utils.h (end_of_frr_d_path_in_k_plus_delta):
Favour moving left when the two abscissas at the previous steps
are equal.
(compute_diff): Update the length of the shortest edit script when
the size of one of the inputs is zero.
* tests/test-core-diff.cc (in_out_spec): Add a new input to diff
two sequences for regression testing.
* tests/data/test-core-diff/report13.txt: New reference for
the comparison of the new regression test above.
2014-02-07 Dodji Seketeli <dodji@redhat.com>
Add debugging facilities for core diffing issues
* include/abg-ir.h (fns_to_str): Declare new fn.
* src/abg-ir.cc (get_next_string, fn_to_str, fns_to_str): New
static functions.
(fns_to_str): Define new fn.
* tools/abg-tools-utils.cc (dump_functions_as_string)
(dump_function_names, compare_functions): New functions.
2014-01-20 Dodji Seketeli <dodji@redhat.com>
Fix apidoc comment
* src/abg-ir.cc (decl_base::operator==): Fix comment.
2014-01-20 Dodji Seketeli <dodji@redhat.com>
Fix bilint outputting for translation units & corpus
* tools/bilint.cc (main): Fix logic.
2014-01-20 Dodji Seketeli <dodji@redhat.com>
Remove debugging assertion when diffing
* include/abg-diff-utils.h (d_path_vec::at): Do not check for
bounds.
2014-01-20 Dodji Seketeli <dodji@redhat.com>
Do not use exceptions in dynamic_cast
* src/abg-ir.cc (class_decl::member_function::operator==)
(class_decl::member_function::operator==): Do not use the
exception path for dynamic casting. This was near the top of many
profiles.
2014-01-20 Dodji Seketeli <dodji@redhat.com>
Just add decls sequentially when reading from DWARF
* src/abg-dwarf-reader.cc (insert_decl_into_ir_under_scope)
(build_namespace_decl_and_add_to_ir, build_enum_type)
(build_class_type_and_add_to_ir, build_ir_node_from_die)
(build_ir_node_from_die): Remove.
* tests/data/test-read-dwarf/test0.abi: Update because now type
IDs can be used before they are defined.
* tests/data/test-read-dwarf/test1.abi: Likewise.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Misc Doxygen API doc fixes
* include/abg-comparison.h: Various doxygen api doc string fixes.
* include/abg-diff-utils.h: Likewise.
* include/abg-dwarf-reader.h: Likewise.
* include/abg-ir.h: Likewise.
* include/abg-reader.h: Likewise.
* include/abg-writer.h: Likewise.
* src/abg-comparison.cc: Likewise.
* src/abg-corpus.cc: Likewise.
* src/abg-dwarf-reader.cc: Likewise.
* src/abg-ir.cc: Likewise.
* src/abg-libxml-utils.cc: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-writer.cc: Likewise.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Fix bilint --noout, add --diff option
* tools/bilint.cc (options::options): Initialize ...
(options::{diff, bidiff}): ... new members.
(display_usage): Update the display usage string for --diff &
--bidiff options.
(parse_command_line): Support the --diff and --bidiff options.
(main): Require the --diff option to actually diff the emitted
output with input. Make --noout really work for when reading
from dwarf.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Read .abi files with types used before being defined & lots of fixes
* src/abg-reader.cc (read_context::m_decls_stack): Make this is a
std::deque, rather than a std::stack.
(read_context::{get_id_xml_node_map,
clear_id_xml_node_map, get_xml_node_decl_map,
map_xml_node_to_decl, get_decl_for_xml_node,
clear_xml_node_decl_map, map_id_and_node, get_xml_node_from_id,
get_scope_for_node, build_or_get_type_decl}): New member
functions.
(read_context::{get_cur_decl, push_decl, pop_decl}): Update this
now that the decl stack uses a std::deque.
(read_context::clear_decls_stack): New.
(read_context::get_translation_unit): Use the first decl of the
decl stack, that is most certainly the global scope of the current
translation unit, to get the translation unit.
(read_context::key_type_decl): Take a new flag to force the
re-keying; that is set an id to a new type, even if the id was
already set to a type.
(read_context::push_and_key_type_decl): Assert that a type must
have a declaration.
(handle_*): Make these return the decl_base_sptr resulting from
the parsing of the xml node, rather than just a bool.
(walk_xml_node_to_map_type_ids): New static function.
(read_translation_unit_from_input): Read the abi-instr xml
sub-tree once, just to build an id->xml node map. That way, when a
declaration needs a type what is not yet defined, it can just get
its XML node, build the type from it and use it. Do not forget to
advance the xml reader cursor when the reading of the 'abi-instr'
sub-tree is read. Clear all the new maps we have used for the
current translation unit.
(handle_element_node): Cleanup logic.
(build_namespace_decl): Update the new xml node -> decl map, and
use it to avoid building the same namespace twice.
(build_function_parameter): Do not even try to get the type of a
variadic parameter.
(build_function_decl, build_var_decl): Support types that are defined later.
(build_type_decl): Do not build the same type twice. But there
can be several 'unnamed-enum-underlying-type' node. In that case
just return the previous one.
(build_qualified_type_decl, build_pointer_type_def)
(build_reference_type_def, build_enum_type_decl)
(build_typedef_decl): Support underlying type defined later.
(build_class_decl): Support declaration-only related cases where
we can have several xml nodes with the same id. Update the new
xml node -> IR node maps. Fix member type adding.
(build_type_tparameter, build_non_type_tparameter)
(build_template_tparameter): Support used types defined later.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Fix member class template creation
* src/abg-ir.cc (class_decl::add_member_class_template): Do not
forget the scope of the member class template itself.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Avoid endless loop in unescape_xml_string
* src/abg-libxml-utils.cc (unescape_xml_string): Avoid and endless
loop for strings containing an '&' but that are not pre-defined
entities.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Fix a potential crash
* src/abg-ir.cc (decl_base::get_qualified_name): Do not crash if
the scope is empty.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Do not loose the member type information when reading them from DWARF
* include/abg-ir.h (class_decl::declaration_): Make this be a
decl_base_sptr so that it can actually be a
class_decl::member_type which underlying type is a class decl.
(class_decl::{set, get}_earlier_declaration): Take or return a
decl_base_sptr rather than a class_decl_sptr.
* src/abg-ir.cc (class_decl::set_earlier_declaration): Take a
decl_base_sptr rather than a class_decl_sptr.
* src/abg-dwarf-reader.cc (die_class_map_type): Make this map take
decl_base_sptr rather than a class_decl_sptr.
(build_class_type_and_add_to_ir): If the class being currently
built is a member class, do not loose that information after it
has been added to its scope. Also, base types and types of member
variables can be member types and should retain that information.
(build_qualified_type): Likewise, the underlying type of a
qualified type shouldn't loose the information about its
potentially being a member type.
(build_pointer_type_def, build_reference_type, build_typedef_type)
(build_var_decl, build_function_decl): Likewise.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Fix hashing of member types
* include/abg-ir.h (class_decl::{member_function_template,
member_class_template}): Make these inherit from decl_base, to
comply with class_decl::member_type.
(class_decl_base_spec::{base_spec, member_type, member_function,
member_function_template, member_class_template}::hash): Declare
these hashing functors in the header here.
(class_decl::{member_base, member_type, data_member,
member_function, member_function_template,
member_class_template}::hash::operator()): define these out of
line here.
(type_base::dynamic_hash::operator()): Update this to hash member
things.
* src/abg-writer.cc (write_qualified_type_def)
(write_pointer_type_def, write_class_decl)
(write_reference_type_def, write_enum_type_decl): Add an overload
that takes the type ID to use in the serialization.
(write_member_type): New implementation.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
A Member class can also be a scope for other decls in DWARF
* include/abg-fwd.h (as_non_member_class_decl): Declare ...
* src/abg-ir.cc (as_non_member_class_decl): ... this new function.
* include/abg-ir.h (class class_decl::member_type): Add more
comments about member types.
* src/abg-dwarf-reader.cc (get_scope_for_die): Use the new
as_non_member_class_decl here.
2014-01-17 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* include/abg-ir.h (location_manager::_Impl): Rename this type
into priv.
* src/abg-ir.cc b/src/abg-ir.cc (location_manager::_Impl):
Likewise.
(location_manager::location_manager): Update for the renaming
above.
* src/abg-reader.cc (build_type_decl): Remove useless white space.
(build_enum_type_decl, build_class_decl): Use the _sptr typedef in
the return type.
2014-01-14 Dodji Seketeli <dodji@redhat.com>
Update namespace comments
* src/abg-dwarf-reader.cc (namespace dwarf_reader): Add apidoc comment.
* src/abg-reader.cc (namespace xml_reader): Update apidoc comment.
2014-01-14 Dodji Seketeli <dodji@redhat.com>
Expand 'abi-instr' XML element nodes during de-serialization
* src/abg-reader.cc (update_read_context)
(update_depth_info_of_read_context): Remove.
(read_context::{pop_scope, pop_scope_or_abort): New.
(read_context::{push_decl_to_current_scope,
push_and_key_type_decl}): Remove the overloads that take the
'update_depth_info' boolean.
(build_namespace_decl): New static function.
(build_function_decl, build_var_decl, build_type_decl)
(build_qualified_type_decl, build_pointer_type_def)
(build_reference_type_def, build_enum_type_decl, build_type_decl)
(build_class_decl, build_function_tdecl, build_class_tdecl)
(build_type_tparameter, build_type_composition)
(build_non_type_tparameter, build_template_tparameter)
(build_template_parameter, build_type): Remove the
'update_depth_info' boolean from parameters.
(handle_element_node): Renamed handle_element into this. Take an
xml node and a boolean to add the resulting IR node to the IR.
(handle_type_decl, handle_namespace_decl)
(handle_qualified_type_decl, handle_pointer_type_def)
(handle_reference_type_def, handle_enum_type_decl)
(handle_typedef_decl, handle_var_decl, handle_function_decl)
(handle_class_decl, handle_function_tdecl, handle_class_tdecl):
Take an xml node and a boolean to add the resulting IR node to the
IR.
(advance_cursor): No more need to call update_read_context.
(read_translation_unit_from_input): Expand the 'abi-instr' node
into memory so that we walk its XML nodes and build the IR nodes
from them.
(read_location): Remove the overload that was using the xml reader.
():
2014-01-14 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-reader.cc (read_context::{get_cur_decl, pop_decl}): Return
decl_base_sptr rather than shared_ptr<decl_base>.
(read_context::push_decl): Take a decl_base_sptr rather than
shared_ptr<decl_base>.
2014-01-14 Dodji Seketeli <dodji@redhat.com>
Fix apidoc markup
* include/abg-comparison.h (class var_diff): @ref var_decls ->
@ref var_decl.
* src/abg-comparison.cc (function_decl_diff::first_function_decl):
@Return -> @return.
2014-01-14 Jonathan Wakely <jwakely@redhat.com>
Fix checkout & build instructions
* CONTRIBUTING: Fix Git repository url.
* doc/website/mainpage.txt: Add elfutils into the dependencies
list and fix the repository directory name. Also use autoreconf
-i.
* include/abg-fwd.h: Fix Git repository URL.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Tweak dwarf reading test to detect more namespace linking-fu
* tests/data/test-read-dwarf/test0.cc: Define a member function
out-of-line, outside of its namespace.
* tests/data/test-read-dwarf/test0.abi: Update the .abi file.
* tests/data/test-read-dwarf/test0: Update the resulting binary.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Add asserts to detect type id mis-management in native format
* read_translation_unit_from_input
(read_translation_unit_from_input): Abort when an element could
not be handled.
(build_function_parameter, build_type_decl, qualified_type_def)
(build_pointer_type_def, build_reference_type_def)
(build_enum_type_decl, build_typedef_decl, build_class_decl)
(build_type_tparameter, build_template_tparameter)
(handle_qualified_type_decl, handle_pointer_type_def)
(handle_reference_type_def, handle_typedef_decl):
Abort when a referred-to type is not found or if a type is defined twice.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-hash.cc
(class_decl::member_function_template::hash::operator()): Remove
useless vertical space.
* src/abg-ir.cc (class_decl::class_decl): Properly indent.
* src/abg-writer.cc (fn_tmpl_shared_ptr_map)
(class_tmpl_shared_ptr_map): Properly indent these typedefs.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Optimize comparison & underlying type accessing
* include/abg-ir.h (qualified_type::get_underlying_type)
(pointer_type_def::get_pointed_to_type)
(reference_type_def::get_pointed_to_type)
(typedef_decl::get_underlying_type): Avoid triggering refcount
counter increasing/decreasing here, by returning a reference to
the underlying type. This showed up high on a profile.
({scope_decl, type_decl, scope_type_decl, namespace_decl,
qualified_type_def, pointer_type_def, reference_type_def,
enum_type_decl, typedef_decl, var_decl, class_decl}::operator==):
Avoid taking the exception-using path of dynamic_cast. This
showed up very high on a profile.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Fix reading/writing native xml corpus files
* src/abg-reader.cc (read_context::clear_type_map): New member
function.
(read_translation_unit_from_input): Read up to the next element
node if we are not on an element node already. Clear the type
map. Realize that we might be on the next 'abi-instr' node upon
completion.
(read_corpus_from_input): Read up to the next element node if we
are not on an element node already. It must be an "abi-corpus"
node. THen Advance to the next 'abi-instr' element node before
handing it to read_translation_unit_from_input.
* src/abg-writer.cc (write_context::clear_type_id_map): New member
function.
(write_translation_unit): Call it.
* tools/abg-tools-utils.cc (guess_file_type): Read enough bytes to
detect abi-corpus files magic bytes.
* tools/bilint.cc (main): Do not write the corpus file to the
output stream if --noout has been provided.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Escape xml pre-defined entities in native (de-)serialization.
* include/abg-libxml-utils.h (escape_xml_string)
(unescape_xml_string): Declare new functions.
* src/abg-libxml-utils.cc (escape_xml_string)
(unescape_xml_string): Define them.
* src/abg-reader.cc (build_function_decl, build_var_decl)
(build_type_decl, build_enum_type_decl, build_class_decl)
(build_type_tparameter, build_non_type_tparameter)
(build_template_tparameter, handle_namespace_decl)
(handle_typedef_decl): Use unescape_xml_string.
* src/abg-writer.cc (write_type_decl, write_function_decl)
(write_class_decl, write_type_tparameter)
(write_non_type_tparameter, write_template_tparameter): Use
escape_xml_string.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Implement hash caching
* include/abg-ir.h (decl_base::hash_): New member.
(decl_base::{g,s}et_hash): New accessors.
(type_base_::cached_hash): Forward-declare new hasher.
(struct type_ptr_equal): New equality predicate.
(type_shared_ptr_equal::operator()): Do not forget to test pointer
equality.
(type_base::cached_hash): Declare new hasher.
* src/abg-hash.cc ({decl_base, type_decl, scope_type_decl,
qualified_type_def, pointer_type_def, reference_type_def,
enum_type_decl, typedef_decl, var_decl, function_decl,
function_decl::parameter, class_decl::data_member,
class_decl::member_function, class_decl, }::hash::operator()):
Implement caching.
(type_base::cached_hash::operator()(const type_base*)): Define.
(type_base::cached_hash::operator() (const type_base_sptr):
Define.
* src/abg-ir.cc (type_ptr_map): Make this map use
type_base::cached_hash instead of type_base::ptr_hash now.
(decl_base::decl_base): Initialize the new
decl_base::hash_. member.
(decl_base::{s,g}et_hash): Define.
(decl_base::operator==(const decl_base& other)): Take the hash in
account to speed up inequality detection.
* src/abg-writer.cc (type_ptr_map): Renamed type_shared_ptr_map
into this. Make it use type_base::cached_hash and type_ptr_equal
instead of type_base::shared_ptr_hash and type_shared_ptr_equal.
(get_id_for_type): Add overload for type_base*. Re-write the
previous overload in terms of this one.
(write_context::m_type_id_map): Use type_ptr_map as the type for
this.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Do not canonicalize types anymore; it's slow and luckily not needed
* src/abg-ir.h (translation_unit::canonicalize_type): Remove.
* src/abg-dwarf-reader.cc (canonicalize_and_add_type_to_ir)
(canonicalize_and_insert_type_into_ir)
(canonicalize_and_insert_type_into_ir_under_scope): Remove.
(build_enum_type, build_class_type, build_ir_node_from_die):
Update for removal of type canonicalization.
* src/abg-ir.cc (translation_unit::canonicalize_type): Remove.
2014-01-13 Dodji Seketeli <dodji@redhat.com>
Fix class scope setting & member type de-serializing from dwarf
* include/abg-fwd.h (add_decl_to_scope, insert_decl_into_scope):
return the decl added to the scope.
(as_non_member_type, get_type_declaration): Declare new entry
points.
* include/abg-ir.h (class decl_base::insert_decl_into_scope):
Update this friend declaration.
(class scope_decl, class_decl): Update the friend add_decl_to_scope
declaration.
(scope_decl::add_member_decl): Return the added decl.
(class_decl_sptr): Move this typedef befoer the class_decl class
declaration.
(class_decl::definition_of_declaration_): New member.
(class_decl::{set_definition_of_declaration,
get_definition_of_declaration}): New accessors.
(class_decl::add_member_decl): Return the added member.
(class_decl::insert_member_type): New member.
(class_decl::member_base::access_specifier): Make this protected.
(class_decl::member_type): Make this inherit from type_vase.
(class_decl::member_type::type_): Remove this member.
(class_decl::member_type::as_type): Remove this accessor.
(class_decl::member_type::operator==(const type_base&)): New.
(class_decl::member_type::operator shared_ptr<type_base>() const):
Remove.
(class_decl::member_type::get_underlying_type): New.
(class_decl::member_type::operator==(const member_type&) const):
New.
* src/abg-comparison.cc
(class_diff::{ensure_lookup_tables_populated, report}): Adjust for
the removal of class_decl::member_type::as_type.
* src/abg-dwarf-reader.cc (scope_stack_type): Change this as a
typedef to stack<scope_decl*>.
(current_scope): Change return type from scope_decl_sptr to
scope_decl*.
(insert_decl_into_scope): New.
(build_namespace_decl_and_add_to_ir): Use insert_decl_into_scope
in lieu of add_decl_to_scope.
(build_class_type_and_add_to_ir): likewise. Link a class
definition to its declaration. Push the current scope on the
scope stack. Use as_non_member_type. Fix setting member types.
(get_scope_for_die): Look through declaration-only classe to get
its definition.
(build_qualified_type, build_pointer_type_def)
(build_reference_type, build_typedef_type, build_var_decl)
(build_function_decl): Use as_non_member_type.
(build_ir_node_from_die): Fix member variable & function adding.
* src/abg-ir.cc (scope_decl::{add_member_decl,
insert_member_decl}): Return the added member.
(add_decl_to_scope): Likewise.
(insert_decl_into_scope): Likewise.
(get_top_most_scope_under): Fix logic.
(get_type_declaration): New overload that return a decl_base*.
(as_non_member_type): New definition.
(class_decl::{get_definition_of_declaration,
set_definition_of_declaration, insert_member_decl}): Likewise.
(class_decl::add_member_decl): Re-write in terms of
class::insert_member_decl.
(class_decl::insert_member_type): New definition.
(class_decl::add_member_type): Re-write in terms of
class_decl::insert_member_type.
(class_decl::remove_member_type): Update for the
class_decl::member_type::as_type removal.
(class_decl::{add_data_member, add_member_function,
add_member_function_template, add_member_class_template}): Call
scope_decl::add_member_decl.
(class_decl::member_type::member_type): Update as the type now
virtually inherits from type_base.
(class_decl::member_type::{set,get}_access_specifier): New
definitions.
(class_decl::member_type::get_underlying_type): Likewise.
(class_decl::member_type::set_scope): Update wrt
class_decl::member_type::as_type -> get_underlying_type rename.
(class_decl::member_type::operator==(const decl_base& other)):
There is no more class_decl::member_type::as_type.
(class_decl::member_type::operator==(const type_base& other)):
New.
(class_decl::member_type::get_pretty_representation): Update wrt
class_decl::member_type::as_type -> get_underlying_type rename.
* src/abg-reader.cc (build_class_decl): New that add
add_member_decl adds even member types, no need to add it
explicitly anymore.
2014-01-07 Dodji Seketeli <dodji@redhat.com>
Add regression tests for dwarf reading
* tests/test-read-dwarf.cc: New dwarf reading regression test.
* tests/data/test-read-dwarf/test0: New test input.
* data/test-read-dwarf/test0: Likewise.
* data/test-read-dwarf/test0.abi: Likewise.
* data/test-read-dwarf/test0.cc: Likewise.
* data/test-read-dwarf/test1: Likewise.
* data/test-read-dwarf/test1.abi: Likewise.
* data/test-read-dwarf/test1.cc: Likewise.
* tests/Makefile.am: Build the new tests/test-read-dwarf.cc file.
2014-01-07 Dodji Seketeli <dodji@redhat.com>
Remove useless dependencies in tests/Makefile.am
* tests/Makefile.am: Remove useless *_DEPENDENCIES variables.
2014-01-07 Dodji Seketeli <dodji@redhat.com>
Support new 'abi-corpus' native XML format (.abi)
* include/abg-reader.h (read_corpus_from_native_xml)
(read_corpus_from_native_xml_file): Declare new entry points.
* include/abg-writer.h (write_corpus_to_native_xml)
(write_corpus_to_native_xml_file): Likewise.
* src/abg-reader.cc (read_translation_unit_from_input): Renamed
read_input into this. Support new 'path' attribute for
'abi-instr' XML element.
(read_corpus_from_input): New static function.
(read_translation_unit_from_file)
(read_translation_unit_from_buffer)
(read_translation_unit_from_istream): Update wrt read_input ->
read_translation_unit_from_input.
(read_corpus_from_native_xml, read_corpus_from_native_xml)
(read_corpus_from_native_xml_file): Define new entry points.
* src/abg-writer.cc (write_translation_unit): Write 'path'
attribute into the 'abi-instr' xml element.
(write_corpus_to_native_xml, write_corpus_to_native_xml_file):
Define new entry points.
* tools/abg-tools-utils.h (file_type::{FILE_TYPE_XML_CORPUS,
FILE_TYPE_ZIP_CORPUS}): New enumerators.
* tools/abg-tools-utils.cc (guess_file_type): Support detection of
the new xml file format containing a document root 'abi-corpus'
root element.
* tools/bidiff.cc (main): Support diffing xml corpus-es and zip
corpus-es.
* tools/bidw.cc (main): Recognize elf files before reading them.
* tools/bilint.cc (main): Support reading xml/zip corpus-es too.
* tests/data/test-read-write/test[0-23].xml: Update 'path'
attribute.
2014-01-07 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* include/abg-writer.h (write_translation_unit): Re-indent parms.
* src/abg-writer.cc (write_translation_unit): Likewise.
* test/test-read-write.cc (main): Fix white space.
2014-01-06 Dodji Seketeli <dodji@redhat.com>
Fix global variables diff reporting in corpus-es
* src/abg-comparison.cc
(corpus_diff::priv::ensure_lookup_tables_populated): Fix a wrong
assert, resulting from a copy paste typo.
2014-01-06 Dodji Seketeli <dodji@redhat.com>
Add support for global variables in corpus diffing
* include/abg-comparison.h (string_var_ptr_map, changed_var_ptr)
(string_changed_var_ptr_map): New convenience typedefs.
* src/abg-comparison.cc
(corpus_diff::priv::{deleted_vars_,added_vars_,changed_vars_}):
New members.
(corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables}):
Update wrt the new variables related lookup tables.
(corpus_diff::ensure_lookup_tables_populated): Update to populate
variables related lookup tables.
(corpus_diff::report): Update to display added/removed/changed
variables.
2014-01-06 Dodji Seketeli <dodji@redhat.com>
Misc style fixlets
* include/abg-comparison.h (changed_function_ptr): Fix comment.
* src/abg-comparison.cc (corpus_diff::report): Likewise.
* src/abg-corpus.cc (corpus::is_empty): Likewise.
2013-12-23 Dodji Seketeli <dodji@redhat.com>
Initial support for diffing ABI corpus files
* include/abg-comparison.h (string_function_ptr_map)
(changed_function_ptr, string_changed_function_ptr_map)
(corpus_diff_sptr): New convenience typedefs.
(translation_unit_diff): Add comments.
(class corpus_diff): New type.
(compute_diff): New overload for corpus_diff.
* include/abg-corpus.h (corpus::{functions, variables}): New
typedefs.
(corpus::{operator==, get_functions, get_variables}): New members.
* include/abg-diff-utils.h (struct deep_ptr_eq_functor): New
functor.
* include/abg-ir.h (translation_unit::operator==): New member
equality operator.
* src/abg-comparison.cc (struct corpus_diff::priv): New private
struct holding the private members of corpus_diff.
(corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables,
ensure_lookup_tables_populated}): Define new private member functions.
(corpus_diff::{corpus_diff, first_corpus, second_corpus,
function_changes, variable_changes, length, report}): New public members.
(struct noop_deleter): New struct.
(compute_diff): New implementation for corpus_diff.
* src/abg-corpus.cc (struct corpus::priv): Renamed corpus::impl
into this. Add new fns, vars and is_symbol_table_built data
members.
(corpus::priv::build_symbol_table): New member function.
(class symtab_build_visitor_type): New visitor type to build the
symbol table.
(struct func_comp, struct var_comp): New comparison functors.
(corpus::priv::build_symbol_table): Define new member function.
(corpus::{corpus, add, get_translation_units, operator==,
get_functions, get_variables}): Define new members.
* src/abg-ir.cc (translation_unit::operator==): Define new member
equality operator.
(operator==(translation_unit_sptr l, translation_unit_sptr r)):
Define new equality operator.
* tools/abg-tools-utils.h (enum file_type): New enum.
(guess_file_type): Declare new function.
* tools/abg-tools-utils.cc (guess_file_type): define new function.
* tools/bidiff.cc (main): Guess the type of the files given in
input and support elf files reading and diffing.
2013-12-23 Dodji Seketeli <dodji@redhat.com>
Generalize use of equality operator in core diff algorithms
* include/abg-diff-utils.h (struct default_eq_functor): New
equality functor.
(end_of_fr_d_path_in_k, end_of_frr_d_path_in_k_plus_delta): Add a
new equality functor template parameter and document it. Use it
to compare the elements of the sequences given in argument.
(compute_middle_snake, ses_len, compute_diff): Add a new equality
functor template parameter and document it. Adjust call to
end_of_frr_d_path_in_k_plus_delta, end_of_fr_d_path_in_k and
compute_middle_snake.
(ses_len, compute_diff): Add a new overload that uses a
default_eq_functor as comparison functor, to avoid breaking
existing client code.
* src/abg-diff-utils.cc (compute_middle_snake): Adjust the call to
the compute_middle_snake.
2013-12-23 Dodji Seketeli <dodji@redhat.com>
Change ir node visitor interface work on pointer to nodes
* include/abg-ir.h (ir_traversable_base): New type to be the base
of IR nodes that are to be traversed. Extends traversable_base.
Its ir_traversable_base::traversable() method takes an
ir_node_visitor&.
(ir_node_visitor::visit): Change these virtual overloads to take
pointers to IR nodes, rather than references. This will be useful
to e.g, store these IR nodes in containers on the side for some
algorithms to work. That is going to be useful later to,
e.g. build symbol tables on the side, using the visitor interface.
(class decl_base): Make this inherit ir_traversable_base.
* src/abg-ir.cc (*::traverse): Adjust comments and the call the
ir_node_visitor::visit call. Use the ir_traversable_base type
rather than traversable_base.
(ir_traversable_base::traverse): Define.
(ir_node_visitor::visit): Change these overloads to take pointers
rather than reference to ir nodes.
* tests/test-walker.cc (name_printing_visitor::visit): Adjust to
take pointers rather than references.
2013-12-23 Dodji Seketeli <dodji@redhat.com>
Do not forget to read function parms
* src/abg-dwarf-reader.cc (build_function_decl): Do not forget the
the function parameters. Oops.
2013-12-20 Dodji Seketeli <dodji@redhat.com>
Support reading member functions and member types from DWARF
* include/abg-ir.h (method_type_sptr): New convenience typedef.
* src/abg-dwarf-reader.cc (read_context::{dwarf_version,
die_wip_classes_map}): New accessors.
(die_is_virtual): Rename is_virtual into this.
(is_type_tag, is_type_die, die_virtual_function_index): Define new
static functions.
(die_member_offset): Fix comment.
(get_scope_for_die): Take the read context as argument.
(canonicalize_and_add_type_to_ir): Likewise. On NULL scope, get
the current translation unit from the read context.
(canonicalize_and_insert_type_into_ir_under_scope): Handle NULL
context.
(build_function_decl): Support creating method_decls from here
when necessary.
(build_class_type_and_add_to_ir): Rename build_class_type into
this. Handle adding the class to the IR and to the relevant maps.
During the creation of the class, arrange for
build_ir_node_from_die on the current DIE to return a
declaration-only class, representing the declaration for the class
that is being constructed. This breaks circular dependencies
induced by decls/types that refer to the class being built, before
the class is fully built and has a (logical) type ID. Once the
class is created, make it refer to the class declaration that was
previously handed for the requests to the class DIE. Now requests
to the class DIE will just yield the newly built class. Add
support for member functions and member types.
(build_corpus): Support reading the dwarf version and stick it
into the context.
(build_ir_node_from_die): Adjust for change in
canonicalize_and_add_type_to_ir and build_class_type signature
change.
* src/abg-ir.cc (class_decl::method_decl::get_type): Support
returning NULL type.
2013-12-20 Dodji Seketeli <dodji@redhat.com>
Don't crash in get_global_scope on empty decls
* src/abg-ir.cc (get_global_scope): Don't crash when given a NULL
decl.
2013-12-20 Dodji Seketeli <dodji@redhat.com>
Make decl_base::set_scope virtual, to work on class_decl::member_type
* include/abg-ir.h (decl_base::set_scope): Make this virtual.
(class_decl::member_type::set_scope): Declare an overload here.
* src/abg-ir.cc (class_decl::member_type::set_scope): Define new
overload. Make this set the scope of the underlying type of the
member type as well.
2013-12-20 Dodji Seketeli <dodji@redhat.com>
Support artificial parameters
* include/abg-ir.h (function_decl::parameter::{get,
set}_artificial): Add new accessors for an "artificial" flag.
* src/abg-reader.cc (build_function_parameter): Support reading
the artificial parameter flag.
* src/abg-writer.cc (write_function_decl): Support writing the
artificial parameter flag.
2013-12-19 Dodji Seketeli <dodji@redhat.com>
Initial support for reading struct/class
* src/abg-dwarf-reader.cc (enum virtuality): New enum.
(class expr_result, struct dwarf_expr_eval_context): New types.
(die_size_in_bits)
(die_access_specifier, die_virtuality, is_virtual)
(die_location_expr, op_pushes_constant_value)
(op_pushes_non_constant_value, op_manipulates_stack)
(op_is_arith_logic, op_is_control_flow)
(eval_last_constant_dwarf_sub_expr, die_member_offset)
(build_class_type): New static functions.
(build_ir_node_from_die<DW_TAG_{class, structure}_type>): Support
creating IR node for class and struct by calling the new
build_class_type.
2013-12-19 Dodji Seketeli <dodji@redhat.com>
Slight style fix
* src/abg-dwarf-reader.cc (build_qualified_type): Fix indentation.
2013-12-19 Dodji Seketeli <dodji@redhat.com>
Be more forgiving when parsing xml from stdin
* src/abg-libxml-utils.cc (xml_istream_input_read): Return the
byte read count even when the stream seems to be borked. In that
case it should be zero.
2013-12-19 Dodji Seketeli <dodji@redhat.com>
Don't crash if building pointer/reference yields NULL
* src/abg-dwarf-reader.cc
(build_ir_node_from_die<DW_TAG_pointer_type)
(DW_TAG_rvalue{0,1}_reference_type>): Do not crash if building the
IR node for the underlying type yields NULL.
2013-12-19 Dodji Seketeli <dodji@redhat.com>
Use dwarf_attr_integrate() rather than dwarf_attr()
* src/abg-dwarf-reader.cc (die_string_attribute)
(die_unsigned_constant_attribute, die_signed_constant_attribute)
(die_flag_attribute, die_die_attribute): Use dwarf_attr_integrate
rather than dwarf_attr to look through DW_AT_abstract_origin.
2013-12-14 Dodji Seketeli <dodji@redhat.com>
Support enums
* src/abg-dwarf-reader.cc (build_enum_type): New function.
(build_ir_node_from_die): Call the new build_enum_type here to
Handle DW_TAG_enumeration_type DIEs.
2013-12-14 Dodji Seketeli <dodji@redhat.com>
Build & use a DIE -> parent map to avoid emitting useless types
* include/abg-ir.h (translation_unit::{mark_type_as_used,
prune_unused_types}): Remove these declarations.
* src/abg-ir.cc (translation_unit::priv::used_types_): Remove.
(class subtype_marking_visitor): Likewise.
(translation_unit::{mark_type_as_used, prune_unused_types):
Likewise.
(get_top_most_scope_under): Fix logic and add comment.
* src/abg-dwarf-reader.cc (die_tu_map_type, offset_offset_map):
New convenience typedefs.
(read_context::{die_tu_map_, die_parent_map_}): New context
members.
(read_context::{die_tu_map, die_parent_map}): New accessors.
(build_ir_node_from_die): New overload that takes the scope of the
ir node in parameter.
(die_signed_constant_attribute): Un-comment this.
(build_die_parent_relations_under, build_die_parent_map)
(get_parent_die, get_scope_for_die): New static functions.
(build_translation_unit_and_add_to_ir): Renamed
build_translation_unit into this. Populate the new
read_context::die_tu_map() here.
(canonicalize_and_add_type_to_ir)
(canonicalize_and_insert_type_into_ir)
(canonicalize_and_insert_type_into_ir_under_scope): Move these
overloads over the top of the file.
(build_namespace_decl_and_add_to_ir): Fix this by adding the
namespace to the IR scope of the DIE (using the new
get_scope_for_die()). Update the read_context::die_decl_map()
map.
(build_function_decl): Support functions that return void. Also,
skip parameters that don't have type set.
(build_corpus): Walk all the DIEs to build a DIE -> parent map.
Adjust for the rename to build_translation_unit_and_add_to_ir.
(build_ir_node_from_die): Add a scope parm. Adjust back to
building IR nodes only for public decls, unless the
'called_from_public_decl' flag is set. Adjust to stick the resulting
IR node into the scope given in parameter.
2013-12-14 Dodji Seketeli <dodji@redhat.com>
Mark sub-types as part of general type marking
* src/abg-ir.cc (subtype_marking_visitor): New visitor.
(translation_unit::mark_type_as_used): When marking a composite
type as used, mark its sub-types as well.
2013-12-14 Dodji Seketeli <dodji@redhat.com>
Add missing virtual keywords for traverse() method
* include/abg-ir.h ({translation_unit, decl_base, scope_decl,
type_decl, namespace_decl, qualified_type_decl, pointer_type_def,
reference_type_def, enum_type_decl, typedef_decl, var_decl,
function_tdecl, class_decl, class_decl::data_member,
class_decl::member_function, class_decl::member_function_template,
class_decl::member_class_template}::traverse): Add a virtual
keyword at least to "document" that this method is virtual -- and
thus remind the user that it overrides the
traversable_base::traverse().
2013-12-14 Dodji Seketeli <dodji@redhat.com>
Add a is_type overload
* include/abg-fwd.h (is_type): Declare new overload that takes a
type reference.
* src/abg-ir.cc (is_type): Define.
2013-12-13 Dodji Seketeli <dodji@redhat.com>
Prune types that are not ref'ed by public decls
* include/abg-fwd.h (remove_decl_from_scope): Declare new
function.
* include/abg-ir.h (type_base_sptr, decl_base_sptr): Move these
convenience typedef before the translation_unit declaration.
(translation_unit::{mark_type_as_used, prune_unused_types}):
Declare new methods.
(decl_base::remove_member_decl): Likewise.
(class_decl::{remove_member_decl, remove_member_type): Likewise.
* src/abg-dwarf-reader.cc (die_decl_map_type): Change this map
type so that the value is now a DIE offset, rather than a DIE.
This is because many times the lifetime of DIEs is shorter than
the one of the reader_context. Also, the die offset uniquely
designates a physical DIE even if several different instances of
logical DIE might point to it.
(struct die_hash): Remove this as it's useless now that we store
DIE offsets in the map.
(build_translation_unit): Call build_ir_node_from_die w/o setting
the called_from_public_decl flag. Prune the types that are not
used by any public decls.
(build_namespace_decl_and_add_to_ir): all build_ir_node_from_die
w/o setting the called_from_public_decl flag.
(build_ir_node_from_die): Change the only_public_decl flag into a
called_from_public_decl flag. Mark types used by public decls as
such. Adjust for the parm changes of build_qualified_type
build_pointer_type_def, build_reference_type, and
build_typedef_type.
(build_qualified_type, build_pointer_type_def)
(build_reference_type, build_typedef_type): Take a new
called_from_public_decl. Pass it to build_ir_node_from_die.
(build_var_decl): Call build_ir_node_from_die with the
called_from_public_decl flag set to true to flag the types
referenced by this variable as being used.
(build_function_decl): Take a called_from_public_decl flag as
well, as this function can now call build_function_decl itself to
build a function decl out of the value of the DW_AT_specification
attribute, for DIEs representing function definitions. Also, flag
the types referenced by public functions are being used.
* src/abg-ir.cc (translation_unit::priv::used_types_): New map for
the used types.
(translation_unit::{mark_type_as_used, prune_unused_types}):
Define new methods.
(scope_decl::remove_member_decl): Likewise.
(remove_decl_from_scope): Define new function.
(class_decl::{remove_member_decl, remove_member_type}): Define new
methods.
2013-12-12 Dodji Seketeli <dodji@redhat.com>
Support reading namespaces
* include/abg-fwd.h (get_global_scope): Return a const
global_scope. Add a new overload that takes a naked pointer as
parm.
(insert_decl_into_scope, get_top_most_scope_under): Declare new
entry points.
* include/abg-ir.h (class decl_base, class scope_decl): Add
insert_decl_into_scope as a friend of these classes.
(scope_decl::{insert_decl_into_scope, find_iterator_for_member}):
Declare new member.
(scope_decl::get_member_decls): New non-const overload.
* src/abg-dwarf-reader.cc (build_translation_unit): Remove the
"recurse" parameter. Adjust the call to build_ir_node_from_die to
read just public decls that are at namespace scope. Anything else
should be dropped unless it's needed to emitting the public
namespace-level decls.
(build_namespace_decl_and_add_to_ir)
(canonicalize_and_insert_type_into_ir): Define new static
functions.
(build_corpus): Adjust ad build_translation_unit doesn't have the
"recurse" parameter anymore.
(canonicalize_and_add_type_to_ir): Make this static. Fix
comments.
(build_ir_node_from_die): Take a new "only_public_decl"
parameter. For DW_TAG_base_type case, use the new
canonicalize_and_insert_type_into_ir to insert the type at the
right place in the global scope making sure it is seen before the
current scope. For pointer, references and qualified types, use
canonicalize_and_insert_type_into_ir to add the type at the same
scope as its underlying type. Handle DW_TAG_{namespace,module}
using the new build_namespace_decl_and_add_to_ir function. Add
some vertical spaces and some assertions.
* src/abg-ir.cc (scope_decl::add_member_decl): Use scope_decl_sptr
typedef.
(scope_decl::{insert_member_decl,find_iterator_for_member}):
Define new methods.
(insert_decl_into_scope, get_top_most_scope_under): Define new
functions.
(get_global_scope): Constify the return type.
(get_translation_unit): Adjust as get_global_scope now returns a
const.
* src/abg-reader.cc (get_translation_unit): Likewise.
2013-12-12 Dodji Seketeli <dodji@redhat.com>
Fix function_decl::parameter::operator==
* include/abg-ir.h (function_decl::parameter::operator==): Support
empty type, e.g, in presence of a variadic parameter.
2013-12-12 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* include/abg-ir.h (decl_base::set_visibility): Remove useless
white space.
(class scope_decl): Remove useless white space.
(scope_decl::add_member_decl): Use decl_base_sptr convenience
typedef.
(global_scope_sptr, namespace_decl_sptr): New convenience typedef.
(class global_scope): Remove useless white space.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-dwarf-reader.cc (die_string_attribute, is_public_decl)
(build_translation_unit, build_ir_node_from_die): Fix comments.
(die_unsigned_constant_attribute, die_signed_constant_attribute)
(die_loc_and_name): Align parms.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support typedef types
* src/abg-dwarf-reader.cc (build_typedef_type): Define new static
function.
(canonicalize_and_add_type_to_ir): Do not crash on NULL input
type. Also, add a new overload for smart pointer on scope.
(build_ir_node_from_die): For DW_TAG_base_type case, adjust as
canonicalize_and_add_type_to_ir now takes smart pointers on
scopes. Support the DW_TAG_typedef case by calling the new
build_typedef_type.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support reference types
* src/abg-dwarf-reader.cc (build_pointer_type_def): Do not forget
to get the proper size of the pointer type.
(build_reference_type): Define new static function.
(build_ir_node_from_die): Call build_reference_type for the
DW_TAG_reference_type and DW_TAG_rvalue_reference_type cases.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support pointer types
* include/abg-fwd.h (get_translation_unit, get_global_scope):
Declare new overloads that act on a naked pointer to decl_base.
* src/abg-dwarf-reader.cc (build_pointer_type_def): Define new
static function.
(canonicalize_and_add_type_to_ir): Take a naked pointer to
scope_decl rather than a smart pointer.
(build_ir_node_from_die): For DW_TAG_base_type, adjust. Support
DW_TAG_pointer_type case. For DW_TAG_{const,volatile}_type case,
make sure the qualified type is in the same scope as its
underlying type.
* src/abg-ir.cc (get_global_scope, get_translation_unit): Define
new overloads that acts on a naked decl_base.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support qualified types
* src/abg-dwarf-reader.cc (build_qualified_type)
(canonicalize_and_add_type_to_ir): Define new static functions.
(build_ir_node_from_die): In the DW_TAG_base_type case, use the
new canonicalize_and_add_type_to_ir which is a factorization of
this code. In the DW_TAG_{const,volatile}_type, use the new
build_qualified_type and canonicalize_and_add_type_to_ir
functions.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support reading public functions from DWARF
* src/abg-dwarf-reader.cc (read_context::dwarf_): New member.
(read_context::load_debug_info): Move the content of
load_debug_info_from_elf here.
(read_context::dwarf): New accessor for the dwarf_ member above.
(die_flag_attribute, die_loc_and_name, is_public_decl)
(build_function_decl): New static functions.
(die_location): Do not try to create a location object when the
location has empty file or empty line number.
(build_translation_unit): Take a new address_size parameter.
(build_type_decl): Really take a context parameter. Use the new
die_loc_and_name() here.
(build_var_decl): Skip non-public vars.
(build_corpus): Use dwarf_nextcu instead of dwfl_nextcu, so that
we can get the address_size used in the current CU. Note that for
this we are getting the Dwarf* pointer from the context thanks to
the new read_context::dwarf() getter. Adjust the call to
build_translation_unit to pass it the new address_size.
(build_ir_node_from_die): Shorten lines a little bit. Call the
new build_function_decl to support reading DW_TAG_subprogram DIEs.
(read_corpus_from_elf): Adjust to create the read context earlier
and use its read_context::load_debug_info method to load the debug
info.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Make bilint read input from stdin
* include/abg-libxml-utils.h (new_reader_from_istream): Declare
new public entry point.
* src/abg-libxml-utils.cc (xml_istream_input_read)
(xml_istream_input_close): New static functions.
(new_reader_from_istream): Define new public input function.
* include/abg-reader.h (read_translation_unit_from_istream):
Declare new entry points.
* src/abg-reader.cc (read_translation_unit_from_istream): Define
new entry points.
* tools/bilint.cc (options::{read_from_stdin, noout}): New
members.
(display_usage): Document --stdin and --noout.
(parse_command_line): Adjust to consider that no option on the
command line means reading from stdin, just like --stdin. Support
the --noout option as well.
(main): Support Read the abi instr from stdin; in that case, what
was read is just serialized back to stdout, unless --noout was
supplied.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support the "address-size" attribute for <abi-instr> elements
* include/abg-ir.h (translation_unit::translation_unit): Take an
address_size parameter.
(translation_unit::{get_address_size, set_address_size}): New
accessors.
* src/abg-ir.cc (translation_unit::priv::address_size_): New
private member.
(translation_unit::translation_unit): Take an address_size
parameter.
(translation_unit::{get_address_size, set_address_size}): Define
these new methods.
* src/abg-reader.cc (read_input): Read the "address-size"
attribute from the abi-instr element.
* src/abg-writer.cc (write_translation_unit): Write the
"address-size" attribute.
* tests/data/test-read-write/test23.xml: New test input.
* tests/test-read-write.cc (in_out_specs): Add the new test above
to the list of files to read and write back.
2013-12-11 Dodji Seketeli <dodji@redhat.com>
Support variadic arguments in function decls
* src/abg-reader.cc (build_function_parameter): Support reading
the "is-variadic" attribute.
* src/abg-writer.cc (write_function_decl): Support writing the
"is-variadic" attribute.
* tests/data/test-read-write/test22.xml: New test input.
* tests/test-read-write.cc (in_out_specs): Add the new test to the
list of files to read and write back.
2013-12-07 Dodji Seketeli <dodji@redhat.com>
Initial support of reading an ABI Corpus from DWARF
* configure.ac: Check the presence of libdw.so and
elfutils/libdwfl.h headers from elfutils and define the necessary
linking flags.
* include/abg-dwarf-reader.h: New header file
* include/Makefile.am: Add the new header file to the source
distribution.
* src/abg-dwarf-reader.cc:: New file.
* src/Makefile.am: Add the new file to the source distribution.
* include/abg-fwd.h (dump): Add declarations for several overloads
to allow dumping to a given output stream.
* include/abg-ir.h (class translation_unit): Use a pimpl idiom for
this now.
(translation_unit::canonicalize_type): Declare new method.
* src/abg-ir.cc (struct translation_unit::priv): New private type
for the pimpl idiom for translation_unit.
(translation_unit::{translation_unit, get_global_scope, get_path,
set_path, get_loc_mgr}): Adjust for pimpl idiom.
(translation_unit::canonicalize_type): Define this new method and
one overload.
* src/abg-writer.cc (dump): Define several overloads to dump IR
nodes to given output streams.
* tools/bidw.cc: New file for the new bidw tool.
* tools/Makefile.am: Define rules to build the new bidw tools.
2013-12-07 Dodji Seketeli <dodji@redhat.com>
Pass a string by reference rather than by value
* tools/bilint.cc (display_usage): Pass program name by reference.
2013-12-07 Dodji Seketeli <dodji@redhat.com>
Misc style fixes
* src/abg-ir.cc (location_manager::location_manager)
(translation_unit::{is_empty, traverse, ~translation_unit): Remove
useless vertical white spaces.
* tools/bilint.cc (parse_command_line): Fix indentation.
2013-12-04 Dodji Seketeli <dodji@redhat.com>
Prepare serialization API for multiple backends
* include/abg-reader.h: New file with abigail::xml_reader APIs.
* include/abg-writer.h: New file with abigail::xml_writer APIs.
* include/Makefile.am: Add the new files above to the source
distribution.
* src/abg-reader.cc: Update top-file comments.
(namespace xml_reader): Rename namespace
reader into this.
(read_to_translation_unit, read_corpus_from_archive): New static
functions.
(read_translation_unit_from_file)
(read_translation_unit_from_file, read_corpus_from_file): New
entry points.
(struct array_deleter): New functor.
(translation_unit::read): Remove this.
* src/abg-writer.cc: Update top file comments.
(namespace xml_writer): Rename namespace
writer into this.
(struct archive_write_ctxt): New internal type.
(create_archive_write_context, write_translation_unit_to_archive)
(write_translation_unit, write_corpus_to_archive): New low level
static functions overloads.
(write_corpus_to_archive, write_translation_unit): Public higher
level overloads.
(translation_unit::write): Remove.
(dump): Update for new xml_writer namespace.
* include/abg-ir.h (translation_unit::{read, write}): Remove these
serialization methods.
* include/abg-corpus.h (corpus_sptr): New convenience typedef.
(corpus::{read, write}): Remove these methods.
* src/abg-corpus.cc (corpus::{read, write})
(corpus::impl::{serialized_tus, archive}): Remove these members.
(corpus::impl::{get_archive, close_archive, write_tu_to_archive,
read_to_translation_unit}): Remove these methods.
* tests/test-bidiff.cc (main): Update for usage of the new
xml_reader API.
* tests/test-read-write.cc (main): Likewise. Update for the usage
of the new xml_writer API, too.
* tests/test-walker.cc (main): Update for the usage of the new
xml_reader API.
* tests/test-write-read-archive.cc (main): Likewise. And for the
xml_writer API, too.
* tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise.
* tools/bidiff.cc (main): Likewise, for xml_reader APIs.
* tools/bilint.cc (main): Likewise, for xml_writer APIs, too.
2013-11-29 Dodji Seketeli <dodji@redhat.com>
Add support for bidiff regression testing
* tests/data/test-bidiff/test-enum0-v0.cc.bi: New input file.
* tests/data/test-bidiff/test-enum0-v1.cc.bi: Likewise.
* tests/data/test-bidiff/test-enum0-report.diff: Likewise.
* tests/data/test-bidiff/test-enum1-v0.cc.bi: Likewise.
* tests/data/test-bidiff/test-enum1-v1.cc.bi: Likewise.
* tests/data/test-bidiff/test-enum1-report.txt: Likewise.
* tests/data/test-bidiff/test-qual-type0-v0.cc.bi: Likewise.
* tests/data/test-bidiff/test-qual-type0-v1.cc.bi: Likewise.
* tests/data/test-bidiff/test-qual-type0-report.txt: Likewise.
* tests/data/test-bidiff/test-struct0-v0.cc.bi: Likewise.
* tests/data/test-bidiff/test-struct0-v1.cc.bi: Likewise.
* tests/data/test-bidiff/test-struct0-report.txt: Likewise.
* tests/data/test-bidiff/test-struct1-v0.cc.bi: Likewise.
* tests/data/test-bidiff/test-struct1-v1.cc.bi: Likewise.
* tests/data/test-bidiff/test-struct1-report.txt: Likewise.
* tests/data/test-bidiff/test-var0-v0.cc.bi: Likewise.
* tests/data/test-bidiff/test-var0-v1.cc.bi: Likewise.
* tests/data/test-bidiff/test-var0-report.txt: Likewise.
* tests/test-bidiff.cc: New file.
* tests/Makefile.am: Build the new runtestbidiff regression test
and add the above to the source distribution.
2013-11-29 Dodji Seketeli <dodji@redhat.com>
Add missing test inputs to source distribution
* tests/Makefile.am (data/test-read-write/test{17, 18, 19, 20,
21}.xml): Add these test input files to the source distribution.
2013-11-28 Dodji Seketeli <dodji@redhat.com>
Add diff support for var_decl
* include/abg-comparison.h (class var_diff): New declaration.
(var_diff_sptr): New convenience typedef.
(compute_diff): New overloads for var_diff, decl_base and
type_base.
* src/abg-comparison.cc (try_to_diff): Renamed try_to_diff_types
into this.
(compute_diff_for_types): Adjust for the try_to_diff_types
renaming. Fix comments.
(compute_diff_for_decls): Re-use try_to_diff. Update for
var_decl.
(compute_diff): Define overloads for decl_base, type_base and
var_decl.
(diff_length_of_decl_bases, diff_length_of_type_bases): New static
help functions.
(report_name_size_and_alignment_changes): Renamed
report_size_and_alignment_changes into this. Make it report name
changes as well.
(var_diff::priv): New struct.
(var_diff::{var_diff, first_var, second_var, type_diff, length,
report}): Define methods.
({qualified_type_diff, enum_diff, class_diff, scope_diff,
function_decl_diff}::report): Do not report
anything if the diff is empty.
(type_decl_diff::length): Fix this.
(type_decl_diff::report): Adjust for renaming to
report_name_size_and_alignment_changes.
2013-11-28 Dodji Seketeli <dodji@redhat.com>
Add enum_type_decl::get_pretty_representation()
* include/abg-ir.h (enum_type_decl::get_pretty_representation):
Declare new virtual method override.
* src/abg-ir.cc (enum_type_decl::get_pretty_representation):
Define it.
2013-11-28 Dodji Seketeli <dodji@redhat.com>
Change return type of abigail::is_type()
* include/abg-fwd.h (is_type): Change the return type from bool to
type_base_sptr.
2013-11-27 Dodji Seketeli <dodji@redhat.com>
Support diff for enum_type_decl
* include/abg-ir.h (enum_type_decl_sptr): New typedef.
(enum_type_decl::enumerator::enumerator): Make default constructor
public so that enumerators can be stored in vectors. Maybe I
should have made stored pointers to enumerators instead ...
(enum_type_decl::enumerator::get_qualified_name): Define new
method.
* include/abg-comparison.h (string_enumerator_map)
(changed_enumerator, string_changed_enumerator_map)
(enum_diff_sptr): New convenience typedefs.
(class enum_diff): Declare new class.
(compute_diff): New overload for enum_type_decl.
* src/abg-comparison.cc (enum diff_kind, report_mem_header): Move
these at the beginning of the file.
(struct enum_diff::priv): Define this.
(enum_diff::{clear_lookup_tables, lookup_tables_empty,
ensure_lookup_tables_populated, enum_diff, first_enum,
second_enum, underlying_type_diff, deleted_enumerators,
inserted_enumerators, changed_enumerators, length, report}):
Define these new methods.
(compute_diff): New overload for enum_diff.
(compute_diff_for_types): Add support enum_type_decl here.
2013-11-27 Dodji Seketeli <dodji@redhat.com>
Fix equality operator for enum_type_decl
* src/abg-ir.cc (enum_type_decl::operator==(const type_base& o)):
This was comparing just the decl_base and type_base part of the
enum. Now re-use the enum_type_decl::operator==(const decl_base)
that compares the entirety of the types.
2013-11-27 Dodji Seketeli <dodji@redhat.com>
Fix indentation and wording of some existing diff reports
* src/abg-comparison.cc (class_diff::report): Fix report wording.
Change indentation space from 4 white spaces to two.
(scope_diff::report): Fix logic indentation generation.
2013-11-26 Dodji Seketeli <dodji@redhat.com>
Change enum_type_decl::enumerators from a list to a vector
* include/abg-ir.h (enum_type_decl::enumerators): Change this from
a list to a vector.
* src/abg-hash.cc (enum_type_decl::hash::operator()): Use the
typedef enum_type_decl::enumerators rather than std::list<blah>.
* src/abg-ir.cc (enum_type_decl::get_enumerators): Use
the enum_type_decl::enumerators typedef.
(enum_type_decl::operator==): Likewise.
* src/abg-reader.cc (build_enum_type_decl): Likewise.
* src/abg-writer.cc (write_enum_type_decl): Likewise.
2013-11-25 Dodji Seketeli <dodji@redhat.com>
Fix thinko in qualified_type_diff::length
* src/abg-comparison.cc (qualified_type_diff::length): Fix thinko.
2013-11-25 Dodji Seketeli <dodji@redhat.com>
Support diff between qualified types
* include/abg-ir.h (qualified_type_def_sptr): Declare new typedef.
(class qualified_type_def): Add comment at the end.
(operator<<(std::ostream&, qualified_type_def::CV)): Declare new
streaming operator.
* src/abg-ir.cc (operator<<(std::ostream&,
qualified_type_def::CV)): Define this new streaming operator.
* include/abg-comparison.h (class qualified_type): Declare new
class.
(compute_diff): Declare new overload for qualified_type_def_sptr.
* src/abg-comparison.cc (struct qualified_type_diff::priv): Define
new type.
(qualified_type_diff::{qualified_type_diff, first_qualified_type,
second_qualified_type, underlying_type_diff, length}):
Define new methods.
(get_leaf_type): Define new static function.
(compute_diff): Define overload for qualified_type_def_sptr.
(compute_diff_for_types): Add support for
diffing qualified_type_def here.
2013-11-25 Dodji Seketeli <dodji@redhat.com>
Cleanup header of changes of underlying types of pointers/references
* src/abg-comparison.cc ({pointer_diff, reference_diff}::report):
Unify header of changes in the referenced type.
* src/abg-ir.cc (decl_base::get_pretty_representation): By
default, do not prefix types with "type ", for consistency sake.
2013-11-25 Dodji Seketeli <dodji@redhat.com>
Ensure diff types can only be created by compute_diff
* include/abg-comparison.h (diff::diff): Make constructor
protected.
(pointer_diff::pointer_diff): Likewise.
(pointer_diff::{first_pointer, second_pointer}): Constify the
return type.
(compute_diff): Make this a friend of class pointer_diff.
(reference_diff::reference_diff): Make this constructor protected.
(compute_diff): Make this a friend of class reference_diff.
(class_diff::class_diff): Make this constructor protected.
(compute_diff): Make this a friend of class class_diff.
(scope_diff::scope_diff): Make this constructor protected.
(compute_diff): Make this a friend of class scope_diff.
(function_decl_diff::function_decl_diff): Make this constructor
protected.
(type_decl_diff::type_decl_diff): Likewise.
(typedef_diff::typedef_diff): Likewise.
(translation_unit_diff::translation_unit_diff): Likewise.
(compute_diff): Make this a friend of class translation_unit_diff.
* src/abg-comparison.cc (pointer_diff::{first_pointer,
second_pointer}): Constify return type.
2013-11-21 Dodji Seketeli <dodji@redhat.com>
Add size/alignment info to class diff report
* src/abg-comparison.cc (represent): Move these static overloads
to the beginning of the file.
(report_size_and_alignment_changes): New function. It has been
factorized out of ...
(type_decl_diff::report): ... this.
(class_diff::report): Use the new
report_size_and_alignment_changes to report size/alignment info
for classes.
2013-11-21 Dodji Seketeli <dodji@redhat.com>
Style fix
* src/abg-comparison.cc (class_diff::report): Rename first_class
into first and second_class into second.
2013-11-21 Dodji Seketeli <dodji@redhat.com>
Misc diff reporting nits
* include/abg-ir.h (type_decl::get_pretty_representation): New
overload.
* abg-ir.cc (type_decl::get_pretty_representation): Implement it.
* src/abg-comparison.cc (represent, class_diff::report): Quote the
pretty representation of abi artifacts in the report.
(type_decl_diff::report): Better wording to express type_decl
change.
2013-11-20 Dodji Seketeli <dodji@redhat.com>
Support reporting changed data member in class
* include/abg-ir.h (operator<<(std::ostream&, decl_base::binding))
(operator<<(std::ostream&, class_decl::access_specifier)): Declare
new streaming operators.
(class_decl::member_type::get_pretty_representation): New virtual
overload.
* src/abg-ir.cc (operator<<(std::ostream&, decl_base::binding)):
(operator<<(std::ostream&, class_decl::access_specifier)): Define
new streaming operators.
(class_decl::member_type::get_pretty_representation): Define new method.
* src/abg-comparison.cc (represent): Make the existing overloads
end by a newline. Add a new overload that represents the changes
that happened a given data member.
(enum diff_kind): New.
(report_mem_header): Renamed report_num_dels_or_ins into this.
Make it support introducing changed members as well as
deletions/insertions.
(class_diff::report): Adjust for the report_num_dels_or_ins ->
report_mem_header change. Use the new represent() overload to
report about changed data members. Adjust logic now that
represent() emits a newline at its end. Also adjust logic as far
as representing base classes and member types changes is
concerned.
(type_decl_diff::report): Remove useless white space.
2013-11-20 Dodji Seketeli <dodji@redhat.com>
Ensure that *::report adds just one empty line to its content
* include/abg-comparison.h (diff::report): Add a comment saying
that each the diff::report interface must leave one empty line at
the end of the report.
* src/abg-comparison.cc ({pointer_diff, reference_diff,
class_diff, scope_diff, function_decl_diff, type_decl_diff,
typedef_diff}::report): Leave just one
empty line after content.
2013-11-20 Dodji Seketeli <dodji@redhat.com>
Various doxygen doc additions and fixes
* include/abg-comparison.h: Lots of doc string additions & fixes,
especially for typedefs.
* include/abg-ir.h: Likewise.
* src/abg-comparison.cc: Likewise.
* src/abg-ir.cc: Likewise.
2013-11-20 Dodji Seketeli <dodji@redhat.com>
Better support changed base classes and member types
* include/abg-comparison.h (class_diff::{clear_lookup_tables,
lookup_tables_empty, ensure_lookup_tables_populated}): Declare new
methods.
(compute_diff): Make this a friend of class_diff.
* src/abg-comparison.cc (class_diff::priv::{deleted_bases_,
inserted_bases_, changed_bases_, deleted_member_types_,
inserted_member_types_, changed_member_types_,
deleted_data_members_, inserted_data_members_,
changed_data_members_, deleted_member_class_tmpls_,
inserted_member_class_tmpls_, changed_member_class_tmpls_}):
Define new members.
(class_diff::priv::{base_has_changed, member_type_has_changed,
data_member_has_changed}): Declare and define new methods.
(class_diff::{clear_lookup_tables, lookup_tables_empty,
ensure_lookup_tables_populated}): Define new methods.
(class_diff::report): Detect and report when a base class or a
member type has changed, as opposed to just saying that it has
been removed and inserted. Fix the rest of the function to avoid
emitting useless vertical space and avoid saying that the class
has "zero" insertion/deletion of a given kind of member.
(scope_diff::report): avoid saying that the scope has "zero"
insertion/deletion of a given kind of member. Avoid useless
vertical spaces.
(type_decl_diff::report): Avoid useless vertical spaces.
2013-11-19 Dodji Seketeli <dodji@redhat.com>
Add bilint tool to validate bi files somewhat.
* tools/bilint.cc: New file.
* tools/Makefile.am: Build and install the new file above.
2013-11-19 Dodji Seketeli <dodji@redhat.com>
Add diff support for typedef_decl and type_decl
* include/abg-ir.h (operator<<(std::ostream&,
decl_base::visibility)): Declare new streaming operator.
* src/abg-ir.cc (operator<<(std::ostream&,
decl_base::visibility)): Define it.
(type_decl::{operator==, get_pretty_representation}): Likewise,
define these new overloads.
(decl_base::{operator==, get_pretty_representation}): New overloads.
* include/abg-comparison.h (type_decl_diff type_decl_diff_sptr,
typedef_diff, typedef_diff_sptr): Declare new classes and
typedefs.
* src/abg-comparison.cc (type_decl_diff::{type_decl_diff,
first_type_decl, second_type_decl, length, report}): New methods
definitions.
(compute_diff): New function definition that takes pointers of
type_decl.
(typedef_diff::{typedef_diff, first_typedef_decl,
second_typedef_decl, underlying_type_diff, length, report}): New
methods.
(compute_diff): New function definition that takes pointers of
typedef_decl.
(try_to_diff_types): New template function, factorized out of ...
(compute_diff_for_types): ... this. Add support diffing type_decl
and typedef_decl.
(pointer_diff::report): Fix indentation of emitted report.
* tools/bidiff.cc (parse_command_line): Fix style.
2013-11-19 Dodji Seketeli <dodji@redhat.com>
Avoid missing member types while reading bi files
* include/abg-fwd.h (get_type_declaration): Declare function.
* include/abg-ir.h (class decl_base): Add class_decl as a friend.
This to be able to call decl_base::set_scope from class_decl.
(scope_decl::add_member_decl): Make this virtual protected, so
that it can be called (virtually) from e.g, class_decl.
(type_decl_sptr, typedef_decl_sptr): New convenience typedefs.
(class_decl::add_member_decl): New virtual overload for
scope_decl::add_member_decl.
(class_decl::{add_member_type, add_data_member,
add_member_function}): New overloads.
* src/abg-ir.cc (add_decl_to_scope): Benign style cleanup.
(get_type_declaration): Define new function.
(class_decl::add_member_decl): New method.
(class_decl::add_member_type): Avoid silently added a new member
type when that member type has already been (perhaps
inadvertently) added to a scope already. Rather, put a strict
assert in place there. Also add a new overload that constructs
the member type out of a classic type and adds it to the class.
(class_decl::{add_data_member, add_member_function}): Likewise.
(class_decl::{add_member_function_template,
add_member_class_template}): Avoid silently added a new member
template when that template has already been (perhaps
inadvertently) added to a scope already. Rather, put a strict
assert in place there.
* src/abg-reader.cc (push_decl_to_current_scope): Take a an extra
flag saying if the current decl should be added to the current
scope as well (in addition to being pushed onto the stack of
scopes maintained in the reader context).
(push_and_key_type_decl): Likewise, take that extra flag and pass
it to push_decl_to_current_scope.
(build_function_decl, build_var_decl, build_type_decl)
(build_qualified_type_decl, build_pointer_type_def)
(build_reference_type_def, build_enum_type_decl, build_typedef_decl)
(build_function_tdecl, build_class_tdecl): Likewise.
(build_class_decl): Likewise. When building member data, types,
and functions, make sure /not/ to add the data, type of function to
the current scope before adding it to the class_decl. This was
making the member not being added to the class because it already
had a scope.
(build_type_tparameter, build_type_composition)
(build_non_type_tparameter, build_template_tparameter)
(build_type): Adjust to add the template parm to the current scope
explicitly, like previously.
(handle_type_decl): Use build_type_decl function. Add the
type_decl to the current scope, like previously.
(handle_namespace_decl, handle_qualified_type_decl)
(handle_pointer_type_def, handle_reference_type_def)
(handle_enum_type_decl, handle_typedef_decl, handle_var_decl)
(handle_function_decl, handle_class_decl, handle_function_tdecl)
(handle_class_tdecl): Adjust to add the decl to the current scope,
like previously.
* tests/data/test-read-write/test21.xml: New test input with
member type(def).
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Avoid tabs and add const/virtual/offsets to class member diff reports
* include/abg-ir.h (class_decl::get_num_virtual_functions): New
declaration.
* src/abg-ir.cc (class_decl::get_num_virtual_functions): New
definition.
(function_decl::get_pretty_representation): Represent
destructors and const member functions.
* src/abg-writer.cc (write_cdtor_const_static): Take a new bool
parm for constness and serialize it.
(write_class_decl): Serialize member functions & function template
const-ness.
* src/abg-reader.cc (read_cdtor_const): Read the "const" xml
attribute, rather than "is_const".
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Fix num insertions reporting in member functions
* src/abg-comparison.cc (class_diff::report): Fix num insertions
reporting.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Serialize vtable offset for virtual functions
* include/abg-ir.h
(class_decl::member_function::get_vtable_offset): Renamed
class_decl::member_function::get_vtable_offset_in_bits into this.
The offset is an index into a table; it's not a value in bits.
* src/abg-hash.cc (class_decl::member_function::hash): Update wrt
function name change above.
* src/abg-ir.cc (class_decl::member_function::operator==):
Likewise.
* src/abg-reader.cc (build_class_decl): Rename the attribute
vtable-offset-in-bits into vtable-offset.
* src/abg-writer.cc (write_voffset): New function.
(write_class_decl): Use the new write_voffset. Cleanup.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
White space and style fixes
* include/abg-ir.h (class_decl::member_function::member_function):
Align function parameters.
* src/abg-ir.cc (type_decl::operator==): Remove useless white spaces
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Do not report added/removed type_decls
* src/abg-comparison.cc (scope_diff::report): Do not report
added/removed type_decls.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Fix string representation for variables and methods
* src/abg-ir.cc (var_decl::get_pretty_representation): Don't use
the pretty representation for the type of the variable; just use
its qualified name.
(method_type::set_class_type): I wonder what I was thinking when
setting the first parameter's type to being the type of the
class. Remove this.
(function_decl::get_pretty_representation): Use the "method "
prefix for methods. Avoid printing the first parameter of
methods. Use the qualified name of the parameter type, rather
than its pretty representation.
* src/abg-writer.cc (write_class_decl): Do not skip the first
function parameter when serializing the method.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Support reporting removed types/decls
* include/abg-comparison.h (scope_diff::{removed_types,
removed_decls, added_types, added_decls}): New accessor methods
declarations.
* src/abg-comparison.cc (scope_diff::{removed_types,
removed_decls, added_types, added_decls}): New accessor methods
definitions.
(scope_diff::report): Report removed & added types/decls.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Fix erratic reporting of changed types & decls in scopes
* src/abg-comparison.cc
(scope_diff::ensure_lookup_tables_populated): A changed type/decl
is not only one that has been both deleted and inserted (as is a
type/decl with a given name N has been deleted and a type/decl
with that same name N has been inserted), but we must also ensure
that both inserted and deleted type/decl are not the same.
Otherwise, it might has been a type/decl that has been shuffled
around.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Fix some class & scope diff reports formatting glitchs
* src/abg-comparison.cc (class_diff::report): Quote data members.
(scope_diff::report): Simplify how we report changed types. Avoid
unnecessary vertical spaces.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Pretty representation for variables and types by default
* include/abg-ir.h (var_decl::get_pretty_representation): New
method declaration.
* src/abg-ir.cc (decl_base::get_pretty_representation): Prefix
types with the "type " string.
(var_decl::get_pretty_representation): New method definition.
2013-10-24 Dodji Seketeli <dodji@redhat.com>
Re-write middle snakes management in core diff algorithms
* include/abg-diff-utils.h (point::set): New overload..
(point::{add, operator<, operator>, operator<=, operator>=}): New
methods.
(point::operator!=): Constify.
(point::operator==): Constify. Cleanup.
(point::operator=): Keep emptiness.
(class snake): New class definition
(d_path_vec::{over_bounds, offset}): New methods.
(d_path_vec::check_index_against_bound): Don't take a bound
parameter anymore. Use the new over_bound method above. Fix up
error reporting.
(d_path_vec::d_path_vec): Fix d_path_vec size allocation.
(d_path_vec::operator[]): Use the d_path_vec::at method to check
all accesses against the bounds. This is slower, but at least we
can expect to have something that is more robust. We can remove
the bound checking later when we are sure the code has been tested
enough. Also use the new offset() method.
(d_path_vec::at): Take long long.
(ends_of_furthest_d_paths_overlap): Constify input parameters.
(end_of_fr_d_path_in_k, end_of_frr_d_path_in_k_plus_delta): Take
an instance of the new snake in parameter, rather than a bare end
point that wasn't carrying enough information about the snake.
Record the snake which consists of up to four points: a begin
point, an intermediate point, a diagonal start point and an end
point. Return that snake upon successful completion.
(compute_middle_snake): Take an instance of snake, rather than the
two points that were supposed to represent a snake and with which
we were loosing information before. Revisit/simplify the logic of
this function; this literally goes forward or in reverse, gets the
resulting snake returned by the end_of_fr_d_path_in_k and
end_of_frr_d_path_in_k_plus_delta functions, detect if these snakes
overlap and just return the current snake. Much simpler. The
caller now gets a snake, which has much more information than the
previous snake approximation made of just two points. Bonus
point, this follows almost to the word, what the paper says.
(maybe_record_match_point, find_snake_start_point): Remove these
as there are not used by compute_middle_snake anymore.
(print_snake, ses_len): Update these to take/handle a snake.
(snake_end_points): New declaration.
(compute_diff): When we are getting an empty first sequence, this
means that we are inserting the second sequence *before* the
beginning of the first sequence; keep this information by setting
the insertion point index to -1, rather than zero. Update this to
get/handle snakes, rather than free points vaguely representing
snakes. Now that compute_middle_snake returns real snakes, handle
the information we are getting. Basically for edit scripts of
length equal to 1, as the snake carries all the necessary
information about the non-diagonal edge (as well as the diagonal
edges), we (can) now precisely update the current edit script (as
well as the longest common sub-sequence). For edit scripts of
length greater than 1, better at which points to divide the
problem and consequently, at which points to conquer it back --
better following The Paper to the letter.
(display_edit_script): Update this for the use of instances of
snake.
* src/abg-diff-utils.cc (ends_of_furthest_d_paths_overlap): Update
for constification of inputs.
(snake_end_points): Define new function.
(compute_middle_snake): Adapt for the taking an instance of snake.
* tests/test-diff2.cc (main): Update for using instances of snake.
* tests/test-core-diff.cc: Add new tests.
* tests/data/test-core-diff/report0.txt: Update for output
adaptation.
* tests/data/test-core-diff/report6.txt: Likewise.
* tests/data/test-core-diff/report7.txt: Likewise.
* tests/data/test-core-diff/report8.txt: New test data.
* tests/data/test-core-diff/report9.txt: Likewise.
* tests/data/test-core-diff/report10.txt: Likewise.
* tests/data/test-core-diff/report11.txt: Likewise.
* tests/data/test-core-diff/report12.txt: Likewise.
* tests/data/test-core-diff/report3.txt: Likewise.
2013-10-19 Dodji Seketeli <dodji@redhat.com>
Support diff/reporting for functions & better diff/report in general
* include/abg-ir.h ({decl_base, class_decl,
function_decl}::get_pretty_representation): New virtual member to
get a pretty string name for decls & types.
(class_decl::parameter): Add an index to the parameter type.
(class_decl::parameter::parameter): Update the constructor for the
change above.
(class_decl::parameter::{get_index, set_index}): Accessors for the
new index.
(class_decl::parameter::operator==): Take in account the index.
(function_type::append_parameter): Set the index of the parameter
here.
* include/abg-fwd.h (get_type_name): New declaration.
* src/abg-ir.cc (get_type_name): New definition.
({decl_base, function_decl,
class_decl}::get_pretty_representation): New implementations.
(method_type::set_class_type): Update this to set function
parameter's index by default.
(function_decl::append_parameters): Use the append_parameter
method from function_type.
* include/abg-comparison.h (class function_decl_diff): New type
declaration.
* src/abg-comparison.cc (compute_diff_for_decls, compute_diff):
New definitions.
({pointer_diff, class_diff, scope_diff}::report): Use the new
get_pretty_representation. Output a prettier report.
(function_decl_diff::priv): New type.
(function_decl_diff::{deleted_parameter_at, inserted_parameter_at,
ensure_lookup_tables_populated, function_decl_diff,
first_function_decl, second_function_decl, changed_parms,
removed_parms, added_parms, length, report}): New member function
definitions.
* src/abg-hash.cc (function_decl::parameter::hash): Update this to
take the index in account.
2013-10-19 Dodji Seketeli <dodji@redhat.com>
Misc style & white space fixes
* include/abg-fwd.h (is_global_scope, is_at_global_scope)
(is_at_class_scope, is_at_template_scope, is_template_parameter)
(is_type, is_var_decl, is_template_parm_composition_type)
(is_template_decl, is_function_template_pattern)
(add_decl_to_scope, get_global_scope, get_translation_unit):
Remove parameter names from declarations.
* include/abg-ir.h (decl_base::set_location): Remove useless white
space.
(struct type_shared_ptr_equal): Fix comment filling.
2013-10-16 Dodji Seketeli <dodji@redhat.com>
Avoid useless hashing during serialization
* src/abg-writer.cc (write_context::get_id_for_type): Avoid the
useless hashing incurred by the [] operator on the map, when we
already have the value we want.
2013-10-16 Dodji Seketeli <dodji@redhat.com>
Add more IR nodes dumping routines
* include/abg-fwd.h (dump): Declare 4 overloads for the dumping
routines.
* include/abg-ir.h (var_decl_sptr): New typedef.
* src/abg-writer.cc (dump(const decl_base_sptr)): Add comments.
(dump(const type_base_sptr)): New dumping routines.
(dump(const var_decl_sptr)): Likewise.
2013-10-16 Dodji Seketeli <dodji@redhat.com>
Fix IR node comparison bugs
* include/abg-ir.h (type_shared_ptr_equal::operator()): Fix thinko
in checking for the boolean value of the pointers to types.
* src/abg-ir.cc (type_decl::operator==(const decl_base&)): Do not
forget to compare the decl_base part of the type too.
(type_decl::operator==(const type_base&)): To ease maintenance,
re-use the equality operator that takes a decl_base.
(scope_type_decl::operator==(const type_base&)): Likewise.
(qualified_type_def::operator==(const type_base&)): Likewise.
(compare_function_types): New sub-routine to compare function
types. It fixes an infinite recursion when comparing two methods
of the same class.
(function_type::operator==(const type_base&)): Use the new
compare_function_types function.
(class_decl::operator==(const decl_base&)): Fix a thinko in the
first test of the function. Use a dedicated scope for each class
section comparison; that way, there won't be any chance to misuse
the variables pertaining to a different section. Fix the member
function sections; we were mistakenly using the variables for the
*data* section there.
(class_decl::operator==(const type_base&)): Re-use the operator
that takes a decl_base.
(class_decl::operator==(const class_decl&)): Don't remove
const-ness during the static cast.
(class_decl::member_function::operator==(const member_function&)):
Do not remove the reference from the static cast.
(class_decl::member_class_template::operator==(const
member_base&)): Likewise.
(type_tparameter::operator==(const template_parameter&)):
Likewise.
(template_tparameter::operator==(const template_parameter&)):
Likewise.
(function_tdecl::operator==(const template_decl&)): Likewise.
(class_tdecl::operator==(const template_decl&)): Likewise.
(class_tdecl::operator==(const class_tdecl&)): Likewise.
* tests/data/test-read-write/test12.xml: Update this because the
test now correctly considers two type template parameters at the
same index as being equivalent.
* tests/data/test-read-write/test13.xml: Likewise.
2013-10-16 Dodji Seketeli <dodji@redhat.com>
On going white space cleanups
* include/abg-ir.h: Remove useless white spaces.
* src/abg-ir.cc: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-writer.cc: Likewise.
2013-10-15 Dodji Seketeli <dodji@redhat.com>
Finish reporting about class_diff
* src/abg-comparison.cc (report_num_dels_or_ins): Factorize out
the header of each of inserted/deleted parts of the class into
this new function.
(class_diff::report): Use the new report_num_dels_or_ins. Cleanup
the code. Add support for reporting about member functions,
member function templates and member class templates.
2013-10-15 Dodji Seketeli <dodji@redhat.com>
White space cleanup in abg-ir.h
* include/abg-ir.h
(class_decl::member_function_template::member_function_template):
Remove useless white space.
2013-10-15 Dodji Seketeli <dodji@redhat.com>
Progress on diffing pointers, references and classes
* include/abg-comparison.h (diff::{first_subject,second_subject): Changed
first_scope/second_scope into these; so that this diff class now works on
stuff that are not scope. Changed the type of these to
decl_base_sptr
(diff::diff): Update for the change above.
(diff::{length, report}): New virtual pure methods.
(class pointer_diff, reference_diff): New classes declarations.
(compute_diff): New overloads for the new classes above. Make the
existing overloads take shared_pointers instead of references.
Also make them return shared pointers of the computed diff, rather
than just populating diff references passed in parameter.
(class class_diff): Renamed class class_decl_diff into this.
(report_changes): Change these functions into member functions.
* src/abg-comparison.cc (compute_diff_for_types): New static
function.
(pointer_diff::pointer_diff, pointer_diff::first_pointer)
(pointer_diff::second_pointer, pointer_diff::length)
(pointer_diff::underlying_type_diff)
(pointer_diff::underlying_type_diff, pointer_diff::report)
(pointer_diff::report, compute_diff)
(reference_diff::reference_diff, reference_diff::first_reference)
(reference_diff::second_reference)
(reference_diff::underlying_type_diff)
(reference_diff::underlying_type_diff, reference_diff::length)
(reference_diff::report, compute_diff): New functions.
(class_diff::class_diff, class_diff::length)
(class_diff::first_class_decl, class_diff::second_class_decl)
(class_diff::base_changes, class_diff::base_changes)
(class_diff::member_types_changes)
(class_diff::member_types_changes)
(class_diff::data_members_changes)
(class_diff::data_members_changes, class_diff::member_fns_changes)
(class_diff::member_fns_changes)
(class_diff::member_fn_tmpls_changes)
(class_diff::member_class_tmpls_changes)
Update wrt class_decl_diff -> class_diff renaming.
(class_diff::report): Make the report function be a member
function. Add an indentation parameter. Add support for member
types and data members.
(compute_diff): New overload for class_decl_sptr.
(scope_diff::first_scope, scope_diff::second_scope)
(scope_diff::length, scope_diff::report): New member functions.
(scope_diff::{deleted_member_at, inserted_member_at}): Update wrt
first_scope -> first_subject change.
(compute_diff): New overload for scope_decl_sptr.
(translation_unit_diff::report): Change the report function into
this member function.
(compute_diff): Change the overload for translation_unit to take a
translation_unit_sptr rather than a reference.
* tools/bidiff.cc (main): Update this wrt the change of the
signature of compute_diff.
2013-10-15 Dodji Seketeli <dodji@redhat.com>
Fix construction of class_decl::member_type
* include/abg-ir.h (class_decl::member_type::member_type): Remove
inline body from here.
* src/abg-ir.cc (class_decl::member_type::member_type): Move
implementation here. Also, properly set the name of the the
member_type at construction time.
2013-10-15 Dodji Seketeli <dodji@redhat.com>
Few typedef additions to abg-ir.h
* include/abg-ir.h (pointer_type_def_sptr)
(reference_type_def_sptr): New typedefs.
2013-10-11 Dodji Seketeli <dodji@redhat.com>
Add debugging routines for decl_base_sptr and translation_unit
* src/abg-writer.cc (dump): Add two version of this; on for
decl_base_sptr, one for translation_unit&.
2013-10-11 Dodji Seketeli <dodji@redhat.com>
Initial implementation of tu diffing & bidiff cmd line program
* include/abg-comparison.h (class translation_unit_diff): New type.
(compute_diff): Make this take class_decl&, rather than
class_decl_sptr. Add new overloads for scope_decl& and
translation_unit&.
(report_changes): New overload for scope_diff& and
translation_unit&.
* src/abg-comparison.cc (struct class_decl_diff::priv): New type.
(class class_decl_diff): Add comments to methods.
(class translation_unit_diff): Implement methods.
(compute_diff, report_changes): Implement the new overloads.
(scope_diff::ensure_lookup_tables_populated): Fix a thinko here.
* src/abg-ir.cc (is_var_decl): Add new predicate.
* tools/abg-tools-utils.h (file_exists, is_regular_file)
(check_file): Declare new functions.
* tools/abg-tools-utils.cc (get_stat, file_exists, check_file)
(is_regular_file): Define new functions.
(is_dir): Use the new get_stat.
* tools/bidiff.cc: New file.
* tools/Makefile.am: Add tools/bidiff.cc to the build system; make it
produce the bidiff tool.
2013-10-10 Dodji Seketeli <dodji@redhat.com>
Fix inheritance of operator== on decl_base and type_base
* include/abg-ir.h (*lots of descendants of decl_base, type_decl)
(template_decl, class_decl::member_base): Replace the previous classical
*::operator==(*&) with an overload of decl_base::operator==(const
decl_base&), type_base::operator==(const type_base),
template_decl::operator==(const template_decl&) or
class_decl::member_base::operator==(const
class_decl::member_base&). This makes the descendant operator be
the one called when a comparison involves references the parent
class.
* src/abg-ir.cc: Write the implementation of the above. Remove
the useless static_casts from the previous operator== code.
2013-10-10 Dodji Seketeli <dodji@redhat.com>
On going misc white spaces and style fixes
* include/abg-ir.h: Add author. Remove many useless white
spaces. Add missing end-of-class comments. Move function
declaration comments from here to their definition point.
* include/abg-fwd.h: Remove useless indentation. Also move
doxygen comments to *definition* points in src/abg-ir.cc.
* src/abg-ir.cc: Remove many useless white spaces. Move comments
from declaration points to here.
2013-10-06 Dodji Seketeli <dodji@redhat.com>
Fix middle snake determination & ses len computation for d == 1
* include/abg-diff-utils.h (compute_middle_snake): After the
overlap determination happened, finding the middle snake can
require keep on building the current path until the "end". The
end meaning reaching the max of D. And that max is (M + N)/2 + 1.
In the extreme cases were middle snake was on the very last step
(M + N) + 1, we were not finding the middle snake. Fix this.
(compute_diff): When d == 1 and the first edge on the edit graph
is a non-diagonal edge and when a_base != a_begin, we were failing
to properly initialize x,y to find that non-diagonal edge. Also
we were failing to correctly compute the size of the sequence.
Fix these.
* tests/test-core-diff.cc: Add a new regression test for the two
cases above.
* tests/data/test-core-diff/report7.txt: New reference data for
the new regression test.
2013-10-05 Dodji Seketeli <dodji@redhat.com>
Initial un-debugged implementation of scope diffing
* include/abg-comparison.h (class scope_diff): New type.
(compute_diff(scope_decl_sptr, scope_decl_sptr, scope_diff)): New
declaration.
(report_changes): New declaration.
* src/abg-comparison.cc (struct scope_diff::priv): Define.
(scope_diff::{clear_lookup_tables, lookup_tables_empty,
ensure_lookup_tables_populated, scope_diff, member_changes,
deleted_member_at, inserted_member_at, changed_types,
changed_decls}): Define these new member functions.
(compute_diff): Define.
* include/abg-ir.h (decl_base_sptr): New typedef.
(operator==(decl_base_sptr, decl_base_sptr)): Declare new
operator.
* src/abg-ir.cc (operator==(decl_base_sptr, decl_base_sptr)):
Define.
(scope_decl::{operator==, traverse}): Adjust for using vectors to
store scope members now, rather than lists.
(scope_decl::{declarations, scopes}): Make these types be vector.
This makes the members of a scopes be vector, rather than lists.
This enables them to be diffed.
2013-10-05 Dodji Seketeli <dodji@redhat.com>
Simplify & cleanup compute_diff core api
* include/abg-diff-utils.h (insertion::inserted_): Changed the
type of this from vector<int> to vector<unsigned>.
(insertion::{insertion, inserted_indexes}): Adjust.
(compute_diff): Add two new simpler overloads. Implement them in
term of the former more complex overload.
(compute_lcs): Adjust for the vector<int> -> vector<unsigned>
change.
* src/abg-diff-utils.cc (compute_lcs, compute_ses): Adjust for the
compute_diff change above.
* src/abg-comparison.cc (compute_diff, report_changes): Adjust for
the compute_diff & vector<unsigned> changes above..
2013-10-05 Dodji Seketeli <dodji@redhat.com>
Misc white space, style and comments cleanup
* include/abg-ir.h (class scope_decl): Add end of class comment.
(class type_base): Add a _sptr typedef and end of class comment.
* src/abg-ir.cc (operator==(class_decl_sptr, class_decl_sptr)):
Fix comment.
2013-10-04 Dodji Seketeli <dodji@redhat.com>
Un-debugged initial implementation of class diffing.
* include/abg-ir.h (decl_base::get_qualified_name): New
declaration.
(class_decl::{base_specs, member_types, data_members,
member_functions, member_function_templates,
member_class_templates}): Make all these containers be vectors,
rather than list. This makes these containers (like
class_decl::base_specs, class_decl::member_types, etc) be suitable
to be used by the core diffing algorithms to diff their content.
(operator==(class_decl_sptr, class_decl_sptr))
(operator==(class_decl::member_type_sptr, class_decl::member_type_sptr))
(operator==(class_decl::base_spec_sptr,
class_decl::base_spec_sptr))
(operator==(class_decl::data_member_sptr,
class_decl::data_member_sptr))
(operator==(class_decl::member_function_sptr,
class_decl::member_function_sptr))
(operator==(class_decl::member_function_template_sptr,
class_decl::member_function_template_sptr))
(operator==(class_decl::member_class_template_sptr,
class_decl::member_class_template_sptr)): Declare
these new equality operators. These are to be used by the core
diffing algorithms when comparing two vectors of shared pointers
of members of class_decls.
* src/abg-ir.cc (decl_base::get_qualified_name): Define.
(class_decl::class_decl, class_decl::operator==(class_decl&)): Adjust for the
containers type change to a vector.
(operator==(class_decl_sptr, class_decl_sptr))
(operator==(class_decl::member_type_sptr, class_decl::member_type_sptr))
(operator==(class_decl::base_spec_sptr,
class_decl::base_spec_sptr))
(operator==(class_decl::data_member_sptr,
class_decl::data_member_sptr))
(operator==(class_decl::member_function_sptr,
class_decl::member_function_sptr))
(operator==(class_decl::member_function_template_sptr,
class_decl::member_function_template_sptr))
(operator==(class_decl::member_class_template_sptr,
class_decl::member_class_template_sptr)): Define
these.
* include/abg-comparison.h (diff::scope_): Remove
(diff::{first_scope_, second_scope_}): New members.
(class_decl_diff::class_decl_diff): Pass the new scopes to this
constructor.
(class_decl_diff::{first_class_decl, second_class_decl})
(report_changes): New declarations.
* src/abg-comparison.cc (class_decl_diff::class_decl_diff): Update
as per the declaration.
(class_decl_diff::{first_class_decl, second_class_decl}): Define
as per the declaration.
(compute_diff): Initial implementation for this.
(report_changes): Define.
2013-10-04 Dodji Seketeli <dodji@redhat.com>
Change the diff::changes_type back to just edit_script
* include/abg-comparison.h (diff::changes_type):
Remove this typedef.
(class_decl_diff::data_members_changes): Rename
class_decl_diff::data_member_changes into this.
(class_decl_diff::member_fn_tmpls_changes): Renamed
class_decl_diff::member_fn_tmpl_changes into this.
(class_decl_diff::member_class_tmpls_changes): Renamed
class_decl_diff::member_class_tmpl_changes into this.
(class_decl_diff::{base_changes, member_types_changes,
data_members_changes, member_fns_changes, member_fn_tmpls_changes,
member_fn_tmpls_changes, member_class_tmpls_changes}): Adjust
these declarations for the use of edit_script.
* src/abg-comparison.cc (class_decl_diff::priv::*): Likewise.
(class_decl_diff::{base_changes, member_types_changes,
data_members_changes, member_fns_changes, member_fn_tmpls_changes,
member_fn_tmpls_changes, member_class_tmpls_changes}): Adjust
these definitions for the above.
2013-10-04 Dodji Seketeli <dodji@redhat.com>
Misc white space, style and comment fixes
* include/abg-ir.h: Lots of useless white space removals and
comments adding.
(class class_decl::member_base): Fix comment.
* src/abg-hash.cc: Lots of useless white space removals too.
* src/abg-ir.cc: Remove useless white space too.
2013-10-04 Dodji Seketeli <dodji@redhat.com>
Fix middle snake determination
* include/abg-diff-utils.h (point::{operator!=,operator==}): New
operators.
(end_of_fr_d_path_in_k, end_of_frr_d_path_in_k_plus_delta): Allow
the initial point (-1,-1) that is not a point addressing elements
of the input sequences, but that is the starting point of the
forward paths and the ending point of reverse paths in the "Linear
Refinement" of the algorithm.
(is_match_point, maybe_record_match_point)
(find_snake_start_point): New functions.
(find_last_snake_in_path): Remove this. It's not used anymore.
(compute_middle_snake): Allow checking for overlapping paths even
on points that are outside of the edit graph boundaries. Once the
overlap is detected, if a non-empty snake has been seen already,
report it as the middle snake. Otherwise, keep building the path
until the end and report the last snake encountered as the middle
snake. Add comments.
(compute_diff): For the d == 1 case, fix the logic of the finding
the non-diagonal edge. Fix typos. Add comments.
(display_edit_script): Fix report glitches.
* tests/data/test-core-diff/report3.txt: Update as per the report
glitch above.
* tests/data/test-core-diff/report4.txt: Likewise.
* tests/data/test-core-diff/report5.txt: Likewise.
* tests/data/test-core-diff/report6.txt: New reference report for
a new test.
* tests/test-core-diff.cc: Add a new test for negative delta.
2013-10-03 Dodji Seketeli <dodji@redhat.com>
Initial regression test facility for core diff algorithms
* tests/data/test-core-diff/report0.txt: New test reference data.
* tests/data/test-core-diff/report1.txt: Likewise.
* tests/data/test-core-diff/report2.txt: Likewise.
* tests/data/test-core-diff/report3.txt: Likewise.
* tests/data/test-core-diff/report4.txt: Likewise.
* tests/data/test-core-diff/report5.txt: Likewise.
* tests/test-core-diff.cc: New regression test program.
* tests/Makefile.am: Add these new files to the build system.
2013-10-02 Dodji Seketeli <dodji@redhat.com>
Initial command line testing facility for core diff algorithms
* tests/test-diff2.cc: New command line testing facility.
* tests/Makefile.am: Add this to the build system.
2013-10-02 Dodji Seketeli <dodji@redhat.com>
Fix core diff algorithms for negative deltas
* diff2.h (point::point): New copy constructor.
(point::{operator+=, operator=}): Use point::set.
(point::{operator--, operator++,}): New operators.
(d_path_vec::{a_size_, b_size_}): New members.
(d_path_vec::max_d_): Remove this member.
(d_path_vec::max_d): Compute this, now that max_d_ was removed.
(point_is_valid_in_graph): Declare this new function.
(end_of_fr_d_path_in_k, ): Return
a bool when the end of furthest reaching past found is within the
bounds of the edit graph. Add comments.
(end_of_frr_d_path_in_k_plus_delta): Likewise. Also, delta can be
negative; support that. Do not cross the boundaries of the edit
graph when following a diagonal edge.
(find_last_snake_in_path): New function.
(compute_middle_snake): Make forward/reverse d_path_vec be big
enough to hold paths for M+N differences. Normally M+N/2 should
be enough, but we were getting weird out of bound errors. Let's
handle it this way for now. Do not require that we check for
overlap only when we are on a diagonal edge. Once we detected an
overlap, use the new find_last_snake_in_path to find the
boundaries of the snake.
(ses_len): Delta can be negative.
(display_edit): Small minor English nit.
2013-09-28 Dodji Seketeli <dodji@redhat.com>
Lay down the foundations of computing the diff between two class_decl
* include/abg-diff-utils.h: New file.
* src/abg-diff-utils.cc: Likewise. Implement the code diffing
algorithms from Eugene Myers.
* include/abg-comparison.h: New file. First short at defining the
basic APIs to compute the diff of two classes.
* src/abg-comparison.cc: New file. Start the implementation of
the above header.
2013-09-26 Dodji Seketeli <dodji@redhat.com>
Prepare node visitors to be usable on things other than IR nodes
* include/abg-fwd.h (node_visitor_base): Renamed ir_node_visitor
into this.
* include/abg-traverse.h (struct node_visitor_base): New base for
the visitors.
(struct traversable_base): Update comments.
(traversable_base::traverse): Change this into non-pure virtual.
Make it take a reference to node_visitor_base, rather than a
reference to ir_node_visitor.
* src/abg-traverse.cc (traversable_base::traverse): New empty
default implementation.
* include/abg-ir.h: Make ir_node_visitor inherit from new
node_visitor_base.
2013-09-26 Dodji Seketeli <dodji@redhat.com>
Renamed data members from m_something to something_
* src/abg-ir.{cc,h}: Renamed data members from m_something to
something_ and update their usage.
2013-08-29 Dodji Seketeli <dodji@redhat.com>
Initial version of an archive manipulation program: biar
* tests/test-utils.h (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): Move these directories manipulation
utilities from here to ...
* tools/abg-tools-utils.h (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): ... here in this new file.
(dir_name, base_name): Declare these new functions.
* tests/test-utils.cc (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): Likewise, move these to ...
* tools/abg-tools-utils.cc (is_dir, ensure_dir_path_created)
(ensure_parent_dir_created): ... here in this new file.
(dir_name, base_name): Define these.
* tools/Makefile.am: New file. Create a new libtoolsutils.la
static library with stuff from tools/abg-tools-utils.cc in it.
Also create a new 'biar' program with the stuff from the new
tools/biar.cc in it.
* tools/biar.cc: New file. Contains the code for the new "biar"
archive manipulation command line utility.
* tests/test-read-write.cc (main): Adjust for the change about
ensure_parent_dir_created above.
* tests/test-write-read-archive.cc (main): Likewise.
* Makefile.am (SUBDIRS): Add the new tools/ sub-directory to the
build system.
* configure.ac (AC_CONFIG_FILES): Generate tools/Makefile.
* tests/Makefile.am: Make libtestutils.la link with the new
libtoolsutils.la. Make sure to express the dependencies between
libtestutils.la and the binaries that depend on it. Otherwise
parallel builds can go awry.
2013-08-29 Dodji Seketeli <dodji@redhat.com>
Define translation_unit{_sptr,s} types in abigail::
* include/abg-corpus.h (abigail::corpus::{translation_unit_sptr,
translation_units): Do not define these typedefs here. Rather)
(define them ...
* include/abg-ir.h
(abigail::{translation_units,translation_unit_sptr): ... here.
This is because a translation unit can be manipulated
independently from an abi corpus.
* src/abg-corpus.cc (corpus::get_translation_units): Adjust return
type to comply with the change above.
2013-08-29 Dodji Seketeli <dodji@redhat.com>
Fix header inclusion in abg-corpus.h
* include/abg-corpus.h: Drop incomplete abg-traverse.h and
abg-fwd.h. Use abg-ir.h proper and be done with it. Users of the
library will just have to use abg-corpus.h to manipulate and the
archives and the IR they contain.
2013-08-29 Dodji Seketeli <dodji@redhat.com>
Add error message to translation_unit::write
* src/abg-writer.cc (translation_unit::write): Add an error
message to stderr if something ultimately went wrong.
2013-08-29 Dodji Seketeli <dodji@redhat.com>
Rename abigail::corpus::{get_file_path --> get_path}
* include/abg-corpus.h (corpus::{get_path, set_path): Renamed
corpus::get_file_path and corpus::set_file_path into these as
get_path/set_path is what is used elsewhere as well.
* src/abg-corpus.cc (corpus::{get_path, set_path}): Likewise.
* tests/test-write-read-archive.cc (main): Adjust for the change
above.
2013-08-29 Dodji Seketeli <dodji@redhat.com>
Cleanup src/Makefile.am
* src/Makefile.am: Fix library naming and remove useless trailing
space from directory path.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Initial writing/reading of an ABI corpus to an archive
* configure.ac: Support detection of libzip dependency. Define
new DEPS_CFLAGS and DEPS_LIBS variables for use in
Makefile.am to refer to the dependency headers and
libraries.
* doc/website/mainpage.txt: Update this to talk about the new
libzip dependency.
* include/Makefile.am: Add abg-libzip-utils.h to the build system.
* include/abg-corpus.h (corps): Hide abigail::corpus's private behind a
pimpl idiom.
(corpus::{drop_translation_units, get_file_path, set_file_path,
write, read}): New methods.
* include/abg-libxml-utils.h (new_reader_from_buffer): Declare new
function.
* include/abg-libzip-utils.h: New file.
* src/Makefile.am: Add abg-corpus.cc and abg-libzip-utils.cc to
the build system. Refer to the library and headers dependencies
via the new DEPS_LIBS and DEPS_CFLAGS variables.
* src/abg-corpus.cc: New file.
* src/abg-ir.cc (translation::set_path): New method.
* src/abg-libxml-utils.cc (new_reader_from_buffer): Define new
function.
* src/abg-libzip-utils.cc: New file.
* src/abg-reader.cc (translation_unit::read): New overload.
* src/abg-writer.cc: Inject the names from the std namespace into
the abigail namespace, rather than into abigail::writer.
(abigail::translation_unit::write): New overload. This can now
use ofstream and the other stuff from std that are injected in the
abigail:: namespace.
* tests/Makefile.am: Add tests/test-write-read-archive.cc to the
build system; use that to build runtestwritereadarchive. Also add
the input test data from
tests/data/test-write-read-archive/test[0-4].xml.
* /tests/data/test-write-read-archive/test[0-4].xml: New test
input data files.
* tests/test-write-read-archive.cc: New test for this archive
write/read support.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Fix & add missing API documentation
* src/abg-ir.cc (location_manager::create_new_location): Fix
documentation comment. (translation_unit::translation_unit)
(translation_uni::get_global_scope, translation_unit::get_path)
(translation_unit::traverse, translation_unit::get_loc_mgr)
(translation_unit::is_empty, translation_unit::traverse): Add
missing documentation comments.
* src/abg-libxml-utils.cc (new_reader_from_file): Fix comment.
* src/abg-reader.cc (translation_unit::read): Likewise.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Remove useless header inclusion
* include/abg-traverse.h: Remove useless #include <tr1/memory>
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Misc white space cleanups
* include/abg-corpus.h: Cleanup white spaces.
* include/abg-fwd.h: Likewise.
* include/abg-ir.h: Likewise.
* include/abg-libxml-utils.h: Likewise.
* src/abg-config.cc: Likewise.
* src/abg-ir.cc: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-writer.cc: Likewise.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Small cleanup in abg-config.cc
* src/abg-config.cc: Include auto-generated
$(top_builddir)/config.h file.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Pass absolute paths to the compiler during the build
* src/Makefile.am: Pass absolute file paths to the compiler during
the build. This helps in e.g in emacs' compilation mode, when the
output shows an error reported by GCC's diagnostics, setting point
to the error line and hitting 'enter' transports the user to the
file location where the error happened; as the file path is nows
absolute, emacs can always find it. Otherwise, finding it depends
on $PWD and whatnot.
* tests/Makefile.am: Likewise.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Misc cleanups in abg-fwd.h
* include/abg-fwd.h: Move location, location_manager and
translation_unit in the ir section. Remove stuff that was
commented out anyway.
2013-08-27 Dodji Seketeli <dodji@redhat.com>
Move location, location_manager & translation_unit back into abg-ir.h
* include/abg-corpus.h: Move location location_manager,
translation_unit from here ...
* include/abg-ir.h: ... to here. The reason being that these are
really constructs of the Internal Representation of the ABI/API of
a translation unit. What is left in abg-corpus is really
exclusively related to an ABI Corpus, which I see more as a
"packaging" construct that abstracts the bundling of several
translation units together. Also, I fixed some comments about the
location/location_manger types; now a location is made specific to
a translation unit; to an abi corpus. A location of a given
translation unit has to be decoded by the location manager of that
same translation unit.
2013-08-22 Dodji Seketeli <dodji@redhat.com>
Make libxml2 a private dependency wrt pkconfig
* libabigail.pc.in: Libxml2 is not exposed to clients so make it
be a private dependency.
2013-08-22 Dodji Seketeli <dodji@redhat.com>
White space fix in COMPILING
* COMPILING: White space fix.
2013-08-22 Dodji Seketeli <dodji@redhat.com>
Add abg-version.h.in to the source distribution & cleanup
* include/Makefile.am: Add abg-version.h.in to the source
distribution.
* configure.ac: Generate abg-version.h in using the existing
AC_CONFIG_FILES macro call.
2013-08-22 Dodji Seketeli <dodji@redhat.com>
Support pkgconfig through a new libabigail.pc file
* libabigail.pc.in: New pkgconfig file.
* configure.ac: Define the LIBXML2_VERSION variable that is used
in the libabigail.pc.in file. Generate the libabigail.pc file
from its libabigail.pc.in template.
* Makefile.am: Add libabigail.pc.in to the source distribution.
Install the generated libabigail.pc to the right destination.
2013-08-21 Dodji Seketeli <dodji@redhat.com>
Tweak the apidoc mainpage
* include/abg-fwd.h<doxygen markup>: Fix link to the project web
page and for git check-out.
2013-08-21 Dodji Seketeli <dodji@redhat.com>
Initial website generation-fu using Doxygen
* doc/website/mainpage.txt: New file representing the input for
the website.
* doc/website/libabigail-website.doxy: New file representing the
doxygen configuration for the website generation.
* doc/api/libabigail.doxy: Output doxygen generation warnings into
a file.
* doc/Makefile.am: Support generating the website from doxygen.
Update the api generation relevant macros names for better
consistency. Make "make html" generate the website too. Make
"make clean" erase the website bits too. Add a 'website'
target to make the website.
2013-08-21 Dodji Seketeli <dodji@redhat.com>
Fix typo in CONTRIBUTING file
* CONTRIBUTING: Fix typo, courtesy of Mark Wielaard.
2013-08-19 Dodji Seketeli <dodji@redhat.com>
Remove autotools-generated files
* Makefile.in: Remove this autotools-generated file. I know that
people in the GCC-realm like storing these autotools-generated
files into the source control system, but I believe in this day
and age, this is annoying (to say the least) for the project
developers for no good reason. Requiring (the ubiquitous)
autoconf for building from source is no big deal today, and typing
"autoreconf" is not hard to do, really. And it saves the
developers for having to update a bunch of boilerplate
automatically generated files into the source control system; this
is really unnecessary noise and it is a commonly accepted good
practice to avoid doing it these days. To help people who do not
know how to handle this, there is a COMPILING file in the source
tree that explains how to build the project from sources.
* aclocal.m4: Likewise.
* configure: Likewise.
* include/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* doc/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
2013-08-19 Dodji Seketeli <dodji@redhat.com>
Add a new COMPILING file explaining how to build the package
* COMPILING: New file.
2013-08-14 Dodji Seketeli <dodji@redhat.com>
Remove name of unused parameter in decl_base::traverse.
* src/abg-ir.c (decl_base::traverse): Remove name of unused parameter.
2013-08-14 Dodji Seketeli <dodji@redhat.com>
install headers in $includedir/libabigail
* include/Makefile.am: Install headers in $includedir/libabigail
2013-08-14 Dodji Seketeli <dodji@redhat.com>
For usage from within GCC set header path to $includedir/libabigail
* abigail.m4: The include path used for compilation goes to
$includedir/libabigail.
2013-08-08 Benjamin Kosnik <bkoz@redhat.com>
Separate out bits from the ir header.
* include/abg-irfwd.h: Move to...
* include/abg-fwd.h: ...this.
* include/abg-ir.h (traverse_base): Move to...
* include/abg-traverse.h: ...here. New.
* include/abg-ir.h (location, location_manager, translation_unit):
Move to...
* include/abg-corpus.h: ...here.
* include/Makefile.am: Adjust.
* include/Makefile.in: Regenerate.
2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
Template naming compression.
* include/abg-ir.h: Template naming compressions.
(class_template_decl): To class_tdecl.
(function_template_decl): To function_tdecl.
(template_type_parameter): To type_tparameter.
(template_non_type_parameter): To non_type_tparameter.
(template_template_parameter): To template_tparameter.
(tmpl_parm_type_composition): To type_composition.
* include/abg-irfwd.h: Same.
* src/abg-hash.cc: Same.
* src/abg-ir.cc: Same.
* src/abg-reader.cc: Same.
2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
Slight change to doxy config.
* doc/api/libabigail.doxy: Turn off namespace scopes, on all the viz.
2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
Move class_decl nested types out-of-line.
* include/abg-ir.h (class_decl): Move nested types out of line.
2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
Rename class_decl::method to class_decl::method_base.
* include/abg-ir.h (class_decl::member): To member_base.
* src/abg-hash.cc: Same.
* src/abg-ir.cc: Same.
* src/abg-writer.cc: Same.
2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
Nest hashers.
* include/abg-ir.h: Nest all hashers.
* include/abg-irfwd.h (abigail): Don't inject std::tr1::hash.
Remove hasher forward declarations.
* include/abg-hash.h: Tweak.
* src/abg-hash.cc: Define hashers here.
* src/abg-ir.cc: Adjust for above.
* src/abg-reader.cc: Same.
* src/abg-writer.cc: Same.
2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
Rename abi_corpus to corpus
* include/abg-corpus.h (abi_corpus): Change to corpus.
* include/abg-hash.h: Tweaks.
* include/abg-libxml-utils.h: Same.
2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
Simplify interface for serializing/deserializing translation_units.
* include/abg-ir.h (translation_unit::read): New member function.
(translation_unit::write): Same.
* src/abg-reader.cc (translation_unit::read): Define.
* src/abg-writer.cc (translation_unit::write): Define.
* include/abg-reader.h: Remove.
* include/abg-writer.h: Remove.
* include/Makefile.am (headers): Same.
* include/Makefile.in: Regenerate.
2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
First pass clean reading API.
* include/abg-reader.h (read_file): Remove extraneous file parameter.
* src/abg-reader.cc: Same.
* tests/test-read-write.cc: Adjust.
2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
Rename traversable to traversable_base, move up the _decl hierarchy via decl_base derivation.
* include/abg-ir.h (traversable): To traversable_base.
(decl_base): Inherit from traversable_base.
(decl_base::traverse): Null definition.
(function_decl, etc.): Remove traversable_base as base class.
2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
Standardize typedef naming. Plural form is the container form, smart_ptr types are type + _sptr.
* include/abg-ir.h (scope_decl): Add declarations, scopes as types.
(function_type): Add parameter_sptr, parameters as types.
(enum_type_decl): Add type_sptr, enumerators as types.
(class_decl): Adjust typedefs for consistency. Change
base_specs_type to base_specs, member_types_type to member_types,
data_members_type to data_members, member_functions_type to
member_functions, member_function_templates_type to
member_function_templates, member_class_templates_type to
member_class_templates.
2013-08-02 Benjamin Kosnik <bkoz@redhat.com>
Doxygen markup fixes final.
* include/abg-config.h: Doxygen cleanups round two.
* include/abg-hash.h: Same.
* include/abg-ir.h: Same.
* include/abg-irfwd.h: Same.
* include/abg-libxml-utils.h: Same.
* src/abg-config.cc: Same.
* src/abg-hash.cc: Same.
* src/abg-ir.cc: Same.
* src/abg-reader.cc: Same.
* src/abg-writer.cc: Same.
2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
Forward decls for abg-ir.h, doxygen fixups, restyle.
* include/abg-irfwd.h: New file for forward declarations.
* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/*: Forward declare, doxygen fixups, restyle.
* src/*: Same.
* src/abg-corpus.cc: Empty, removed.
* doc/api/libabigail.doxy: Tweak.
2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
Add virtual dtor to translation_unit.
* include/abg-ir.h (translation_unit): Add virtual dtor.
* src/abg-ir.cc: Define.
2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
Adjust doxygen input path.
* doc/api/libabigail.doxy: Adjust include directory.
2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
Collapse subdir of include to include.
* include/libabigail/abg-*.h: Move to...
* include/abg-*.h
* include/libabigail: Remove.
* configure.ac: Adjust include location from libabigail/include to
include.
* Makefile.in: Same.
* aclocal.m4: Same.
* configure: Same.
* doc/Makefile.in: Same.
* include/Makefile.am: Same.
* src/Makefile.am: Same.
* src/Makefile.in: Same.
* tests/Makefile.am: Same.
* tests/Makefile.in: Same.
2013-07-23 Dodji Seketeli <dodji@seketeli.org>
Update autotool auto-generated files
* Makefile.in: Updated.
* aclocal.m4: Likewise.
* configure: Likewise.
* doc/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
2013-07-20 Dodji Seketeli <dodji@seketeli.org>
Implement a translation unit traversal API
* include/libabigail/abg-ir.h (struct ir_node_visitor, struct
traversable): New interfaces.
(translation_unit, scope_decl, type_decl, qualified_type_def)
(pointer_type_def, reference_type_def, enum_type_decl)
(typedef_decl, var_decl, function_decl, data_member)
(member_function, member_function_template)
(member_class_template): Implement the traversable interface,
overload the traversable::traverse pure virtual function.
* src/abg-ir.cc ({translation_unit, scope_decl, type_decl,
namespace_decl, qualified_type_def, pointer_type_def,
reference_type_def, enum_type_decl, typedef_decl, var_decl,
function_decl, class_decl::member_function, class_decl,
class_decl::data_member, class_decl::member_function_template,
class_decl::member_class_template, function_template_decl,
class_template_decl, }::traverse): Implement traversal.
(ir_node_visitor::visit): New method, overloaded for the types
above, which implement the traversable interface.
* tests/test-walker.cc: New test case program to showcase how to
use the new traversal API.
* tests/makefile.am: Add test-walker.cc to the build system.
2013-07-19 Dodji Seketeli <dodji@seketeli.org>
By default, statically link libabigail with whoever uses abigail.m4
* abigail.m4: Make $abigaillibs statically link libabigail by default.
2013-07-19 Dodji Seketeli <dodji@seketeli.org>
Move static member definition to abg-viz-dot.cc file
* include/libabigail/abg-viz-dot.h: Move definition of
node_base::_M_count_total to ...
* src/abg-viz-dot.cc: ... here.
2013-07-19 Dodji Seketeli <dodji@seketeli.org>
Put headers in include/libabigail
* include/libabigail: New directory.
* include/Makefile.am: New file.
* include/libabigail/Makefile.am: New file.
* src/abg-*.h: Move these in include/libabigail/*.h
* src/Makefile.am: Set -I option to look for headers in include/libabigail
* doc/api/libabigail.doxy: Look for headers in include/libabigail
* tests/Makefile.am: Set -I option to look for headers in include/libabigail
* abigail.m4: Set includedir to $prefix/include/libabigail for
library used as a dep, or to srcdir/libabigail/include/libabigail
in GCC source tree.
* configure.ac: Add Makefile.am in include and include/libabigail
* abigail.m4: Look for headers in include/libabigail when the
libabigail is in in the source tree and in $incdir/libabigail when
it is installed as a dependency.
2013-07-18 Benjamin Kosnik <bkoz@redhat.com>
Install into docdir, turn off collaboration graphs.
* doc/Makefile.am (doc-install-html-doxygen): Install generated
files into docdir.
* doc/api/libabigail.doxy (COLLABORATION_GRAPH): Turn off.
2013-07-18 Benjamin Kosnik <bkoz@redhat.com>
Fix dependencies for api/html output directory.
* doc/Makefile.am: Create abi output directory.
2013-07-16 Dodji Seketeli <dodji@seketeli.org>
Prepare for publishing
* COMMIT-LOG-GUIDELINES: New file.
* CONTRIBUTING: New file.
* README: Amended to refer to the first files above.
2013-07-16 Dodji Seketeli <dodji@seketeli.org>
LGPLv3 License the library
* COPYING-LGPLV3: New file.
* abg-config.cc: License the file to LGPLv3.
* abg-config.h: Likewise.
* abg-corpus.cc: Likewise.
* abg-corpus.h: Likewise.
* abg-hash.cc: Likewise.
* abg-hash.h: Likewise.
* abg-ir.cc: Likewise.
* abg-ir.h: Likewise.
* abg-libxml-utils.cc: Likewise.
* abg-libxml-utils.h: Likewise.
* abg-reader.cc: Likewise.
* abg-reader.h: Likewise.
* abg-writer.cc: Likewise.
* abg-writer.h: Likewise.
* src/abg-viz-common.cc: Likewise.
* src/abg-viz-common.h: Likewise.
* src/abg-viz-dot.cc: Likewise.
* src/abg-viz-dot.h: Likewise.
* src/abg-viz-svg.cc: Likewise.
* src/abg-viz-svg.h: Likewise.
* tests/test-read-write.cc: Likewise.
* tests/test-utils.cc: Likewise.
* tests/test-utils.h: Likewise.
2013-07-17 Dodji Seketeli <dodji@seketeli.org>
Add assert.h in abg-ir.cc
* src/abg-ir.cc: Add missing assert.h
2013-07-17 Dodji Seketeli <dodji@seketeli.org>
Fix missing license blurbs
* src/abg-config.cc: Fix licensing blurb.
* src/abg-config.h: Likewise.
* src/abg-corpus.cc: Likewise.
* src/abg-corpus.h: Likewise.
* src/abg-ir.cc: Likewise.
* src/abg-ir.h: Likewise.
* src/abg-reader.cc: Likewise.
* src/abg-writer.cc: Likewise.
2013-07-02 Benjamin Kosnik <bkoz@redhat.com>
Correct DOT merge.
* src/abg-viz-common.h: Use _M_attributes for attribute overflows.
* src/abg-viz-dot.h: Merge in correct node_base.
* src/abg-viz-dot.cc: Same.
* tests/test-dot.cc: Correct examples.
* tests/Makefile.am: Add .gv to CLEANFILES.
* tests/Makefile.in: Regenerate.
2013-07-02 Benjamin Kosnik <bkoz@redhat.com>
Pull out common style type.
* src/abg-viz-common.h: Pull out common style type.
* src/abg-viz-dot.cc: Adjust scoping.
* src/abg-viz-common.cc: Same.
* src/abg-viz-dot.h: Use common style class.
* src/abg-viz-svg.h: Same.
2013-07-02 Benjamin Kosnik <bkoz@redhat.com>
Commonize visualization support.
* src/abg-viz-svg.h: Move common code to...
* src/abg-viz-dot.h: Move common code to...
* src/abg-viz-common.h: ...here. New.
* src/abg-viz-svg.cc: Move common code to...
* src/abg-viz-common.cc: ...here. New.
* src/Makefile.am: Add abg-viz-common.cc, abg-viz-common.h
* src/Makefile.in: Regenerate.
2013-07-01 Benjamin Kosnik <bkoz@redhat.com>
Initial DOT work.
* doc/vizualization/layout/scripts/
(inkscape_export_svg_to_plain_svg.sh): Move...
(inkscape_export_svg_to_png_and_pdf.sh): Move...
* scripts: ..here. New toplevel directory.
* scripts/scripts/dot_to_png.sh: New.
* scripts/scripts/dot_to_svg.sh: New.
* src/Makefile.am: Add abg-viz-dot.cc, abg-viz-dot.h.
* tests/Makefile.am: Add test-dot.cc.
* src/abg-viz-dot.cc: New.
* src/abg-viz-dot.h: New.
* tests/test-dot.cc: New.
* doc/vizualization/graph: New.
* doc/vizualization/graph/gv/sa-A.gv: New.
* doc/vizualization/graph/gv/sa-B.gv: New.
* doc/vizualization/graph/gv/sa-C1.gv: New.
* doc/vizualization/graph/gv/sa-C2.gv: New.
* doc/vizualization/graph/gv/sa-C3.gv: New.
* doc/vizualization/graph/gv/sa-C4.gv: New.
* doc/vizualization/graph/gv/sa-D1.gv: New.
* doc/vizualization/graph/gv/sa-D2.gv: New.
* doc/vizualization/graph/gv/sa-D2v.gv: New.
* doc/vizualization/graph/gv/sa-D3.gv: New.
* doc/vizualization/graph/gv/sa-D3v.gv: New.
* doc/vizualization/graph/gv/sa-D4v.gv: New.
* doc/vizualization/graph/gv/sa-D5v1.gv: New.
* doc/vizualization/graph/gv/sa-D5v2.gv: New.
* doc/vizualization/graph/gv/sa-DD1.gv: New.
* doc/vizualization/graph/gv/sa-DD2.gv: New.
* doc/vizualization/graph/gv/sa-DD3.gv: New.
* doc/vizualization/graph/gv/sa-DD4.gv: New.
* doc/vizualization/graph/gv/sa-DD5.gv: New.
* doc/vizualization/graph/gv/sa-base.gv: New.
* doc/vizualization/graph/png/sa-A.png: New.
* doc/vizualization/graph/png/sa-B.png: New.
* doc/vizualization/graph/png/sa-C1.png: New.
* doc/vizualization/graph/png/sa-C2.png: New.
* doc/vizualization/graph/png/sa-C3.png: New.
* doc/vizualization/graph/png/sa-C4.png: New.
* doc/vizualization/graph/png/sa-D1.png: New.
* doc/vizualization/graph/png/sa-D2.png: New.
* doc/vizualization/graph/png/sa-D2v.png: New.
* doc/vizualization/graph/png/sa-D3.png: New.
* doc/vizualization/graph/png/sa-D3v.png: New.
* doc/vizualization/graph/png/sa-D4v.png: New.
* doc/vizualization/graph/png/sa-D5v1.png: New.
* doc/vizualization/graph/png/sa-D5v2.png: New.
* doc/vizualization/graph/png/sa-DD1.png: New.
* doc/vizualization/graph/png/sa-DD2.png: New.
* doc/vizualization/graph/png/sa-DD3.png: New.
* doc/vizualization/graph/png/sa-DD4.png: New.
* doc/vizualization/graph/png/sa-DD5.png: New.
* doc/vizualization/graph/png/sa-base.png: New.
* doc/vizualization/graph/sources/sa-A.cc: New.
* doc/vizualization/graph/sources/sa-B.cc: New.
* doc/vizualization/graph/sources/sa-C.cc: New.
* doc/vizualization/graph/sources/sa-D.cc: New.
* doc/vizualization/graph/sources/sa-DD.cc: New.
* doc/vizualization/graph/sources/sa-base.cc: New.
* doc/vizualization/graph/svg/sa-A.svg: New.
* doc/vizualization/graph/svg/sa-B.svg: New.
* doc/vizualization/graph/svg/sa-C1.svg: New.
* doc/vizualization/graph/svg/sa-C2.svg: New.
* doc/vizualization/graph/svg/sa-C3.svg: New.
* doc/vizualization/graph/svg/sa-C4.svg: New.
* doc/vizualization/graph/svg/sa-D1.svg: New.
* doc/vizualization/graph/svg/sa-D2.svg: New.
* doc/vizualization/graph/svg/sa-D2v.svg: New.
* doc/vizualization/graph/svg/sa-D3.svg: New.
* doc/vizualization/graph/svg/sa-D3v.svg: New.
* doc/vizualization/graph/svg/sa-D4v.svg: New.
* doc/vizualization/graph/svg/sa-D5v1.svg: New.
* doc/vizualization/graph/svg/sa-D5v2.svg: New.
* doc/vizualization/graph/svg/sa-DD1.svg: New.
* doc/vizualization/graph/svg/sa-DD2.svg: New.
* doc/vizualization/graph/svg/sa-DD3.svg: New.
* doc/vizualization/graph/svg/sa-DD4.svg: New.
* doc/vizualization/graph/svg/sa-DD5.svg: New.
* doc/vizualization/graph/svg/sa-base.svg: New.
2013-07-01 Benjamin Kosnik <bkoz@redhat.com>
Regenerate build/configure.
* aclocal.m4:
* configure:
2013-06-06 Benjamin Kosnik <bkoz@redhat.com>
Regenerate configure files.
* Makefile.in:
* aclocal.m4:
* configure:
* doc/Makefile.in:
* src/Makefile.in:
* tests/Makefile.in:
2013-05-28 Benjamin Kosnik <bkoz@redhat.com>
Add svg generation.
* src/Makefile.am: Add abg-viz-svg.cc, abg-viz-svg.h.
* tests/Makefile.am: Add test-svg.cc.
* src/abg-viz-svg.cc: New.
* src/abg-viz-svg.h: New.
* tests/test-svg.cc: New.
2013-05-22 Benjamin Kosnik <bkoz@redhat.com>
Remove ChangeLog
* ChangeLog: Remove content.
2013-05-21 Benjamin Kosnik <bkoz@redhat.com>
Fixup abg-version.h merge duplicate.
* configure.ac: Remove src/abg-version.h merge duplicate.
2013-05-20 Benjamin Kosnik <bkoz@redhat.com>
Add doc/visualization/layout.
* doc/vizualization/layout: New.
* doc/vizualization/layout/pdf/sa-A.pdf: New.
* doc/vizualization/layout/pdf/sa-B.pdf: New.
* doc/vizualization/layout/pdf/sa-C1.pdf: New.
* doc/vizualization/layout/pdf/sa-C2.pdf: New.
* doc/vizualization/layout/pdf/sa-C3.pdf: New.
* doc/vizualization/layout/pdf/sa-D1.pdf: New.
* doc/vizualization/layout/pdf/sa-D2.pdf: New.
* doc/vizualization/layout/pdf/sa-D2v.pdf: New.
* doc/vizualization/layout/pdf/sa-D3.pdf: New.
* doc/vizualization/layout/pdf/sa-D3v.pdf: New.
* doc/vizualization/layout/pdf/sa-D4v.pdf: New.
* doc/vizualization/layout/pdf/sa-DD1.pdf: New.
* doc/vizualization/layout/pdf/sa-DD2.pdf: New.
* doc/vizualization/layout/pdf/sa-DD3.pdf: New.
* doc/vizualization/layout/pdf/sa-DD4.pdf: New.
* doc/vizualization/layout/pdf/sa-DD5.pdf: New.
* doc/vizualization/layout/pdf/sa-base.pdf: New.
* doc/vizualization/layout/png/sa-A.png: New.
* doc/vizualization/layout/png/sa-B.png: New.
* doc/vizualization/layout/png/sa-C1.png: New.
* doc/vizualization/layout/png/sa-C2.png: New.
* doc/vizualization/layout/png/sa-C3.png: New.
* doc/vizualization/layout/png/sa-D1.png: New.
* doc/vizualization/layout/png/sa-D2.png: New.
* doc/vizualization/layout/png/sa-D2v.png: New.
* doc/vizualization/layout/png/sa-D3.png: New.
* doc/vizualization/layout/png/sa-D3v.png: New.
* doc/vizualization/layout/png/sa-D4v.png: New.
* doc/vizualization/layout/png/sa-DD1.png: New.
* doc/vizualization/layout/png/sa-DD2.png: New.
* doc/vizualization/layout/png/sa-DD3.png: New.
* doc/vizualization/layout/png/sa-DD4.png: New.
* doc/vizualization/layout/png/sa-DD5.png: New.
* doc/vizualization/layout/png/sa-base.png: New.
* doc/vizualization/layout/scripts/
(inkscape_export_svg_to_plain_svg.sh): New.
(inkscape_export_svg_to_png_and_pdf.sh): New.
* doc/vizualization/layout/sources/sa-A.cc: New.
* doc/vizualization/layout/sources/sa-B.cc: New.
* doc/vizualization/layout/sources/sa-C.cc: New.
* doc/vizualization/layout/sources/sa-D.cc: New.
* doc/vizualization/layout/sources/sa-DD.cc: New.
* doc/vizualization/layout/sources/sa-base.cc: New.
* doc/vizualization/layout/svg/sa-A.svg: New.
* doc/vizualization/layout/svg/sa-B.svg: New.
* doc/vizualization/layout/svg/sa-C1.svg: New.
* doc/vizualization/layout/svg/sa-C2.svg: New.
* doc/vizualization/layout/svg/sa-C3.svg: New.
* doc/vizualization/layout/svg/sa-D1.svg: New.
* doc/vizualization/layout/svg/sa-D2.svg: New.
* doc/vizualization/layout/svg/sa-D2v.svg: New.
* doc/vizualization/layout/svg/sa-D3.svg: New.
* doc/vizualization/layout/svg/sa-D3v.svg: New.
* doc/vizualization/layout/svg/sa-D4v.svg: New.
* doc/vizualization/layout/svg/sa-DD1.svg: New.
* doc/vizualization/layout/svg/sa-DD2.svg: New.
* doc/vizualization/layout/svg/sa-DD3.svg: New.
* doc/vizualization/layout/svg/sa-DD4.svg: New.
* doc/vizualization/layout/svg/sa-DD5.svg: New.
* doc/vizualization/layout/svg/sa-base.svg: New.
2013-05-20 Benjamin Kosnik <bkoz@redhat.com>
Generate abg-version.h at configure time.
* configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
* src/Makefile.am: Remove abg-version.h generation rules.
* src/abg-version.h.in: New.
2013-04-02 Benjamin Kosnik <bkoz@redhat.com>
Add doc dir. Add Doxgen api generation rules.
* doc: Add.
* doc/Makefile.am (html, install-html): Add.
* doc/Makefile.in: Add.
* doc/api/libabigail.doxy: Add doxygen config.
* src/abg-*: Add @file markup.
2013-03-27 Benjamin Kosnik <bkoz@redhat.com>
Add configure to source control
* configure: Add.
* src/abg-corpus.cc: include stdexcept
2013-06-25 Dodji Seketeli <dodji@redhat.com>
Support offsets and virtual attribute in base class specifiers
* src/abg-ir.h (class_decl::base_spec::base_spec): Take an offset
and a is_virtual flag.
(class_decl::base_spec::{get_is_virtual, get_offset_in_bits}): New
methods.
(class_decl::has_no_base_nor_member): New method declaration..
* src/abg-ir.cc (class_decl::base_spec::base_spec): Take an offset
and a is_virtual flag
(class_decl::has_no_base_nor_member): Define it.
* src/abg-reader.cc (read_offset_in_bits): Renamed
read_var_offset_in_bits into this.
(read_is_virtual): New static function.
(build_class_decl): Read the 'layout-offset-in-bits' and the
'is-virtual' of the base class specifier. Adjust for the
read_var_offset_in_bits -> read_offset_in_bits rename.
* src/abg-writer.cc (write_layout_offset): New overload for the
base class specifiers.
(write_class_decl): If the class has no member or base class, make
it a proper empty xml element. Write the offset and the
is-virtual attribute.
* tests/data/test-read-write/test20.xml: New test input data.
* tests/test-read-write.cc: De-serialize the test above, serialize
it back and compare that both versions are the same.
2013-06-22 Dodji Seketeli <dodji@redhat.com>
Iron out support for simple base classes.
* src/abg-ir.h (class_decl::base_spec::base_spec): Move this
out-of-line. Add a new constructor for clients compiled without
RTTI.
* src/abg-ir.cc (class_decl::base_spec::base_spec): This is now
here out-of-line. Define the new constructor for clients compiled
without RTTI.
* tests/data/test-read-write/test19.xml: New test case input for
base classes.
* tests/test-read-write.cc: De-serialize and serialize the new
test case input above.
2013-06-21 Dodji Seketeli <dodji@redhat.com>
Fix handling of forward decl of classes
* abg-ir.h (class_decl::set_earlier_declaration): Move this
out-of-line and add an overload.
* src/abg-ir.cc (class_decl::set_earlier_declaration): Moved this
out-of-line here and add an overload.
* src/abg-reader.cc (build_class_decl): Really read the
'decl-of-decl-id' property. Do not make the definition use the id
of the declaration. Both have their id.
* src/abg-writer.cc (write_class_decl): Put a space before the
property "def-of-decl-id".
* tests/data/test-read-write/test18.xml: New test input.
* tests/test-read-write.cc: De-serialize this new input, serialize
it back and make sure both versions are identical.
2013-06-21 Dodji Seketeli <dodji@redhat.com>
Serialize the layout offset of class data members.
* src/abg-writer.cc (write_layout_offset): New function.
(write_class_decl): Serialize the layout offset.
2013-06-21 Dodji Seketeli <dodji@redhat.com>
Support Bitwise OR for qualified_type_def::CV better
* src/abg-ir.h (qualified_type_def::CV_RESTRICT): New enumerator
for the qualified_type_def::CV enum.
(operator|(qualified_type_def::CV, qualified_type_def::CV)): New
declaration.
* src/abg-ir.cc (operator|(qualified_type_def::CV,
qualified_type_def::CV)): New definition.
* src/abg-reader.cc (build_qualified_type_decl): No need for
casting the result of bitwise or between instances of
qualified_type_def::CV.
2013-06-14 Dodji Seketeli <dodji@seketeli.org>
Support method type/decl, variadic functions, class declarations-only
* src/abg-ir.h (function_decl::parameter::parameter): New
constructor with variadic parameter marker.
(function_decl::m_type): Make this protected to let method_decl
inheriting class to access it.
(function_decl::get_type): Move this out-of-line.
(class method_type, method_type_hash): New types.
(enum class_decl::access_specifier): Add no_access new enumerator.
(class_decl::data_member::data_member): Move this out-of-line.
(class_decl::data_member::~data_member): Declare virtual
destructor.
(class method_decl): New class.
(class member_function): Make this inherit method_decl, instead of
function_decl.
(class_decl::class_decl): New constructors.
(class_decl::{hashing_started, is_declaration_only,
set_earlier_declaration, get_earlier_declaration}): New methods.
* src/abg-ir.cc (add_decl_to_scope): If a decl is already in a
scope, don't add it to this scope.
(get_global_scope): Make this work when passed an instance of
global_scope.
(dynamic_type_hash::operator()): Add support for method_type.
(method_type::{method_type, set_class_type, ~method_type, })
(method_type_hash::operator()): New defintions.
(function_decl::get_type, class_decl::class_decl): Move these
out-of-line here.
(class_decl::method_decl::{method_decl, ~method_decl, get_type}):
New definitions.
(class_decl::member_function::member_function): Move this
out-of-line here. Support method_decl.
(class_decl::data_member::data_member): Likewise.
(class_decl_hash::operator()): Guard this against endless loop.
* src/abg-reader.cc (write_class_is_declaration_only): New static
function.
(write_var_decl): Take a flag to write the mangled name or not.
(write_function_decl): Take a flag to skip the first parameter.
(write_cdtor_const_static): Use 'yes' instead of 'true' as value
of the properties.
(write_decl, write_function_template_decl): Adjust wrt the new
signatures of write_var_decl and write_function_decl.
(write_enum_type_decl): Simplify call to write_location.
(write_class_decl): Support serializing declaration-only classes.
* src/abg-writer.cc:
* tests/data/test-read-write/test17.xml: New test input.
* tests/test-read-write.cc: De-serialize the above, and serialize it back.
* tests/data/test-read-write/test10.xml: Update this test.
2013-06-01 Dodji Seketeli <dodji@redhat.com>
Support function_type and adapt a function_decl to use it
* src/abg-ir.h (class function_type): Forward decl prior to class
function_decl.
(function_decl::parameter): Pass string by const reference. Add a
variadic marker member and initialize it.
(function_decl::parameter::get_type): Add a non-const overload.
(function_decl::parameter::get_variadic_marker): New getter.
(function_decl::function_decl) Take a const reference to a vector
for parameters, type size/alignment. Add two overloads that takes a
pointer to function_type.
(function_decl::get_parameters): Move this out-of-line.
(function_decl::append_parameter(s)): Renamed
function_decl::add_parameter(s) into these. Move it out-of-line.
Add an overload.
(function_decl::{get_type, set_type}): New declaration.
(function_decl::get_return_type): Move this out-of-line.
(function_decl::is_variadic): New in-line function.
(function_decl::m_type): New data member.
(function_decl::{m_parms, m_return_type}): Remove. This are now
carried by function_decl::m_type.
(class function_type, struct function_type_hash): New
declarations.
(member_function::member_function): Take a vector of pointers to
parameters. Take size/align of the type of the member function.
Adjust initialization.
* src/abg-ir.cc (dynamic_type_hash): Hash instance of
function_type accessed through a pointer.
(function_type::{operator==, ~function_type})
(function_type_hash::operaror(), function_decl::{get_return_type,
}, function_decl::parameter::hash::operator()): New definitions.
(function_decl::function_decl): The out-of-line definitions of the
declarations above.
(function_decl::append_parameter): Moved this out-of-line from
inline function_decl::add_parameter. Make this rely on the
underlying m_type.
(function_decl::operator==): Adjust for use of vector for the
parameters. Also, there is no need anymore to compare the
parameters or the return types as they are compared by the
comparison of the function types.
* src/abg-reader.cc (build_function_decl): Read the new size/alignment
attributes on the function-decl element. Build a function_type
and use it to build the function_decl. Parameters and return type
are now hung off of the function_type.
(handle_function_decl): use build_function_decl.
* src/abg-writer.cc (write_function_decl): Write the new
size/alignment properties of the function-decl element. Adjust
for the use of vectors for function parameters now.
* tests/data/test-read-write/test10.xml: Adjust for the presence
of size/alignment properties in the function-decl element now.
* tests/data/test-read-write/test11.xml: Likewise.
* tests/data/test-read-write/test12.xml: Likewise.
* tests/data/test-read-write/test13.xml: Likewise.
* tests/data/test-read-write/test14.xml: Likewise.
* tests/data/test-read-write/test9.xml: Likewise.
2013-06-01 Dodji Seketeli <dodji@redhat.com>
Support null type hashing
* src/abg-ir.cc (dynamic_type_hash::operator()(const type_base* t)
const): Support hashing null type.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Add a couple of output file suffix configuration properties
* src/abg-config.h (config::{get_tu_instr_suffix,
set_tu_instr_suffix, get_tu_instr_archive_suffix,
set_tu_instr_archive_suffix}): New decls.
* src/abg-config.cc (config::{get_tu_instr_suffix,
set_tu_instr_suffix, get_tu_instr_archive_suffix,
set_tu_instr_archive_suffix}): New defs.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Add a new add_decl_to_scope overload
* src/abg-ir.h (add_decl_to_scope): New declaration.
* src/abg-ir.cc (add_decl_to_scope): New definition.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Ensure add_decl_to_scope properly updates the scope
* src/abg-ir.h (scope_decl::m_member_scopes)
(scope_decl::get_member_scopes): New declarations.
(scope_decl::add_member_decl): Move this to ...
* src/abg-ir.cc (scope_decl::add_member_decl): ... here. Make it
update the new scope_decl::m_member_scopes too.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Add translation_unit::get_path
* src/abg-ir.cc (translation_unit::get_path): New declaration.
* src/abg-ir.cc (translation_unit::get_path): New definition.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Link the global scope to its translation unit
* src/abg-ir.h (global_scope::global_scope): Take a translation
unit and initialize the tu member with it.
* src/abg-ir.cc (translation_unit::get_global_scope): Initialize
the global scope with its actual translation unit.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Have location numbers that are stable throughout translation unit editing
* src/abg-irc.cc (location_manager::create_new_location): Just
append the new expanded location to the end of the location
vectors, and return the new size of the vector as the location
number. That way we don't change the location number of an
expanded location that is already in the vector -- that change
happens if we keep the vector sorted during the insertion.
(location_manager::expand_location): The index of the expanded
location is the location number - 1.
2013-05-23 Dodji Seketeli <dodji@redhat.com>
Fix in-source detection of the library for GCC
* abigail.m4 (ABIGAIL_INIT): Don't forget to set abigaillibs when
we detect the library in the source tree, particularly for GCC.
2013-05-21 Dodji Seketeli <dodji@redhat.com>
Re-generate aclocal.m4
* aclocal.m4: Re-generate with autoconf 2.64.
2013-05-21 Benjamin Kosnik <bkoz@redhat.com>
Generate abg-version at configure time in builddir
* configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
* src/Makefile.am: Remote ad-hoc generation of abg-version.h from
here.
* src/abg-version.h.in: New file.
* configure: Re-generate.
* src/Makefile.in: Likewise.
2013-05-21 Dodji Seketeli <dodji@redhat.com>
add abigail.m4 to the distribution
* Makefile.am: Add abigail.m4 to the distribution.
* Makefile.in: Re-generate.
2013-05-10 Dodji Seketeli <dodji@redhat.com>
Pedantic fixes
* src/abg-ir.h (enum decl_base::binding): Remove trailing space.
(enum class_decl::access_specifier): Likewise.
2013-05-07 Dodji Seketeli <dodji@redhat.com>
Fix for building libabigail inside the GCC tree
* abigail.m4: Detect when we are in the GCC tree; disable version
check in that case.
2013-05-07 Dodji Seketeli <dodji@redhat.com>
Re-generate configury with autoconf 2.64
* abigail.m4: Add licence header.
* configure.ac: Re-generate configure script with autoconf 2.64
like for GCC.
2013-05-07 Dodji Seketeli <dodji@redhat.com>
Allow autoconf-based clients to detect the library
* configure.ac: Define the components of the version number as
autoconf variables. Set the version number to 0.1.0
* abigail.m4: New file
* Makefile.am: Add abigail.m4 to the build system. Install it in
$(datadir)/aclocal.
* src/Makefile.am: Generate and add abg-version.h from the version
number autoconf variable defined in configure.ac. Re-generate
abg-version.h each time configure.ac changes.
* src/abg-config.h (abigail_get_library_version): Declare ...
* src/abg-config.cc (abigail_get_library_version): ... and define
this wirth C linkage. This is useful for autoconf tests to test
for the presence of the library.
* configure: Re-generate.
* Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
2013-05-03 Dodji Seketeli <dodji@redhat.com>
Build system fix for make distcheck
* Makefile.am: Support the doc sub-directory. We don't have a
COPYRIGHT file.
* src/Makefile.am: Don't prefix the file paths by the absolute
path of the src dir; current autotools know how to deal with it,
otherwise and it break them.
* tests/Makefile.am: Likewise. Make sure to remove the output of
the tests upon make clean.
* Makefile.in: Re-generate.
* aclocal.m4: Likewise.
* configure: Likewise.
* src/Makefile.in: Likewise.
* tests/Makefile.in: Likewise.
2013-05-02 Dodji Seketeli <dodji@redhat.com>
Initial support for member class templates
* src/abg-ir.cc (class_decl::add_member_function_template): Fix
comment.
(class_decl::add_member_class_template)
(class_decl::member_class_template::operator==)
(class_decl::member_class_template_hash::operator()): New
definitions.
(class_decl::operator==): Compare member templates. Fix logic.
(class_decl::data_member_hash::operator())
(class_decl::member_function_hash::operator())
(class_decl::member_function_template_hash::operator()): Don't
hash the is_static boolean as it's hashed as part of the 'member'
sub-object hashing.
(class_decl::member_function_template::operator==): Move this out
of line here, from the header file.
(class_decl_hash::operator()): Hash member class templates.
* src/abg-ir.h (class_decl::member::{m_is_static,is_static}): Add the is_static
boolean here, so that it's factorized out of the inherited classes
of this class.
(class_decl::data_member::{is_static, m_is_static})
(class_decl::member_function::{is_static, m_is_static})
(class_decl::member_function_template::{is_static, m_is_static}): Remove this
as it's now part of the base 'member' class.
(class_decl::data_member::operator==)
(class_decl::member_function::operator==): Don't compare the
is_static boolean as it's now compared as part of the 'member'
sub-object comparison.
(class_decl::member_function_template::operator==): Move this
out-of-line into src/abg-ir.cc.
(class class_decl::member_class_template, struct
class_decl::member_class_template_hash)
(class_decl::{add_member_class_template,
get_member_class_templates}): New declarations.
(class_decl::member_class_templates_type): New typedef.
* src/abg-reader.cc (build_class_decl): Support de-serializing
member class templates.
* src/abg-writer.cc (write_class_decl): Likewise, support
serializing member class templates.
* tests/data/test-read-write/test16.xml: New test input.
* tests/test-read-write.cc (int_out_specs[]): Add the new test
input to the list of inputs that are de-serialized and serialized
back.
* tests/Makefile.am: Add the new test input to the distribution.
2013-05-02 Dodji Seketeli <dodji@redhat.com>
Initial support of class templates
* src/abg-ir.cc (class_template_decl::class_template_decl)
(class_template_decl::set_pattern)
(class_template_decl::operator==)
(class_template_decl::~class_template_decl)
(class_template_decl_hash::operator())
(class_tmpl_shared_ptr_hash::operator()): New definitions.
* src/abg-ir.h (class class_template_decl, struct
class_tmpl_shared_ptr_hash, struct class_tmpl_shared_ptr_hash):
New declarations.
* src/abg-reader.cc (read_context::const_class_tmpl_map_it): New
typedef.
(read_context::get_fn_tmpl_decl): Fix comment.
(read_context::{get_class_tmpl_decl,key_class_tmpl_decl})
(build_class_template_decl, handle_class_template_decl): New
definitions.
(read_context::m_class_tmpl_map): New member.
(handle_element): Support "class-template-decl" xml elements
nodes.
(build_class_decl): Add missing bits to comment.
(build_function_template_decl): Fix spacing.
* src/abg-writer.cc (class_tmpl_shared_ptr_map): New typedef.
(write_context::m_class_tmpl_map): New member.
(write_context::get_id_for_class_tmpl, write_class_template_decl):
New definitions.
(write_template_parameters): Factorize this this out from ...
(write_function_template_decl): ... here.
(write_decl): Support writing instances of class_template_decl.
Fix spacing.
* tests/data/test-read-write/test15.xml: New test input.
* tests/Makefile.am: Add the new test15.xml input to the
distribution.
* tests/test-read-write.cc (in_out_specs): Add the new test15.xml
test to the list of serialized output to be de-serialized and
serialized back.
2013-05-02 Dodji Seketeli <dodji@redhat.com>
Fix function_tempalte_decl init & hashing
* src/abg-ir.cc (function_template_decl::operator==): Compare the
patterns, not a pointer to them.
(function_template_decl_hash::operator()): Don't try to hash null
patterns.
* src/abg-ir.h (function_template_decl::function_template_decl):
Use function_template_decl::set_pattern to set the pattern here.
2013-04-30 Dodji Seketeli <dodji@redhat.com>
Support member function templates
* src:abg-ir.h: Move template declarations before class
class_decl, so that class_decl can have member templates.
(class class_decl::member_function_template)
(class_decl::add_member_function_template)
(class_decl::{base_specs_type, member_types_type,
data_members_types, member_functions_type,
member_function_templates_type}): New declarations.
* src/abg-ir.cc (class_decl::add_member_function_template)
(class_decl::member_function_template_hash::operator()): New
definitions.
(class_decl_hash::operator()): Support hashing for member
function templates.
* src/abg-reader.cc (build_class_decl): Use the new
class_decl::{member_types_type, data_members_type,
member_functions_type, base_specs_type} types. Support member
function templates.
* src/abg-writer.cc (write_cdtor_const_static): New definition.
(write_class_decl): Support member function templates.
* tests/data/test-read-write/test14.xml: New input data.
* tests/Makefile.am: Add it to the distribution.
* tests/test-read-write.cc (InOutSpec int_out_specs): De-serialize
the new test input file, serialize it back and diff both results.
2013-04-25 Dodji Seketeli <dodji@redhat.com>
Inheritance fix
* src/abg-ir.h (class template_non_type_parameter): Make this
inherit decl_base virtually.
2013-04-25 Dodji Seketeli <dodji@redhat.com>
Small comment fix
* src/abg-ir.h (class template_decl): Fix comment.
2013-04-25 Dodji Seketeli <dodji@redhat.com>
Add some decl predicates
* src/abg-ir.h (is_at_global_scope): Rename
is_decl_at_global_scope into this.
(is_at_class_scope, is_at_template_scope)
(is_template_parameter, is_type)
(is_template_parm_composition_type)
(is_function_template_pattern, is_template_decl): New
declarations.
* src/abg-ir.cc (is_at_global_scope): Rename
is_decl_at_global_scope into this.
(is_at_class_scope, is_at_template_scope, is_template_parameter)
(is_type, is_template_parm_composition_type)
(is_function_template_pattern, is_template_decl): New definitions.
* src/abg-reader.cc (update_depth_info_of_read_context): Use the
new is_at_class_scope decl.
2013-04-25 Dodji Seketeli <dodji@redhat.com>
Support composing template type parameters
* src/abg-ir.h (class tmpl_parm_type_composition): New
declaration.
* src/abg-ir.cc
(tmpl_parm_type_composition::tmpl_parm_type_composition)
(tmpl_parm_type_composition::~tmpl_parm_type_composition): New
definitions.
* src/abg-reader.cc (build_tmpl_parm_type_composition): New
function.
(build_template_parameter): Support template parameter type
composition.
* src/abg-writer.cc (write_tmpl_parm_type_composition): New
function.
(write_template_non_type_parameter): Fix type-id attribute.
(write_template_parameter): Support template parameter type
composition.
* tests/data/test-read-write/test13.xml: New test input.
* tests/Makefile.am: Add it to the distribution.
* tests/test-read-write.cc (InOutSpec in_out_spec): Add test13.xml
to the list of xml file that are de-serialized and serialized back.
2013-04-24 Dodji Seketeli <dodji@redhat.com>
Fix depth management during the parsing
* src/abg-ir.cc (decl_base_hash::operator()): Don't hash the
context for decls in general.
* src/abg-reader.cc (read_context::push_decl_to_current_scope)
(read_context::push_and_key_type_decl): Add an overload that takes
a node and update_depth_info boolean.
(build_var_decl, build_type_decl, build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def)
(build_enum_type_decl, build_type_decl)
(build_template_type_parameter, build_template_non_type_parameter)
(build_template_template_parameter, build_template_parameter)
(build_type): Make these functions take an update_depth_info
parameter. Pass it do read_context::push_and_key_type_decl or
read_context::push_decl_to_current_scope rather than call
update_read_context.
(build_function_decl, build_class_decl)
(build_function_template_decl): Change the seen_by_reader
parameter into update_depth_info. Pass the update_depth_info bool
to read_context::push_decl_to_current_scope rather than call
update_depth_info here.
(handle_class, handle_function_template_decl): Adjust.
* tests/data/test-read-write/test12.xml: Add new test input.
* tests/test-read-write.cc (InOutSpec in_out_specs): Add it to the
list of input to de-serialize, serialize back and compare the two.
* tests/Makefile.am: Add the new test input to the distribution.
2013-04-23 Dodji Seketeli <dodji@redhat.com>
Initial support for function templates
* src/abg-ir.h (function_decl::set_return_type): New inline
definition.
(class template_decl, struct template_decl_hash, class
template_parameter, struct template_parameter_hash, struct
dynamic_template_parameter_hash, struct
template_parameter_shared_ptr_hash, class template_type_parameter)
(struct template_type_parameter_hash, class
template_non_type_parameter, struct
template_non_type_parameter_hash, class
template_template_parameter, struct
template_template_parameter_hash, class function_template_decl)
(struct function_template_decl_hash, struct
fn_tmpl_shared_ptr_hash): New declarations.
* src/abg-ir.cc (dynamic_type_hash::operator()): Add hashing for
template template, and template type parameters.
(template_decl_hash::operator, template_decl::~template_decl)
(template_decl::operator==, template_parameter::operator==)
(template_parameter_hash::operator())
(dynamic_template_parameter_hash::operator())
(template_type_parameter::operator==)
(template_type_parameter::~template_type_parameter)
(template_type_parameter_hash::operator())
(template_non_type_parameter::operator==)
(template_non_type_parameter::~template_non_type_parameter)
(template_non_type_parameter_hash::operator())
(template_template_parameter::operator==)
(template_template_parameter::~template_template_parameter)
(template_template_parameter_hash::operator())
(function_template_decl::operator==)
(function_template_decl_hash::operator())
(fn_tmpl_shared_ptr_hash::operator())
(function_template_decl::~function_template_decl()): New
definitions.
* src/abg-reader.cc (read_context::get_fn_tmpl_decl)
(read_context::key_fn_tmpl_decl): New functions.
(read_context::m_fn_tmpl_map): New data member.
(read_context::key_type_decl): Renamed read_context::add_type_decl
into this.
(read_context::push_decl_to_current_scope): Renamed
read_context::finish_decl_creation into this. Add an assert.
(read_context::push_and_key_type_decl): Renamed
read_context::finish_type_decl_creation into this. Adjust to the
use of push_decl_to_current_scope and key_type_decl.
(build_function_template_decl, build_template_type_parameter)
(build_template_non_type_parameter)
(build_template_template_parameter, build_template_parameter)
(handle_function_template_decl): New functions.
(handle_element): Call handle_function_template_decl.
(build_function_decl): Take a bool parameter to update depth
information in parsing context. Move instantiation of
function_decl before parsing its xml sub-nodes. Update the depth
info in the parsing context if necessary. Push the newly
intantiated decl to scope. And then parse the sub nodes. Do not
forget to add the fn parameters and return type using
function_decl::add_parameter and function_decl::set_return_type.
(build_var_decl, build_type_decl, build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def)
(build_enum_type_decl, build_typedef_decl, handled_type_decl)
(handle_qualified_type_decl, handle_pointer_type_def)
(handle_reference_type_def, handle_enum_type_decl)
(handle_typedef_decl, handle_var_decl, handle_function_decl)
(handle_class_decl): Adjust.
(build_class_decl): Take a bool parameter to update depth
information in parsing context. Add comment. Wait for the class
members to be built, before keying (and thus hashing it) the
class.
(build_type): Fix logic, and adjust.
* src/abg-writer.cc (write_context::type_has_existing_id)
(write_context::get_id_for_fn_tmpl, write_template_type_parameter)
(write_template_non_type_parameter)
(write_template_template_parameter, write_template_parameter)
(write_function_template_decl): New functions.
(write_context::get_id_for_type): Simplify logic.
(write_decl): Support writing function template.
* tests/data/test-read-write/test11.xml: New test input.
* tests/test-read-write.cc (InoutSpec in_out_specs[]):
De-serialize the new test11.xml test, serialize it back and diff
output and input.
* tests/Makefile.am: Add test11.xml to the distribution.
2013-04-23 Dodji Seketeli <dodji@redhat.com>
Mangled name of a scope_decl is its name
* src/abg-ir.h (scope_decl::scope_decl): The mangled name is the name.
2013-04-23 Dodji Seketeli <dodji@redhat.com>
Update scope when adding class members
* src/abg-ir.h (class_decl::add_member_type)
(class_decl::add_data_member, class_decl::add_member_function):
Move the inline implementation of these functions ...
* src:abg-ir.cc (class_decl::add_member_type)
(class_decl::add_data_member, class_decl::add_member_function):
... here. Augment their implementation to properly update the
scope of the member.
2013-04-23 Dodji Seketeli <dodji@redhat.com>
Rename class_decl::member_type::get_type into as_type
* src/abg-ir.h (class_decl::member_type::get_type): Rename this
into class_decl::member_type::as_type.
* src/abg-writer.cc (write_class_decl): Adjust.
2013-04-23 Dodji Seketeli <dodji@redhat.com>
Avoid having multiple sub-objects of base classes
* src/abg-ir.cc (decl_base::decl_base): Remove useless definition.
(type_base::type_base): Remove default arguments from parameters.
(scope_type_decl::scope_type_decl)
(namespace_decl::namespace_decl): Call the constructors for the
virtual bases explicitly.
* src/abg-ir.h (class scope_decl): Perform virtual inheritance of
decl_base.
(global_scope::global_scope): Call virtual base decl_base's
constructor directly.
(class type_decl): Inherit from decl_base and type_base
virtually.
(class scope_type_decl): Inherit from type_base virtually.
(class qualified_type_def, pointer_type_def, reference_type_def)
(class enum_type_decl, typedef_decl): Inherit from type_base and
decl_base virtually.
(class var_decl, function_decl): Inherit from decl_base virtually.
(class class_decl::member): Don't inherit from anything and adjust
constructor's mem-initializer accordingly.
(class class_decl::member_type): Inherit from decl_base virtually
and adjust constructor's mem-initializer accordingly.
(class_decl::{data_member::data_member,member_function::member_function)
(class_decl::class_decl): Call virtual base's constructor
explicitly.
2013-04-22 Dodji Seketeli <dodji@redhat.com>
Move inline hashing functions out of line
* src/abg-ir.h (decl_base_hash::operator())
(type_base_hash::operator(), type_decl_hash::operator())
(scope_type_decl_hash::operator())
(qualified_type_def_hash::operator())
(pointer_type_def_hash::operator())
(reference_type_def_hash::operator())
(enum_type_decl_hash::operator(), typedef_decl_hash::operator())
(var_decl_hash::operator(), function_decl_hash::operator())
(class_decl::member_type_hash::operator())
(class_decl::base_spec_hash::operator())
(class_decl::data_member_hash::operator())
(class_decl::member_function_hash::operator()): Move these inline
definition ...
* src/abg-ir.cc: ... here.
2013-04-22 Dodji Seketeli <dodji@redhat.com>
Various style nit fixes
* src/abg-ir.cc: Move the emacs mode specifier for the file to the
top of the file, otherwise, it's not effective.
(struct location_manager::priv): Add end of struct comment.
(class_decl_hash::operator()): Add fn comment.
* src/abg-ir.h: Move the emacs mode specifier for the file to the
top of the file, otherwise, it's not effective.
(class scope_decl): Add end of class comment.
* src/abg-reader.cc: Move the emacs mode specifier for the file to the
top of the file, otherwise, it's not effective.
(read_context::{get_type_decl,add_type_decl): Add comment.
(handle_namespace_decl): Fix indent.
* src/abg-writer.cc: Move the emacs mode specifier for the file to
the top of the file, otherwise, it's not effective.
2013-04-12 Dodji Seketeli <dodji@redhat.com>
Remove .gitignore from VCS
* .gitignore: Remove from revision control as different
programmers might want to ignore different things.
2013-04-08 Benjamin Kosnik <bkoz@redhat.com>
Add license
* src/abg-*: Add license.
* tests/test-*: Same.
2013-04-11 Dodji Seketeli <dodji@redhat.com>
Initial Support for class declarations
* src/abg-ir.h (scope_decl::scope_decl)
(scope_type_decl::scope_type_decl): Don't set mangled name for
scope_decl instances as it doesn't make sense.
(var_decl::var_decl): Pass the type shared pointer by value.
(struct var_decl_hash, function_decl::parameter::operator==)
(struct function_decl::parameter_hash, function_decl::operator==)
(struct function_decl_hash, class class_decl, struct
class_decl_hash): New declarations.
* src/abg-ir.cc (scope_type_decl::scope_type_decl): Don't set the
mangled name. It doesn't make sense for scope_decls.
(dynamic_type_hash::operator): Fix comment. Run the hashing for
scope_type_decl instances *after* running it for class_decl
instance, otherwise, the class_decl instances case will never get
hit.
(var_decl::var_decl): Pass the type shared pointer by value.
(function_decl::operator==, class_decl::operator==)
(class_decl_hash::operator()): New fns.
* src/abg-libxml-utils.h (get_xml_node_depth): Declare new fn.
(XML_READER_GET_ATTRIBUTE): Fix comment.
(XML_NODE_GET_ATTRIBUTE): New getter macro.
* src/abg-libxml-utils.cc (get_xml_node_depth): New definition.
* src/abg-reader.cc (update_read_context)
(update_depth_info_of_read_context, read_visibility, read_binding)
(read_access, read_size_and_alignment, read_static)
(read_var_offset_in_bits, read_cdtor_const, build_function_decl)
( build_var_decl, build_type_decl, build_qualified_type_decl)
(build_pointer_type_def, build_reference_type_def)
(build_enum_type_decl, build_typedef_decl, build_class_decl)
(build_type, handle_class_decl): New functions or overloads.
(handle_element): Update to handle "class-decl" xml elements.
* src/abg-writer.cc (write_size_and_alignment, write_access)
(write_class, do_indent_to_level, get_indent_to_level): New fns.
(write_decl): Update to serialize instances of class_decl.
(write_type_decl, write_pointer_type_def)
(write_reference_type_def): Use the new write_size_and_alignment instead of
writing the attributes directly.
* tests/data/test-read-write/test10.xml: New test file.
* tests/Makefile.am: Add tests/data/test-read-write/test10.xml to
the build system.
* tests/test-read-write.cc (in_out_spec): De-serialize
data/test-read-write/test10.xml, serialize it back into
output/test-read-write/test10.xml, and compare the two output that
should be identical.
2013-04-11 Dodji Seketeli <dodji@redhat.com>
Update enum decl representation as per the schema
* src/abg-reader.cc (handle_enum_type_decl): The name of the
element holding the underlying type is now "underlying-type", no
more "base".
* src/abg-writer.cc (write_enum_type_decl): Likewise.
* tests/data/test-read-write/test6.xml: Likewise.
2013-04-10 Dodji Seketeli <dodji@redhat.com>
Add tests/data/test-read-write/test9.xml
* tests/data/test-read-write/test9.xml: (Forgot to) Add this new
test file.
2013-04-04 Dodji Seketeli <dodji@redhat.com>
Support function declarations
* src/abg-ir.h (class function_decl): New declaration & inline
definitions.
* src/abg-ir.cc (function_decl::~function_decl): New definition.
* src/abg-reader.cc (read_location): New overload to read location
from an xmlNodePtr.
(build_function_parameter, handle_function_decl):
New definitions.
(handle_element): Support "function-decl" elements.
* src/abg-writer.cc (write_location): New overload to write a
location directly, not from a decl.
(write_function_decl): New definition.
(write_binding): Support writing the binding attribute from a
function_decl instance.
(write_decl): support serializing function
* tests/data/test-read-write/test9.xml: New test input file.
* tests/Makefile.am: Add data/test-read-write/test9.xml to the
build system.
* tests/test-read-write.cc: De-serialize
data/test-read-write/test9.xml, serialize it back and diff the
output from the input.
2013-04-03 Dodji Seketeli <dodji@redhat.com>
Update in-vcs configure and docs/Makefile.in to recent configure
* configure: Updated as re-generated by autoconf 2.69.
* doc/Makefile.in: Updated as re-generated by automake 1.12.2.
2013-04-02 Benjamin Kosnik <bkoz@redhat.com>
Add doc dir. Add Doxgen api generation rules.
* doc: Add.
* doc/Makefile.am (html, install-html): Add.
* doc/Makefile.in: Add.
* doc/api/libabigail.doxy: Add doxygen config.
* src/abg-*: Add @file markup.
2013-04-03 Dodji Seketeli <dodji@redhat.com>
Introduce/use translation_unit & global_scope types
* abg-corpus.h (abi_corpus::{get_decls, get_loc_mgr}): Remove.
(abi_corpus::add): New function to add a translation unit.
(abi_corpus::get_translation_units): New declaration.
* abg-corpus.cc (abi_corpus::*): Remove all the definitions of
abi_corpus for now, as the abi_corpus type is not used anymore --
for now at least.
* src/abg-ir.h (add_decl_to_scope, get_global_scope)
(get_translation_unit, is_global_scope, is_decl_at_global_scope)
(class translation_unit, class global_scope): New declarations
* src/abg-ir.cc (translation_unit::translation_unit)
(translation_unit::get_global_scope)
(translation_unit::get_loc_mgr, translation_unit::get_loc_mgr)
(translation_unit::is_empty, get_global_scope)
(get_translation_unit, is_global_scope, is_global_scope)
(is_decl_at_global_scope, global_scope::~global_scope): New
definitions.
(scope_decl::scope_decl, scope_decl::scope_decl)
(scope_decl::add_member_decl, scope_decl::get_member_decls): Move
to abg-ir.h, inline.
* src/abg-reader.h (read_file): Don't use abi_corpus in the api.
Rather, use translation_unit.
* src/abg-reader.cc (read_context::get_cur_scope): Now that we
have a specific instance of global_scope to represent global
scope, don't play games with empty scopes to detect a global
scope.
(read_context::get_translation_unit): New definition.
(read_context::finish_decl_creation, finish_type_decl_creation):
(read_input, read_file, read_location, handle_element)
(handle_type_decl)
(handle_namespace_decl, handle_qualified_type_decl)
(handle_pointer_type_def, handle_reference_type_def)
(handle_enum_type_decl, handle_typedef_decl, handle_var_decl):
Don't use abi_corpus anymore. Rather, the translation unit a decl
belongs to is accessible from the decl itself.
* src/abg-writer.h (write_to_ostream): Use translation_unit in
this API, rather than abi_corpus.
* src/abg-writer.cc (write_translation_unit): Rename write_corpus
into this. And stop using abi_corpus here.
(write_to_ostream, write_corpus, write_location, write_decl)
(write_type_decl, write_namespace_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_enum_type_decl, write_typedef_decl, write_var_decl): Stop
using abi_corpus. Use the translation_unit that is accessible
from the decl being serialized, if need be.
* test-read-write.cc (main): De-serialize the input into an
instance of translation_unit, not an abi_corpus anymore, and
serialize that translation_unit.
2013-04-02 Dodji Seketeli <dodji@redhat.com>
Support var decl & mangled_name attributes
* src/abg-ir.h (decl_base::binding, decl_base::get_mangled_name)
(decl_base::set_mangled_name, decl_base::m_mangled_name): New
declarations.
(scope_decl::scope_decl: type_decl::type_decl)
(scope_type_decl::scope_type_decl, typedef_decl::typedef_decl):
Initialize mangled_name.
(namespace_decl::namespace_decl): Initialize visibility.
(class var_decl): New declaration.
* src/abg-ir.cc (decl_base::decl_base, scope_decl::scope_decl)
(type_decl::type_decl, scope_type_decl::scope_type_decl):
Initialize mangled name.
(namespace_decl::namespace_decl): Initialize visibility.
(qualified_type_def::qualified_type_def)
(pointer_type_def::pointer_type_def)
(reference_type_def::reference_type_def): By default, set the
visibility to the same as for the underlying type.
(enum_type_decl::enum_type_decl, typedef_decl::typedef_decl):
Initialize mangled name.
(var_decl::var_decl, var_decl::operator==, var_decl::~var_decl):
New definitions.
* src/abg-reader.cc (read_visibility, read_binding, handle_var_decl): New
definitions.
(read_file): Handle var-decl elements.
* src/abg-writer.cc (write_location): Rename write_decl_location
into this.
(write_var_decl, write_visibility, write_binding): New definitions.
(write_decl, write_type_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_enum_type_decl, write_typedef_decl): Adjust to use
write_location.
* tests/data/test-read-write/test8.xml: New test input.
* tests/test-read-write.cc: De-serialize the above and serialize
it back and ensure both are equal.
* tests/Makefile.am: add tests/data/test-read-write/test8.xml to
the distribution.
2013-04-02 Dodji Seketeli <dodji@redhat.com>
Don't forget to init context & visibility in decl_base
* src/abg-ir.cc (decl_base::decl_base): Initialize context and
visibility on all the overloads of the constructor.
2013-03-31 Dodji Seketeli <dodji@redhat.com>
Fix some style
* src/abg-ir.h (decl_base::get_scope): Really re-style.
2013-03-31 Dodji Seketeli <dodji@redhat.com>
Fix some style
* src/abg-ir.h (decl_base::{get_location, set_location, get_name,
set_name}): Re-style.
2013-03-31 Dodji Seketeli <dodji@redhat.com>
Basic support for type/decl visibility
* src/abg-ir.h (enum decl_base::visibility)
(decl_base::get_visibility, decl_base::set_visibility)
(decl_base::m_visibility): New.
(decl_base::decl_base, scope_decl::scope_decl)
(type_decl::type_decl, enum_type_decl::enum_type_decl)
(typedef_decl::typedef_decl): Pass visibility.
* src/abg-ir.cc (decl_base::decl_base, scope_decl::scope_decl)
(type_decl::type_decl, enum_type_decl::enum_type_decl)
(typedef_decl::typedef_decl): Pass visibility.
(qualified_type_def::qualified_type_def)
(pointer_type_def::pointer_type_def)
(reference_type_def::reference_type_def): Initialize visibility.
2013-03-31 Dodji Seketeli <dodji@redhat.com>
A type/decl shouldn't hold a reference on its scope
* src/abg-ir.h (decl_base::m_context): Make this a naked pointer.
(decl_base::set_scope, add_decl_to_scope): Pass the
scope as a naked pointer.
* src/abg-ir.cc (decl_base::decl_base): Initialize the context to
0.
(decl_base::set_scope, add_decl_to_scope): Pass the scope as a
naked pointer.
* src/abg-reader.cc (read_context::get_cur_scope): Return a naked
pointer.
(handle_namespace_decl): Adjust accordingly.
2013-03-30 Dodji Seketeli <dodji@redhat.com>
Support typedef declarations
* src/abg-ir.cc (dynamic_type_hash::operator()): Handle hashing of
a pointer to an instance of typedef_decl.
(typedef_decl::typedef_decl, typedef_decl::operator==)
(typedef_decl::operator==, typedef_decl::get_underlying_type)
(typedef_decl::~typedef_decl): New definitions.
* src/abg-ir.h (class typedef_decl, struct typedef_decl_hash): New
declarations.
* src/abg-reader.cc (handle_typedef_decl): New definition.
(handle_element): Handle de-serialization of typedef-decl element.
* src/abg-writer.cc (write_typedef_decl): New definition.
(write_decl): Handle serialization of an instance of typedef_decl.
* tests/data/test-read-write/test7.xml: New test.
* tests/Makefile.am: Add it to the distribution.
* tests/test-read-write.cc: De-serialize the content of the new
test, serialize it back and diff both.
2013-03-30 Dodji Seketeli <dodji@redhat.com>
Remove useless static_cast from hashing code
* src/abg-ir.h (scope_type_decl_hash::operator())
(qualified_type_def_hash::operator())
(pointer_type_def_hash::operator())
(reference_type_def_hash::operator()): Remove useless static_cast.
2013-03-30 Dodji Seketeli <dodji@redhat.com>
Simplify equality operators
* src/abg-ir.cc (qualified_type_def::operator==)
(pointer_type_def::operator==, reference_type_def::operator==)
(enum_type_decl::operator==): Simplify the code by safely assuming
the underlying type is non-null.
2013-03-30 Dodji Seketeli <dodji@redhat.com>
Support enum type declarations
* src/abg-ir.h (class enum_type_decl, struct enum_type_decl_hash):
New declarations.
* src/abg-ir.cc (dynamic_type_hash::operator()): Add hashing
support for enum_type_decl.
(enum_type_decl::enum_type_decl)
(enum_type_decl::get_underlying_type)
(enum_type_decl::get_enumerators, enum_type_decl::~enum_type_decl)
(enum_type_decl::operator==): New definitions.
* src/abg-reader.cc (handle_enum_type_decl): New definition.
(handle_element): Handle "enum-decl" element.
* src/abg-writer.cc (write_enum_type_decl): New.
(write_decl): Add support to serialize enum_type_decl.
* tests/test-read-write.cc: De-serialize and serialize
data/test-read-write/test6.xml back.
* tests/data/test-read-write/test6.xml: New test input.
* tests/Makefile.am: Add it to the distribution.
2013-03-30 Dodji Seketeli <dodji@redhat.com>
Fix reference-type-def serialization
* tests/test-read-write.cc: Really de-serialize and then serialize
back data/test-read-write/test5.xml, not test4.xml. Sigh.
* src/abg-writer.cc (write_reference_type_def): As a result of
really trying to serialize reference type definitions fix the
serialization code here.
2013-03-29 Dodji Seketeli <dodji@redhat.com>
Support reference types
* src/abg-ir.h (class reference_type_def, struct pointer_type_def)
(struct reference_type_def): New declaration.
(type_base_hash::operator(), type_decl_hash::operator())
(scope_type_decl_hash::operator())
(qualified_type_def_hash::operator()): Include the typeid name in
the hash.
* src/abg-ir.cc (reference_type_def::reference_type_def)
(reference_type_def::operator==)
(reference_type_def::get_pointed_to_type)
(reference_type_def::is_lvalue)
(reference_type_def::~reference_type_def): New definitions.
(dynamic_type_hash::operator): Hash pointer_type_def and
reference_type_def instances.
* src/abg-reader.cc (read_context::finish_decl_creation)
(read_context::finish_type_decl_creation)
(handle_reference_type_def): New definitions.
(read_file): Handle "reference-type-def" elements.
(handle_type_decl, handle_namespace_decl)
(handle_qualified_type_decl, handle_pointer_type_def): Use the new
read_context::finish_type_decl_creation or
read_context::finish_decl_creation.
* src/abg-writer.cc (write_reference_type_def): New definition.
(write_decl): Supporting writing a pointer to an instance of
reference_type_def.
* tests/data/test-read-write/test5.xml: New test file.
* tests/test-read-write.cc: (De)Serialize it.
* tests/Makefile.am: Add it to the build system.
2013-03-28 Dodji Seketeli <dodji@redhat.com>
Support pointer types & Fix IR types equality
* src/abg-ir.h (location::{operator==, operator<})
(decl_base::operator==, scope_decl::operator==)
(type_base::operator==, struct type_shared_ptr_equal)
(type_decl::operator==, scope_type::operator==)
(qualified_type_def::operator==, class pointer_type_def): New
declarations..
* src/abg-ir.cc (decl_base::operator==, scope_decl::operator==)
(type_base::operator==, type_decl::operator==)
(scope_type_decl::operator==, namespace_decl::operator==)
(qualified_type_def::operator==)
(pointer_type_def::pointer_type_def, pointer_type_def::operator==)
(pointer_type_def::get_pointed_to_type)
(pointer_type_def::~pointer_type_def): New definitions.
* src/abg-reader.cc (handle_pointer_type_def): New definition.
(read_input): Handle pointer-type-def
elements.
* src/abg-writer.cc (type_shared_ptr_map): Make this map use the
use type_shared_ptr_equal predicate.
(write_pointer_type_def): New definition.
(write_decl): Improve logic. Support serializing a pointer to
pointer_type_def.
* tests/data/test-read-write/test4.xml: New test input file.
* tests/Makefile.am: Add tests/data/test-read-write/test4.xml to
the build system.
* tests/test-read-write.cc: (De)serialize the new test file.
2013-03-27 Dodji Seketeli <dodji@seketeli.org>
Support qualified types & Misc ancillary fixes
* src/abg-ir.h (struct type_base_hash, struct dynamic_type_hash)
(struct type_shared_ptr_hash, struct scope_type_decl_hash, class
qualified_type_def, struct qualified_type_def_hash): New.
(decl_base_hash::operator()): Constify. Don't crash if the scope
of the decl we are hashing is null.
(class type_decl): Add comment at the end.
(type_decl_hash::operator()): Constify. Reuse the new
type_base_hash hasher.
(class namespace_decl): Add comment.
* src/abg-ir.cc (qualified_type_def::qualified_type_def)
(qualified_type_def::~qualified_type_def)
(qualified_type_def::get_cv_quals)
(qualified_type_def::set_cv_quals)
(qualified_type_def::get_underlying_type)
(dynamic_type_hash::operator()): New function definitions.
* src/abg-reader.cc (handle_qualified_type_decl): New.
(read_file): Handle elements named "qualified-type-def".
(read::context::add_type_decl): Assert that
the type being associated to the unique ID is non-null.
(handle_type_decl): Fix this in the process; don't crash if some
attributes are not present. Associate the unique id present in
the xml document with the type we just parsed.
(handle_namespace_decl): Add some comments. Don't crash if the
name attribute is not present.
* src/abg-writer.cc (write_context::get_id_for_type)
(write_context::m_type_id_map, write_decl_location)
(write_qualified_type_def): New.
(write_decl): Handle instances of qualified_type_def.
(write_type_decl): Use the new write_decl_location and
write_context::get_id_for_type.
* tests/data/test-read-write/test0.xml: Update id format since we
are now using the new write_context::get_id_for_type to generate
it.
* tests/data/test-read-write/test1.xml: Likewise.
* tests/data/test-read-write/test2.xml: Likewise.
* tests/data/test-read-write/test3.xml: New test.
* tests/test-read-write.cc: Test De-serializing
tests/data/test-read-write/test3.xml and serializing it back.
Also don't bail out if we fail on one input.
* tests/Makefile.am: Add tests/data/test-read-write/test3.xml to the
distribution.
2013-03-27 Benjamin Kosnik <bkoz@redhat.com>
Various autotool adjustments
* configure: Add.
* configure.ac (AM_INIT_AUTOMAKE): Use gcc versions.
(PKG_CHECK_MODULES): Re-use libjava/classpath solution, naming.
* m4/pkg.m4: Add, take from classpath.
* src/Makefile.am: Adjust names.
2013-03-26 Dodji Seketeli <dodji@seketeli.org>
Remove the 'm_kind' member from the IR
* src/abg-ir.{h,cc}: Remove use of the m_kind field. We are using
full blown rtti so this uselessly just clutter the code.
2013-03-26 Dodji Seketeli <dodji@seketeli.org>
Fix parallel build
* tests/Makefile.am: Remove useless absolute reference to the
current directory.
2013-03-26 Dodji Seketeli <dodji@seketeli.org>
Fix depth handling during the parsing
* src/abg-reader.cc (read_context::get_cur_scope): Remove useless
const overload. Don't make this rely on m_cur_scope. Rather, use
the path to the current decl (from the root element) to compute
the cur scope.
(read_context::m_cur_scope, read_context::set_cur_scope): Remove
these.
(update_read_context): Re-think logic.
* tests/data/test-read-write/test2.xml: Add new test input.
* tests/Makefile.am: Add data/test-read-write/test2.xml to the
distribution.
* tests/test-read-write.cc: Add data/test-read-write/test2.xml to
the harness.
2013-03-25 Dodji Seketeli <dodji@seketeli.org>
Debug read-write of a type-decl in a namespace-decl
* abg-ir.{h,cc} (decl_base::decl_base, scope_decl::scope_decl)
(type_decl::type_decl, namespace_decl::namespace_decl): Do not
append a decl to its context from within its constructor. It's
better doing that in a function that takes shared_ptrs to decl and
context. That way we avoid memory management havoc.
(decl_base::set_scope): New private function.
(scope_decl::add_member_decl): Make this private.
(add_decl_to_scope): New function, friend of decl_base and
scope_decl.
* abg-reader.cc (read_context::get_cur_scope): Add a non-const
overload.
(handle_type_decl, handle_namespace_decl): Use add_decl_to_scope.
Adjust to new type_decl and namespace_decl constructor signature.
* src/abg-writer.cc (write_type): Emit 'id', not 'xml:id'.
(write_namespace_decl): Emit "namespace-decl", not
"namespace-decl-name", as the name of namespace element.
* tests/Makefile.am (test0.xml): Rename input0.xml into this.
(test1.xml): New test input.
* tests/data/test-read-write/test0.xml: Update to use 'id' as id
attribute, rather than xml:id.
* tests/data/test-read-write/test1.xml: New test.
* test-read-write.cc (struct InOutSpec): New
(main): Reorganize to give a list of input files to read and to
write to an output file, have the test read the input files, write
them, and diff the two.
2013-03-22 Dodji Seketeli <dodji@seketeli.org>
Update tests/data/test-read-write/input0.xml
* tests/data/test-read-write/input0.xml: Make this identical to
how it would look like when serialized.
2013-03-22 Dodji Seketeli <dodji@seketeli.org>
Debug type-decl serialization
* src/abg-writer.cc (do_indent): New function.
(write_corpus&): Use do_indent. Don't forget to close the
abi-instr tag.
(write_type_decl): Use do_indent. Handle null decls pointers.
Emit the id at the end of the element.
(write_namespace_decl): Use do_indent. Handle null decls
pointers.
* tests/test-utils.{h,cc} (get_src_dir,get_build_dir): Constify
the returned reference to string.
(is_dir, ensure_dir_path_created, ensure_parent_dir_created): New
function definitions.
* tests/test-read-write.cc (main): Augment the test to serialize
the corpus too.
2013-03-21 Dodji Seketeli <dodji@seketeli.org>
Debugged type-decl de-serialization
* src/abg-ir.cc (namespace_decl::~namespace_decl): Add this
missing virtual constructor definition.
* src/abg-reader.cc (read_context::{get_cur_decl,pop_decl}):
Return a null pointer when the decls stack is empty.
(update_read_context): Don't try to de-reference a NULL cur_decl.
(read_input): Don't try to poke at file validity here. What was I
thinking. Really test for advance_cursor to return 1, expressing
success.
* src/abg-reader.h (read_file): Fix style.
* Makefile.am: Add tests sub-directory.
* configure.ac: Build with debugging-friendly options if the
ABIGAIL_DEBUG env variable is set. Generate tests/Makefile.
* tests/Makefile.am: New file.
* tests/test-read-write.cc: Likewise.
* tests/test-utils.{h,cc}: Likewise.
* tests/data/test-read-write/input0.xml: Likewise.
2013-03-21 Dodji Seketeli <dodji@seketeli.org>
Initial implementation of serialization of basic types and namespaces.
* src/Makefile.am: Add abg-writer.{h,cc} and abg-config.{h,cc}.
* src/abg-config.{h,cc}: New files.
* src/abg-corpus.h (abi_corpus::decls_type): New typedef.
(abi_corpus::{add,get_decls,get_loc_mgr}): Fix style.
(abi_corpus::is_empty): Declare new function.
* src/abg-corpus.cc (abi_corpus::add): really add the declaration
to the corpus.
(abi_corpus::is_empty): Define new function.
* src/abg-ir.{h,cc} (location_manager::expand_location): Consti-fy
this function.
* src/abg-reader.cc (read_file): Add a corpus parameter.
* src/abg-serialize.cc: Delete this file.
* src/abg-writer.h (write_to_ostream): Rename write into this.
Make it take a corpus and an ostream as parameters.
* abg-writer.cc: New file.
2013-03-08 Dodji Seketeli <dodji@seketeli.org>
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-04 Dodji Seketeli <dodji@seketeli.org>
Updated hierarchy up to namespace_decl
* src/abg-ir.h (location): Make the default ctor public.
(class decl): Declare data member and proper constructors. Make the
context be a shared_ptr. Add a kind data member to avoid RTTI for
now.
(class scope_decl): Added protected constructor to handle the kind data
member.
(class type_base): Add data members proper and clean the iface up.
(class type_decl, scope_type_decl, namespace_decl): Iron out
constructors.
* src/abg-ir.cc (class location): Fix style.
(class decl, scope_decl, type_base, type_decl, scope_type_decl)
(namespace_decl): Define these types.
2013-03-01 Dodji Seketeli <dodji@seketeli.org>
Add missing autoconfiscation files into version control
* config.guess: Added to VCS.
* config.sub: Likewise.
* depcomp: Likewise.
* install-sh: Likewise.
* ltmain.sh: Likewise.
* missing: Likewise
2013-03-01 Dodji Seketeli <dodji@seketeli.org>
Upload m4 file
* m4/: Import this directory into version control.
2013-03-01 Dodji Seketeli <dodji@seketeli.org>
Create and expand locations
* src/abg-ir.h (class {location, location_manager, decl,
scoped_decl, type_base, type_decl, scope_type_decl): Declare new
types.
* src/abg-ir.cc (class {location, location_manager}): Define new types.
2013-03-01 Dodji Seketeli <dodji@seketeli.org>
Adjust src/Makefile.am after some file rename
* src/Makefile.am: Update build system for renaming files from
abgl-* into abg-*.
2013-03-01 Dodji Seketeli <dodji@seketeli.org>
Update the README file
* README: Update.
2013-02-28 Dodji Seketeli <dodji@seketeli.org>
Initial AUTHORS and README
* AUTHORS:
* README:
2013-02-28 Dodji Seketeli <dodji@seketeli.org>
Leave license stuff for later
* COPYING:
2013-02-28 Dodji Seketeli <dodji@seketeli.org>
Initial import Abigail
* AUTHORS:
* COPYING:
* ChangeLog:
* INSTALL:
* Makefile.am:
* NEWS:
* README:
* config.h.in:
* configure.ac:
* src/Makefile.am:
* src/abg-ir.cc:
* src/abg-ir.h:
|