1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 11835 11836 11837 11838 11839 11840 11841 11842 11843 11844 11845 11846 11847 11848 11849 11850 11851 11852 11853 11854 11855 11856 11857 11858 11859 11860 11861 11862 11863 11864 11865 11866 11867 11868 11869 11870 11871 11872 11873 11874 11875 11876 11877 11878 11879 11880 11881 11882 11883 11884 11885 11886 11887 11888 11889 11890 11891 11892 11893 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904 11905 11906 11907 11908 11909 11910 11911 11912 11913 11914 11915 11916 11917 11918 11919 11920 11921 11922 11923 11924 11925 11926 11927 11928 11929 11930 11931 11932 11933 11934 11935 11936 11937 11938 11939 11940 11941 11942 11943 11944 11945 11946 11947 11948 11949 11950 11951 11952 11953 11954 11955 11956 11957 11958 11959 11960 11961 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 11974 11975 11976 11977 11978 11979 11980 11981 11982 11983 11984 11985 11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 12005 12006 12007 12008 12009 12010 12011 12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 12028 12029 12030 12031 12032 12033 12034 12035 12036 12037 12038 12039 12040 12041 12042 12043 12044 12045 12046 12047 12048 12049 12050 12051 12052 12053 12054 12055 12056 12057 12058 12059 12060 12061 12062 12063 12064 12065 12066 12067 12068 12069 12070 12071 12072 12073 12074 12075 12076 12077 12078 12079 12080 12081 12082 12083 12084 12085 12086 12087 12088 12089 12090 12091 12092 12093 12094 12095 12096 12097 12098 12099 12100 12101 12102 12103 12104 12105 12106 12107 12108 12109 12110 12111 12112 12113 12114 12115 12116 12117 12118 12119 12120 12121 12122 12123 12124 12125 12126 12127 12128 12129 12130 12131 12132 12133 12134 12135 12136 12137 12138 12139 12140 12141 12142 12143 12144 12145 12146 12147 12148 12149 12150 12151 12152 12153 12154 12155 12156 12157 12158 12159 12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 12180 12181 12182 12183 12184 12185 12186 12187 12188 12189 12190 12191 12192 12193 12194 12195 12196 12197 12198 12199 12200 12201 12202 12203 12204 12205 12206 12207 12208 12209 12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 12220 12221 12222 12223 12224 12225 12226 12227 12228 12229 12230 12231 12232 12233 12234 12235 12236 12237 12238 12239 12240 12241 12242 12243 12244 12245 12246 12247 12248 12249 12250 12251 12252 12253 12254 12255 12256 12257 12258 12259 12260 12261 12262 12263 12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 12293 12294 12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 12324 12325 12326 12327 12328 12329 12330 12331 12332 12333 12334 12335 12336 12337 12338 12339 12340 12341 12342 12343 12344 12345 12346 12347 12348 12349 12350 12351 12352 12353 12354 12355 12356 12357 12358 12359 12360 12361 12362 12363 12364 12365 12366 12367 12368 12369 12370 12371 12372 12373 12374 12375 12376 12377 12378 12379 12380 12381 12382 12383 12384 12385 12386 12387 12388 12389 12390 12391 12392 12393 12394 12395 12396 12397 12398 12399 12400 12401 12402 12403 12404 12405 12406 12407 12408 12409 12410 12411 12412 12413 12414 12415 12416 12417 12418 12419 12420 12421 12422 12423 12424 12425 12426 12427 12428 12429 12430 12431 12432 12433 12434 12435 12436 12437 12438 12439 12440 12441 12442 12443 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 12457 12458 12459 12460 12461 12462 12463 12464 12465 12466 12467 12468 12469 12470 12471 12472 12473 12474 12475 12476 12477 12478 12479 12480 12481 12482 12483 12484 12485 12486 12487 12488 12489 12490 12491 12492 12493 12494 12495 12496 12497 12498 12499 12500 12501 12502 12503 12504 12505 12506 12507 12508 12509 12510 12511 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 12525 12526 12527 12528 12529 12530 12531 12532 12533 12534 12535 12536 12537 12538 12539 12540 12541 12542 12543 12544 12545 12546 12547 12548 12549 12550 12551 12552 12553 12554 12555 12556 12557 12558 12559 12560 12561 12562 12563 12564 12565 12566 12567 12568 12569 12570 12571 12572 12573 12574 12575 12576 12577 12578 12579 12580 12581 12582 12583 12584 12585 12586 12587 12588 12589 12590 12591 12592 12593 12594 12595 12596 12597 12598 12599 12600 12601 12602 12603 12604 12605 12606 12607 12608 12609 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 12623 12624 12625 12626 12627 12628 12629 12630 12631 12632 12633 12634 12635 12636 12637 12638 12639 12640 12641 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 12655 12656 12657 12658 12659 12660 12661 12662 12663 12664 12665 12666 12667 12668 12669 12670 12671 12672 12673 12674 12675 12676 12677 12678 12679 12680 12681 12682 12683 12684 12685 12686 12687 12688 12689 12690 12691 12692 12693 12694 12695 12696 12697 12698 12699 12700 12701 12702 12703 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 12724 12725 12726 12727 12728 12729 12730 12731 12732 12733 12734 12735 12736 12737 12738 12739 12740 12741 12742 12743 12744 12745 12746 12747 12748 12749 12750 12751 12752 12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 12846 12847 12848 12849 12850 12851 12852 12853 12854 12855 12856 12857 12858 12859 12860 12861 12862 12863 12864 12865 12866 12867 12868 12869 12870 12871 12872 12873 12874 12875 12876 12877 12878 12879 12880 12881 12882 12883 12884 12885 12886 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020 13021 13022 13023 13024 13025 13026 13027 13028 13029 13030 13031 13032 13033 13034 13035 13036 13037 13038 13039 13040 13041 13042 13043 13044 13045 13046 13047 13048 13049 13050 13051 13052 13053 13054 13055 13056 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 13072 13073 13074 13075 13076 13077 13078 13079 13080 13081 13082 13083 13084 13085 13086 13087 13088 13089 13090 13091 13092 13093 13094 13095 13096 13097 13098 13099 13100 13101 13102 13103 13104 13105 13106 13107 13108 13109 13110 13111 13112 13113 13114 13115 13116 13117 13118 13119 13120 13121 13122 13123 13124 13125 13126 13127 13128 13129 13130 13131 13132 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13143 13144 13145 13146 13147 13148 13149 13150 13151 13152 13153 13154 13155 13156 13157 13158 13159 13160 13161 13162 13163 13164 13165 13166 13167 13168 13169 13170 13171 13172 13173 13174 13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 13186 13187 13188 13189 13190 13191 13192 13193 13194 13195 13196 13197 13198 13199 13200 13201 13202 13203 13204 13205 13206 13207 13208 13209 13210 13211 13212 13213 13214 13215 13216 13217 13218 13219 13220 13221 13222 13223 13224 13225 13226 13227 13228 13229 13230 13231 13232 13233 13234 13235 13236 13237 13238 13239 13240 13241 13242 13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 13304 13305 13306 13307 13308 13309 13310 13311 13312 13313 13314 13315 13316 13317 13318 13319 13320 13321 13322 13323 13324 13325 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 13338 13339 13340 13341 13342 13343 13344 13345 13346 13347 13348 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361 13362 13363 13364 13365 13366 13367 13368 13369 13370 13371 13372 13373 13374 13375 13376 13377 13378 13379 13380 13381 13382 13383 13384 13385 13386 13387 13388 13389 13390 13391 13392 13393 13394 13395 13396 13397 13398 13399 13400 13401 13402 13403 13404 13405 13406 13407 13408 13409 13410 13411 13412 13413 13414 13415 13416 13417 13418 13419 13420 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 13438 13439 13440 13441 13442 13443 13444 13445 13446 13447 13448 13449 13450 13451 13452 13453 13454 13455 13456 13457 13458 13459 13460 13461 13462 13463 13464 13465 13466 13467 13468 13469 13470 13471 13472 13473 13474 13475 13476 13477 13478 13479 13480 13481 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 13496 13497 13498 13499 13500 13501 13502 13503 13504 13505 13506 13507 13508 13509 13510 13511 13512 13513 13514 13515 13516 13517 13518 13519 13520 13521 13522 13523 13524 13525 13526 13527 13528 13529 13530 13531 13532 13533 13534 13535 13536 13537 13538 13539 13540 13541 13542 13543 13544 13545 13546 13547 13548 13549 13550 13551 13552 13553 13554 13555 13556 13557 13558 13559 13560 13561 13562 13563 13564 13565 13566 13567 13568 13569 13570 13571 13572 13573 13574 13575 13576 13577 13578 13579 13580 13581 13582 13583 13584 13585 13586 13587 13588 13589 13590 13591 13592 13593 13594 13595 13596 13597 13598 13599 13600 13601 13602 13603 13604 13605 13606 13607 13608 13609 13610 13611 13612 13613 13614 13615 13616 13617 13618 13619 13620 13621 13622 13623 13624 13625 13626 13627 13628 13629 13630 13631 13632 13633 13634 13635 13636 13637 13638 13639 13640 13641 13642 13643 13644 13645 13646 13647 13648 13649 13650 13651 13652 13653 13654 13655 13656 13657 13658 13659 13660 13661 13662 13663 13664 13665 13666 13667 13668 13669 13670 13671 13672 13673 13674 13675 13676 13677 13678 13679 13680 13681 13682 13683 13684 13685 13686 13687 13688 13689 13690 13691 13692 13693 13694 13695 13696 13697 13698 13699 13700 13701 13702 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 13713 13714 13715 13716 13717 13718 13719 13720 13721 13722 13723 13724 13725 13726 13727 13728 13729 13730 13731 13732 13733 13734 13735 13736 13737 13738 13739 13740 13741 13742 13743 13744 13745 13746 13747 13748 13749 13750 13751 13752 13753 13754 13755 13756 13757 13758 13759 13760 13761 13762 13763 13764 13765 13766 13767 13768 13769 13770 13771 13772 13773 13774 13775 13776 13777 13778 13779 13780 13781 13782 13783 13784 13785 13786 13787 13788 13789 13790 13791 13792 13793 13794 13795 13796 13797 13798 13799 13800 13801 13802 13803 13804 13805 13806 13807 13808 13809 13810 13811 13812 13813 13814 13815 13816 13817 13818 13819 13820 13821 13822 13823 13824 13825 13826 13827 13828 13829 13830 13831 13832 13833 13834 13835 13836 13837 13838 13839 13840 13841 13842 13843 13844 13845 13846 13847 13848 13849 13850 13851 13852 13853 13854 13855 13856 13857 13858 13859 13860 13861 13862 13863 13864 13865 13866 13867 13868 13869 13870 13871 13872 13873 13874 13875 13876 13877 13878 13879 13880 13881 13882 13883 13884 13885 13886 13887 13888 13889 13890 13891 13892 13893 13894 13895 13896 13897 13898 13899 13900 13901 13902 13903 13904 13905 13906 13907 13908 13909 13910 13911 13912 13913 13914 13915 13916 13917 13918 13919 13920 13921 13922 13923 13924 13925 13926 13927 13928 13929 13930 13931 13932 13933 13934 13935 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069 14070 14071 14072 14073 14074 14075 14076 14077 14078 14079 14080 14081 14082 14083 14084 14085 14086 14087 14088 14089 14090 14091 14092 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 14117 14118 14119 14120 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 14138 14139 14140 14141 14142 14143 14144 14145 14146 14147 14148 14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 14169 14170 14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 14191 14192 14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257 14258 14259 14260 14261 14262 14263 14264 14265 14266 14267 14268 14269 14270 14271 14272 14273 14274 14275 14276 14277 14278 14279 14280 14281 14282 14283 14284 14285 14286 14287 14288 14289 14290 14291 14292 14293 14294 14295 14296 14297 14298 14299 14300 14301 14302 14303 14304 14305 14306 14307 14308 14309 14310 14311 14312 14313 14314 14315 14316 14317 14318 14319 14320 14321 14322 14323 14324 14325 14326 14327 14328 14329 14330 14331 14332 14333 14334 14335 14336 14337 14338 14339 14340 14341 14342 14343 14344 14345 14346 14347 14348 14349 14350 14351 14352 14353 14354 14355 14356 14357 14358 14359 14360 14361 14362 14363 14364 14365 14366 14367 14368 14369 14370 14371 14372 14373 14374 14375 14376 14377 14378 14379 14380 14381 14382 14383 14384 14385 14386 14387 14388 14389 14390 14391 14392 14393 14394 14395 14396 14397 14398 14399 14400 14401 14402 14403 14404 14405 14406 14407 14408 14409 14410 14411 14412 14413 14414 14415 14416 14417 14418 14419 14420 14421 14422 14423 14424 14425 14426 14427 14428 14429 14430 14431 14432 14433 14434 14435 14436 14437 14438 14439 14440 14441 14442 14443 14444 14445 14446 14447 14448 14449 14450 14451 14452 14453 14454 14455 14456 14457 14458 14459 14460 14461 14462 14463 14464 14465 14466 14467 14468 14469 14470 14471 14472 14473 14474 14475 14476 14477 14478 14479 14480 14481 14482 14483 14484 14485 14486 14487 14488 14489 14490 14491 14492 14493 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 14507 14508 14509 14510 14511 14512 14513 14514 14515 14516 14517 14518 14519 14520 14521 14522 14523 14524 14525 14526 14527 14528 14529 14530 14531 14532 14533 14534 14535 14536 14537 14538 14539 14540 14541 14542 14543 14544 14545 14546 14547 14548 14549 14550 14551 14552 14553 14554 14555 14556 14557 14558 14559 14560 14561 14562 14563 14564 14565 14566 14567 14568 14569 14570 14571 14572 14573 14574 14575 14576 14577 14578 14579 14580 14581 14582 14583 14584 14585 14586 14587 14588 14589 14590 14591 14592 14593 14594 14595 14596 14597 14598 14599 14600 14601 14602 14603 14604 14605 14606 14607 14608 14609 14610 14611 14612 14613 14614 14615 14616 14617 14618 14619 14620 14621 14622 14623 14624 14625 14626 14627 14628 14629 14630 14631 14632 14633 14634 14635 14636 14637 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14648 14649 14650 14651 14652 14653 14654 14655 14656 14657 14658 14659 14660 14661 14662 14663 14664 14665 14666 14667 14668 14669 14670 14671 14672 14673 14674 14675 14676 14677 14678 14679 14680 14681 14682 14683 14684 14685 14686 14687 14688 14689 14690 14691 14692 14693 14694 14695 14696 14697 14698 14699 14700 14701 14702 14703 14704 14705 14706 14707 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 14721 14722 14723 14724 14725 14726 14727 14728 14729 14730 14731 14732 14733 14734 14735 14736 14737 14738 14739 14740 14741 14742 14743 14744 14745 14746 14747 14748 14749 14750 14751 14752 14753 14754 14755 14756 14757 14758 14759 14760 14761 14762 14763 14764 14765 14766 14767 14768 14769 14770 14771 14772 14773 14774 14775 14776 14777 14778 14779 14780 14781 14782 14783 14784 14785 14786 14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 14823 14824 14825 14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 14853 14854 14855 14856 14857 14858 14859 14860 14861 14862 14863 14864 14865 14866 14867 14868 14869 14870 14871 14872 14873 14874 14875 14876 14877 14878 14879 14880 14881 14882 14883 14884 14885 14886 14887 14888 14889 14890 14891 14892 14893 14894 14895 14896 14897 14898 14899 14900 14901 14902 14903 14904 14905 14906 14907 14908 14909 14910 14911 14912 14913 14914 14915 14916 14917 14918 14919 14920 14921 14922 14923 14924 14925 14926 14927 14928 14929 14930 14931 14932 14933 14934 14935 14936 14937 14938 14939 14940 14941 14942 14943 14944 14945 14946 14947 14948 14949 14950 14951 14952 14953 14954 14955 14956 14957 14958 14959 14960 14961 14962 14963 14964 14965 14966 14967 14968 14969 14970 14971 14972 14973 14974 14975 14976 14977 14978 14979 14980 14981 14982 14983 14984 14985 14986 14987 14988 14989 14990 14991 14992 14993 14994 14995 14996 14997 14998 14999 15000 15001 15002 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 15019 15020 15021 15022 15023 15024 15025 15026 15027 15028 15029 15030 15031 15032 15033 15034 15035 15036 15037 15038 15039 15040 15041 15042 15043 15044 15045 15046 15047 15048 15049 15050 15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15126 15127 15128 15129 15130 15131 15132 15133 15134 15135 15136 15137 15138 15139 15140 15141 15142 15143 15144 15145 15146 15147 15148 15149 15150 15151 15152 15153 15154 15155 15156 15157 15158 15159 15160 15161 15162 15163 15164 15165 15166 15167 15168 15169 15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 15236 15237 15238 15239 15240 15241 15242 15243 15244 15245 15246 15247 15248 15249 15250 15251 15252 15253 15254 15255 15256 15257 15258 15259 15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 15330 15331 15332 15333 15334 15335 15336 15337 15338 15339 15340 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15352 15353 15354 15355 15356 15357 15358 15359 15360 15361 15362 15363 15364 15365 15366 15367 15368 15369 15370 15371 15372 15373 15374 15375 15376 15377 15378 15379 15380 15381 15382 15383 15384 15385 15386 15387 15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452 15453 15454 15455 15456 15457 15458 15459 15460 15461 15462 15463 15464 15465 15466 15467 15468 15469 15470 15471 15472 15473 15474 15475 15476 15477 15478 15479 15480 15481 15482 15483 15484 15485 15486 15487 15488 15489 15490 15491 15492 15493 15494 15495 15496 15497 15498 15499 15500 15501 15502 15503 15504 15505 15506 15507 15508 15509 15510 15511 15512 15513 15514 15515 15516 15517 15518 15519 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 15531 15532 15533 15534 15535 15536 15537 15538 15539 15540 15541 15542 15543 15544 15545 15546 15547 15548 15549 15550 15551 15552 15553 15554 15555 15556 15557 15558 15559 15560 15561 15562 15563 15564 15565 15566 15567 15568 15569 15570 15571 15572 15573 15574 15575 15576 15577 15578 15579 15580 15581 15582 15583 15584 15585 15586 15587 15588 15589 15590 15591 15592 15593 15594 15595 15596 15597 15598 15599 15600 15601 15602 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15613 15614 15615 15616 15617 15618 15619 15620 15621 15622 15623 15624 15625 15626 15627 15628 15629 15630 15631 15632 15633 15634 15635 15636 15637 15638 15639 15640 15641 15642 15643 15644 15645 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 15657 15658 15659 15660 15661 15662 15663 15664 15665 15666 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 15706 15707 15708 15709 15710 15711 15712 15713 15714 15715 15716 15717 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 15746 15747 15748 15749 15750 15751 15752 15753 15754 15755 15756 15757 15758 15759 15760 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 15772 15773 15774 15775 15776 15777 15778 15779 15780 15781 15782 15783 15784 15785 15786 15787 15788 15789 15790 15791 15792 15793 15794 15795 15796 15797 15798 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 15810 15811 15812 15813 15814 15815 15816 15817 15818 15819 15820 15821 15822 15823 15824 15825 15826 15827 15828 15829 15830 15831 15832 15833 15834 15835 15836 15837 15838 15839 15840 15841 15842 15843 15844 15845 15846 15847 15848 15849 15850 15851 15852 15853 15854 15855 15856 15857 15858 15859 15860 15861 15862 15863 15864 15865 15866 15867 15868 15869 15870 15871 15872 15873 15874 15875 15876 15877 15878 15879 15880 15881 15882 15883 15884 15885 15886 15887 15888 15889 15890 15891 15892 15893 15894 15895 15896 15897 15898 15899 15900 15901 15902 15903 15904 15905 15906 15907 15908 15909 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 15949 15950 15951 15952 15953 15954 15955 15956 15957 15958 15959 15960 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 15989 15990 15991 15992 15993 15994 15995 15996 15997 15998 15999 16000 16001 16002 16003 16004 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 16016 16017 16018 16019 16020 16021 16022 16023 16024 16025 16026 16027 16028 16029 16030 16031 16032 16033 16034 16035 16036 16037 16038 16039 16040 16041 16042 16043 16044 16045 16046 16047 16048 16049 16050 16051 16052 16053 16054 16055 16056 16057 16058 16059 16060 16061 16062 16063 16064 16065 16066 16067 16068 16069 16070 16071 16072 16073 16074 16075 16076 16077 16078 16079 16080 16081 16082 16083 16084 16085 16086 16087 16088 16089 16090 16091 16092 16093 16094 16095 16096 16097 16098 16099 16100 16101 16102 16103 16104 16105 16106 16107 16108 16109 16110 16111 16112 16113 16114 16115 16116 16117 16118 16119 16120 16121 16122 16123 16124 16125 16126 16127 16128 16129 16130 16131 16132 16133 16134 16135 16136 16137 16138 16139 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16151 16152 16153 16154 16155 16156 16157 16158 16159 16160 16161 16162 16163 16164 16165 16166 16167 16168 16169 16170 16171 16172 16173 16174 16175 16176 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 16187 16188 16189 16190 16191 16192 16193 16194 16195 16196 16197 16198 16199 16200 16201 16202 16203 16204 16205 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278 16279 16280 16281 16282 16283 16284 16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437 16438 16439 16440 16441 16442 16443 16444 16445 16446 16447 16448 16449 16450 16451 16452 16453 16454 16455 16456 16457 16458 16459 16460 16461 16462 16463 16464 16465 16466 16467 16468 16469 16470 16471 16472 16473 16474 16475 16476 16477 16478 16479 16480 16481 16482 16483 16484 16485 16486 16487 16488 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500 16501 16502 16503 16504 16505 16506 16507 16508 16509 16510 16511 16512 16513 16514 16515 16516 16517 16518 16519 16520 16521 16522 16523 16524 16525 16526 16527 16528 16529 16530 16531 16532 16533 16534 16535 16536 16537 16538 16539 16540 16541 16542 16543 16544 16545 16546 16547 16548 16549 16550 16551 16552 16553 16554 16555 16556 16557 16558 16559 16560 16561 16562 16563 16564 16565 16566 16567 16568 16569 16570 16571 16572 16573 16574 16575 16576 16577 16578 16579 16580 16581 16582 16583 16584 16585 16586 16587 16588 16589 16590 16591 16592 16593 16594 16595 16596 16597 16598 16599 16600 16601 16602 16603 16604 16605 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 16632 16633 16634 16635 16636 16637 16638 16639 16640 16641 16642 16643 16644 16645 16646 16647 16648 16649 16650 16651 16652 16653 16654 16655 16656 16657 16658 16659 16660 16661 16662 16663 16664 16665 16666 16667 16668 16669 16670 16671 16672 16673 16674 16675 16676 16677 16678 16679 16680 16681 16682 16683 16684 16685 16686 16687 16688 16689 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 16713 16714 16715 16716 16717 16718 16719 16720 16721 16722 16723 16724 16725 16726 16727 16728 16729 16730 16731 16732 16733 16734 16735 16736 16737 16738 16739 16740 16741 16742 16743 16744 16745 16746 16747 16748 16749 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16760 16761 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16772 16773 16774 16775 16776 16777 16778 16779 16780 16781 16782 16783 16784 16785 16786 16787 16788 16789 16790 16791 16792 16793 16794 16795 16796 16797 16798 16799 16800 16801 16802 16803 16804 16805 16806 16807 16808 16809 16810 16811 16812 16813 16814 16815 16816 16817 16818 16819 16820 16821 16822 16823 16824 16825 16826 16827 16828 16829 16830 16831 16832 16833 16834 16835 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 16853 16854 16855 16856 16857 16858 16859 16860 16861 16862 16863 16864 16865 16866 16867 16868 16869 16870 16871 16872 16873 16874 16875 16876 16877 16878 16879 16880 16881 16882 16883 16884 16885 16886 16887 16888 16889 16890 16891 16892 16893 16894 16895 16896 16897 16898 16899 16900 16901 16902 16903 16904 16905 16906 16907 16908 16909 16910 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923 16924 16925 16926 16927 16928 16929 16930 16931 16932 16933 16934 16935 16936 16937 16938 16939 16940 16941 16942 16943 16944 16945 16946 16947 16948 16949 16950 16951 16952 16953 16954 16955 16956 16957 16958 16959 16960 16961 16962 16963 16964 16965 16966 16967 16968 16969 16970 16971 16972 16973 16974 16975 16976 16977 16978 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 16990 16991 16992 16993 16994 16995 16996 16997 16998 16999 17000 17001 17002 17003 17004 17005 17006 17007 17008 17009 17010 17011 17012 17013 17014 17015 17016 17017 17018 17019 17020 17021 17022 17023 17024 17025 17026 17027 17028 17029 17030 17031 17032 17033 17034 17035 17036 17037 17038 17039 17040 17041 17042 17043 17044 17045 17046 17047 17048 17049 17050 17051 17052 17053 17054 17055 17056 17057 17058 17059 17060 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 17072 17073 17074 17075 17076 17077 17078 17079 17080 17081 17082 17083 17084 17085 17086 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 17102 17103 17104 17105 17106 17107 17108 17109 17110 17111 17112 17113 17114 17115 17116 17117 17118 17119 17120 17121 17122 17123 17124 17125 17126 17127 17128 17129 17130 17131 17132 17133 17134 17135 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 17146 17147 17148 17149 17150 17151 17152 17153 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 17170 17171 17172 17173 17174 17175 17176 17177 17178 17179 17180 17181 17182 17183 17184 17185 17186 17187 17188 17189 17190 17191 17192 17193 17194 17195 17196 17197 17198 17199 17200 17201 17202 17203 17204 17205 17206 17207 17208 17209 17210 17211 17212 17213 17214 17215 17216 17217 17218 17219 17220 17221 17222 17223 17224 17225 17226 17227 17228 17229 17230 17231 17232 17233 17234 17235 17236 17237 17238 17239 17240 17241 17242 17243 17244 17245 17246 17247 17248 17249 17250 17251 17252 17253 17254 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 17268 17269 17270 17271 17272 17273 17274 17275 17276 17277 17278 17279 17280 17281 17282 17283 17284 17285 17286 17287 17288 17289 17290 17291 17292 17293 17294 17295 17296 17297 17298 17299 17300 17301 17302 17303 17304 17305 17306 17307 17308 17309 17310 17311 17312 17313 17314 17315 17316 17317 17318 17319 17320 17321 17322 17323 17324 17325 17326 17327 17328 17329 17330 17331 17332 17333 17334 17335 17336 17337 17338 17339 17340 17341 17342 17343 17344 17345 17346 17347 17348 17349 17350 17351 17352 17353 17354 17355 17356 17357 17358 17359 17360 17361 17362 17363 17364 17365 17366 17367 17368 17369 17370 17371 17372 17373 17374 17375 17376 17377 17378 17379 17380 17381 17382 17383 17384 17385 17386 17387 17388 17389 17390 17391 17392 17393 17394 17395 17396 17397 17398 17399 17400 17401 17402 17403 17404 17405 17406 17407 17408 17409 17410 17411 17412 17413 17414 17415 17416 17417 17418 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 17433 17434 17435 17436 17437 17438 17439 17440 17441 17442 17443 17444 17445 17446 17447 17448 17449 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 17465 17466 17467 17468 17469 17470 17471 17472 17473 17474 17475 17476 17477 17478 17479 17480 17481 17482 17483 17484 17485 17486 17487 17488 17489 17490 17491 17492 17493 17494 17495 17496 17497 17498 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 17525 17526 17527 17528 17529 17530 17531 17532 17533 17534 17535 17536 17537 17538 17539 17540 17541 17542 17543 17544 17545 17546 17547 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17558 17559 17560 17561 17562 17563 17564 17565 17566 17567 17568 17569 17570 17571 17572 17573 17574 17575 17576 17577 17578 17579 17580 17581 17582 17583 17584 17585 17586 17587 17588 17589 17590 17591 17592 17593 17594 17595 17596 17597 17598 17599 17600 17601 17602 17603 17604 17605 17606 17607 17608 17609 17610 17611 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 17664 17665 17666 17667 17668 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 17684 17685 17686 17687 17688 17689 17690 17691 17692 17693 17694 17695 17696 17697 17698 17699 17700 17701 17702 17703 17704 17705 17706 17707 17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 17719 17720 17721 17722 17723 17724 17725 17726 17727 17728 17729 17730 17731 17732 17733 17734 17735 17736 17737 17738 17739 17740 17741 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 17752 17753 17754 17755 17756 17757 17758 17759 17760 17761 17762 17763 17764 17765 17766 17767 17768 17769 17770 17771 17772 17773 17774 17775 17776 17777 17778 17779 17780 17781 17782 17783 17784 17785 17786 17787 17788 17789 17790 17791 17792 17793 17794 17795 17796 17797 17798 17799 17800 17801 17802 17803 17804 17805 17806 17807 17808 17809 17810 17811 17812 17813 17814 17815 17816 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 17849 17850 17851 17852 17853 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 18070 18071 18072 18073 18074 18075 18076 18077 18078 18079 18080 18081 18082 18083 18084 18085 18086 18087 18088 18089 18090 18091 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 18129 18130 18131 18132 18133 18134 18135 18136 18137 18138 18139 18140 18141 18142 18143 18144 18145 18146 18147 18148 18149 18150 18151 18152 18153 18154 18155 18156 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 18168 18169 18170 18171 18172 18173 18174 18175 18176 18177 18178 18179 18180 18181 18182 18183 18184 18185 18186 18187 18188 18189 18190 18191 18192 18193 18194 18195 18196 18197 18198 18199 18200 18201 18202 18203 18204 18205 18206 18207 18208 18209 18210 18211 18212 18213 18214 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 18262 18263 18264 18265 18266 18267 18268 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 18455 18456 18457 18458 18459 18460 18461 18462 18463 18464 18465 18466 18467 18468 18469 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 18900 18901 18902 18903 18904 18905 18906 18907 18908 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 18924 18925 18926 18927 18928 18929 18930 18931 18932 18933 18934 18935 18936 18937 18938 18939 18940 18941 18942 18943 18944 18945 18946 18947 18948 18949 18950 18951 18952 18953 18954 18955 18956 18957 18958 18959 18960 18961 18962 18963 18964 18965 18966 18967 18968 18969 18970 18971 18972 18973 18974 18975 18976 18977 18978 18979 18980 18981 18982 18983 18984 18985 18986 18987 18988 18989 18990 18991 18992 18993 18994 18995 18996 18997 18998 18999 19000 19001 19002 19003 19004 19005 19006 19007 19008 19009 19010 19011 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 19229 19230 19231 19232 19233 19234 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 19287 19288 19289 19290 19291 19292 19293 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316 19317 19318 19319 19320 19321 19322 19323 19324 19325 19326 19327 19328 19329 19330 19331 19332 19333 19334 19335 19336 19337 19338 19339 19340 19341 19342 19343 19344 19345 19346 19347 19348 19349 19350 19351 19352 19353 19354 19355 19356 19357 19358 19359 19360 19361 19362 19363 19364 19365 19366 19367 19368 19369 19370 19371 19372 19373 19374 19375 19376 19377 19378 19379 19380 19381 19382 19383 19384 19385 19386 19387 19388 19389 19390 19391 19392 19393 19394 19395 19396 19397 19398 19399 19400 19401 19402 19403 19404 19405 19406 19407 19408 19409 19410 19411 19412 19413 19414 19415 19416 19417 19418 19419 19420 19421 19422 19423 19424 19425 19426 19427 19428 19429 19430 19431 19432 19433 19434 19435 19436 19437 19438 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 19454 19455 19456 19457 19458 19459 19460 19461 19462 19463 19464 19465 19466 19467 19468 19469 19470 19471 19472 19473 19474 19475 19476 19477 19478 19479 19480 19481 19482 19483 19484 19485 19486 19487 19488 19489 19490 19491 19492 19493 19494 19495 19496 19497 19498 19499 19500 19501 19502 19503 19504 19505 19506 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 19522 19523 19524 19525 19526 19527 19528 19529 19530 19531 19532 19533 19534 19535 19536 19537 19538 19539 19540 19541 19542 19543 19544 19545 19546 19547 19548 19549 19550 19551 19552 19553 19554 19555 19556 19557 19558 19559 19560 19561 19562 19563 19564 19565 19566 19567 19568 19569 19570 19571 19572 19573 19574 19575 19576 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 19588 19589 19590 19591 19592 19593 19594 19595 19596 19597 19598 19599 19600 19601 19602 19603 19604 19605 19606 19607 19608 19609 19610 19611 19612 19613 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 19625 19626 19627 19628 19629 19630 19631 19632 19633 19634 19635 19636 19637 19638 19639 19640 19641 19642 19643 19644 19645 19646 19647 19648 19649 19650 19651 19652 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 19701 19702 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 19719 19720 19721 19722 19723 19724 19725 19726 19727 19728 19729 19730 19731 19732 19733 19734 19735 19736 19737 19738 19739 19740 19741 19742 19743 19744 19745 19746 19747 19748 19749 19750 19751 19752 19753 19754 19755 19756 19757 19758 19759 19760 19761 19762 19763 19764 19765 19766 19767 19768 19769 19770 19771 19772 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787 19788 19789 19790 19791 19792 19793 19794 19795 19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 19869 19870 19871 19872 19873 19874 19875 19876 19877 19878 19879 19880 19881 19882 19883 19884 19885 19886 19887 19888 19889 19890 19891 19892 19893 19894 19895 19896 19897 19898 19899 19900 19901 19902 19903 19904 19905 19906 19907 19908 19909 19910 19911 19912 19913 19914 19915 19916 19917 19918 19919 19920 19921 19922 19923 19924 19925 19926 19927 19928 19929 19930 19931 19932 19933 19934 19935 19936 19937 19938 19939 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 20050 20051 20052 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 20063 20064 20065 20066 20067 20068 20069 20070 20071 20072 20073 20074 20075 20076 20077 20078 20079 20080 20081 20082 20083 20084 20085 20086 20087 20088 20089 20090 20091 20092 20093 20094 20095 20096 20097 20098 20099 20100 20101 20102 20103 20104 20105 20106 20107 20108 20109 20110 20111 20112 20113 20114 20115 20116 20117 20118 20119 20120 20121 20122 20123 20124 20125 20126 20127 20128 20129 20130 20131 20132 20133 20134 20135 20136 20137 20138 20139 20140 20141 20142 20143 20144 20145 20146 20147 20148 20149 20150 20151 20152 20153 20154 20155 20156 20157 20158 20159 20160 20161 20162 20163 20164 20165 20166 20167 20168 20169 20170 20171 20172 20173 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 20212 20213 20214 20215 20216 20217 20218 20219 20220 20221 20222 20223 20224 20225 20226 20227 20228 20229 20230 20231 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 20267 20268 20269 20270 20271 20272 20273 20274 20275 20276 20277 20278 20279 20280 20281 20282 20283 20284 20285 20286 20287 20288 20289 20290 20291 20292 20293 20294 20295 20296 20297 20298 20299 20300 20301 20302 20303 20304 20305 20306 20307 20308 20309 20310 20311 20312 20313 20314 20315 20316 20317 20318 20319 20320 20321 20322 20323 20324 20325 20326 20327 20328 20329 20330 20331 20332 20333 20334 20335 20336 20337 20338 20339 20340 20341 20342 20343 20344 20345 20346 20347 20348 20349 20350 20351 20352 20353 20354 20355 20356 20357 20358 20359 20360 20361 20362 20363 20364 20365 20366 20367 20368 20369 20370 20371 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 20395 20396 20397 20398 20399 20400 20401 20402 20403 20404 20405 20406 20407 20408 20409 20410 20411 20412 20413 20414 20415 20416 20417 20418 20419 20420 20421 20422 20423 20424 20425 20426 20427 20428 20429 20430 20431 20432 20433 20434 20435 20436 20437 20438 20439 20440 20441 20442 20443 20444 20445 20446 20447 20448 20449 20450 20451 20452 20453 20454 20455 20456 20457 20458 20459 20460 20461 20462 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 20473 20474 20475 20476 20477 20478 20479 20480 20481 20482 20483 20484 20485 20486 20487 20488 20489 20490 20491 20492 20493 20494 20495 20496 20497 20498 20499 20500 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20516 20517 20518 20519 20520 20521 20522 20523 20524 20525 20526 20527 20528 20529 20530 20531 20532 20533 20534 20535 20536 20537 20538 20539 20540 20541 20542 20543 20544 20545 20546 20547 20548 20549 20550 20551 20552 20553 20554 20555 20556 20557 20558 20559 20560 20561 20562 20563 20564 20565 20566 20567 20568 20569 20570 20571 20572 20573 20574 20575 20576 20577 20578 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 20616 20617 20618 20619 20620 20621 20622 20623 20624 20625 20626 20627 20628 20629 20630 20631 20632 20633 20634 20635 20636 20637 20638 20639 20640 20641 20642 20643 20644 20645 20646 20647 20648 20649 20650 20651 20652 20653 20654 20655 20656 20657 20658 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 20674 20675 20676 20677 20678 20679 20680 20681 20682 20683 20684 20685 20686 20687 20688 20689 20690 20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 20731 20732 20733 20734 20735 20736 20737 20738 20739 20740 20741 20742 20743 20744 20745 20746 20747 20748 20749 20750 20751 20752 20753 20754 20755 20756 20757 20758 20759 20760 20761 20762 20763 20764 20765 20766 20767 20768 20769 20770 20771 20772 20773 20774 20775 20776 20777 20778 20779 20780 20781 20782 20783 20784 20785 20786 20787 20788 20789 20790 20791 20792 20793 20794 20795 20796 20797 20798 20799 20800 20801 20802 20803 20804 20805 20806 20807 20808 20809 20810 20811 20812 20813 20814 20815 20816 20817 20818 20819 20820 20821 20822 20823 20824 20825 20826 20827 20828 20829 20830 20831 20832 20833 20834 20835 20836 20837 20838 20839 20840 20841 20842 20843 20844 20845 20846 20847 20848 20849 20850 20851 20852 20853 20854 20855 20856 20857 20858 20859 20860 20861 20862 20863 20864 20865 20866 20867 20868 20869 20870 20871 20872 20873 20874 20875 20876 20877 20878 20879 20880 20881 20882 20883 20884 20885 20886 20887 20888 20889 20890 20891 20892 20893 20894 20895 20896 20897 20898 20899 20900 20901 20902 20903 20904 20905 20906 20907 20908 20909 20910 20911 20912 20913 20914 20915 20916 20917 20918 20919 20920 20921 20922 20923 20924 20925 20926 20927 20928 20929 20930 20931 20932 20933 20934 20935 20936 20937 20938 20939 20940 20941 20942 20943 20944 20945 20946 20947 20948 20949 20950 20951 20952 20953 20954 20955 20956 20957 20958 20959 20960 20961 20962 20963 20964 20965 20966 20967 20968 20969 20970 20971 20972 20973 20974 20975 20976 20977 20978 20979 20980 20981 20982 20983 20984 20985 20986 20987 20988 20989 20990 20991 20992 20993 20994 20995 20996 20997 20998 20999 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21011 21012 21013 21014 21015 21016 21017 21018 21019 21020 21021 21022 21023 21024 21025 21026 21027 21028 21029 21030 21031 21032 21033 21034 21035 21036 21037 21038 21039 21040 21041 21042 21043 21044 21045 21046 21047 21048 21049 21050 21051 21052 21053 21054 21055 21056 21057 21058 21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 21073 21074 21075 21076 21077 21078 21079 21080 21081 21082 21083 21084 21085 21086 21087 21088 21089 21090 21091 21092 21093 21094 21095 21096 21097 21098 21099 21100 21101 21102 21103 21104 21105 21106 21107 21108 21109 21110 21111 21112 21113 21114 21115 21116 21117 21118 21119 21120 21121 21122 21123 21124 21125 21126 21127 21128 21129 21130 21131 21132 21133 21134 21135 21136 21137 21138 21139 21140 21141 21142 21143 21144 21145 21146 21147 21148 21149 21150 21151 21152 21153 21154 21155 21156 21157 21158 21159 21160 21161 21162 21163 21164 21165 21166 21167 21168 21169 21170 21171 21172 21173 21174 21175 21176 21177 21178 21179 21180 21181 21182 21183 21184 21185 21186 21187 21188 21189 21190 21191 21192 21193 21194 21195 21196 21197 21198 21199 21200 21201 21202 21203 21204 21205 21206 21207 21208 21209 21210 21211 21212 21213 21214 21215 21216 21217 21218 21219 21220 21221 21222 21223 21224 21225 21226 21227 21228 21229 21230 21231 21232 21233 21234 21235 21236 21237 21238 21239 21240 21241 21242 21243 21244 21245 21246 21247 21248 21249 21250 21251 21252 21253 21254 21255 21256 21257 21258 21259 21260 21261 21262 21263 21264 21265 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 21311 21312 21313 21314 21315 21316 21317 21318 21319 21320 21321 21322 21323 21324 21325 21326 21327 21328 21329 21330 21331 21332 21333 21334 21335 21336 21337 21338 21339 21340 21341 21342 21343 21344 21345 21346 21347 21348 21349 21350 21351 21352 21353 21354 21355 21356 21357 21358 21359 21360 21361 21362 21363 21364 21365 21366 21367 21368 21369 21370 21371 21372 21373 21374 21375 21376 21377 21378 21379 21380 21381 21382 21383 21384 21385 21386 21387 21388 21389 21390 21391 21392 21393 21394 21395 21396 21397 21398 21399 21400 21401 21402 21403 21404 21405 21406 21407 21408 21409 21410 21411 21412 21413 21414 21415 21416 21417 21418 21419 21420 21421 21422 21423 21424 21425 21426 21427 21428 21429 21430 21431 21432 21433 21434 21435 21436 21437 21438 21439 21440 21441 21442 21443 21444 21445 21446 21447 21448 21449 21450 21451 21452 21453 21454 21455 21456 21457 21458 21459 21460 21461 21462 21463 21464 21465 21466 21467 21468 21469 21470 21471 21472 21473 21474 21475 21476 21477 21478 21479 21480 21481 21482 21483 21484 21485 21486 21487 21488 21489 21490 21491 21492 21493 21494 21495 21496 21497 21498 21499 21500 21501 21502 21503 21504 21505 21506 21507 21508 21509 21510 21511 21512 21513 21514 21515 21516 21517 21518 21519 21520 21521 21522 21523 21524 21525 21526 21527 21528 21529 21530 21531 21532 21533 21534 21535 21536 21537 21538 21539 21540 21541 21542 21543 21544 21545 21546 21547 21548 21549 21550 21551 21552 21553 21554 21555 21556 21557 21558 21559 21560 21561 21562 21563 21564 21565 21566 21567 21568 21569 21570 21571 21572 21573 21574 21575 21576 21577 21578 21579 21580 21581 21582 21583 21584 21585 21586 21587 21588 21589 21590 21591 21592 21593 21594 21595 21596 21597 21598 21599 21600 21601 21602 21603 21604 21605 21606 21607 21608 21609 21610 21611 21612 21613 21614 21615 21616 21617 21618 21619 21620 21621 21622 21623 21624 21625 21626 21627 21628 21629 21630 21631 21632 21633 21634 21635 21636 21637 21638 21639 21640 21641 21642 21643 21644 21645 21646 21647 21648 21649 21650 21651 21652 21653 21654 21655 21656 21657 21658 21659 21660 21661 21662 21663 21664 21665 21666 21667 21668 21669 21670 21671 21672 21673 21674 21675 21676 21677 21678 21679 21680 21681 21682 21683 21684 21685 21686 21687 21688 21689 21690 21691 21692 21693 21694 21695 21696 21697 21698 21699 21700 21701 21702 21703 21704 21705 21706 21707 21708 21709 21710 21711 21712 21713 21714 21715 21716 21717 21718 21719 21720 21721 21722 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 21739 21740 21741 21742 21743 21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 21756 21757 21758 21759 21760 21761 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 21777 21778 21779 21780 21781 21782 21783 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 21812 21813 21814 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 21836 21837 21838 21839 21840 21841 21842 21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 21858 21859 21860 21861 21862 21863 21864 21865 21866 21867 21868 21869 21870 21871 21872 21873 21874 21875 21876 21877 21878 21879 21880 21881 21882 21883 21884 21885 21886 21887 21888 21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901 21902 21903 21904 21905 21906 21907 21908 21909 21910 21911 21912 21913 21914 21915 21916 21917 21918 21919 21920 21921 21922 21923 21924 21925 21926 21927 21928 21929 21930 21931 21932 21933 21934 21935 21936 21937 21938 21939 21940 21941 21942 21943 21944 21945 21946 21947 21948 21949 21950 21951 21952 21953 21954 21955 21956 21957 21958 21959 21960 21961 21962 21963 21964 21965 21966 21967 21968 21969 21970 21971 21972 21973 21974 21975 21976 21977 21978 21979 21980 21981 21982 21983 21984 21985 21986 21987 21988 21989 21990 21991 21992 21993 21994 21995 21996 21997 21998 21999 22000 22001 22002 22003 22004 22005 22006 22007 22008 22009 22010 22011 22012 22013 22014 22015 22016 22017 22018 22019 22020 22021 22022 22023 22024 22025 22026 22027 22028 22029 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 22065 22066 22067 22068 22069 22070 22071 22072 22073 22074 22075 22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 22118 22119 22120 22121 22122 22123 22124 22125 22126 22127 22128 22129 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 22240 22241 22242 22243 22244 22245 22246 22247 22248 22249 22250 22251 22252 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 22283 22284 22285 22286 22287 22288 22289 22290 22291 22292 22293 22294 22295 22296 22297 22298 22299 22300 22301 22302 22303 22304 22305 22306 22307 22308 22309 22310 22311 22312 22313 22314 22315 22316 22317 22318 22319 22320 22321 22322 22323 22324 22325 22326 22327 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 22338 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 22415 22416 22417 22418 22419 22420 22421 22422 22423 22424 22425 22426 22427 22428 22429 22430 22431 22432 22433 22434 22435 22436 22437 22438 22439 22440 22441 22442 22443 22444 22445 22446 22447 22448 22449 22450 22451 22452 22453 22454 22455 22456 22457 22458 22459 22460 22461 22462 22463 22464 22465 22466 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476 22477 22478 22479 22480 22481 22482 22483 22484 22485 22486 22487 22488 22489 22490 22491 22492 22493 22494 22495 22496 22497 22498 22499 22500 22501 22502 22503 22504 22505 22506 22507 22508 22509 22510 22511 22512 22513 22514 22515 22516 22517 22518 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 22537 22538 22539 22540 22541 22542 22543 22544 22545 22546 22547 22548 22549 22550 22551 22552 22553 22554 22555 22556 22557 22558 22559 22560 22561 22562 22563 22564 22565 22566 22567 22568 22569 22570 22571 22572 22573 22574 22575 22576 22577 22578 22579 22580 22581 22582 22583 22584 22585 22586 22587 22588 22589 22590 22591 22592 22593 22594 22595 22596 22597 22598 22599 22600 22601 22602 22603 22604 22605 22606 22607 22608 22609 22610 22611 22612 22613 22614 22615 22616 22617 22618 22619 22620 22621 22622 22623 22624 22625 22626 22627 22628 22629 22630 22631 22632 22633 22634 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 22650 22651 22652 22653 22654 22655 22656 22657 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 22668 22669 22670 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 22690 22691 22692 22693 22694 22695 22696 22697 22698 22699 22700 22701 22702 22703 22704 22705 22706 22707 22708 22709 22710 22711 22712 22713 22714 22715 22716 22717 22718 22719 22720 22721 22722 22723 22724 22725 22726 22727 22728 22729 22730 22731 22732 22733 22734 22735 22736 22737 22738 22739 22740 22741 22742 22743 22744 22745 22746 22747 22748 22749 22750 22751 22752 22753 22754 22755 22756 22757 22758 22759 22760 22761 22762 22763 22764 22765 22766 22767 22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 22806 22807 22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 22858 22859 22860 22861 22862 22863 22864 22865 22866 22867 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 22905 22906 22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 22922 22923 22924 22925 22926 22927 22928 22929 22930 22931 22932 22933 22934 22935 22936 22937 22938 22939 22940 22941 22942 22943 22944 22945 22946 22947 22948 22949 22950 22951 22952 22953 22954 22955 22956 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 22976 22977 22978 22979 22980 22981 22982 22983 22984 22985 22986 22987 22988 22989 22990 22991 22992 22993 22994 22995 22996 22997 22998 22999 23000 23001 23002 23003 23004 23005 23006 23007 23008 23009 23010 23011 23012 23013 23014 23015 23016 23017 23018 23019 23020 23021 23022 23023 23024 23025 23026 23027 23028 23029 23030 23031 23032 23033 23034 23035 23036 23037 23038 23039 23040 23041 23042 23043 23044 23045 23046 23047 23048 23049 23050 23051 23052 23053 23054 23055 23056 23057 23058 23059 23060 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 23076 23077 23078 23079 23080 23081 23082 23083 23084 23085 23086 23087 23088 23089 23090 23091 23092 23093 23094 23095 23096 23097 23098 23099 23100 23101 23102 23103 23104 23105 23106 23107 23108 23109 23110 23111 23112 23113 23114 23115 23116 23117 23118 23119 23120 23121 23122 23123 23124 23125 23126 23127 23128 23129 23130 23131 23132 23133 23134 23135 23136 23137 23138 23139 23140 23141 23142 23143 23144 23145 23146 23147 23148 23149 23150 23151 23152 23153 23154 23155 23156 23157 23158 23159 23160 23161 23162 23163 23164 23165 23166 23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 23182 23183 23184 23185 23186 23187 23188 23189 23190 23191 23192 23193 23194 23195 23196 23197 23198 23199 23200 23201 23202 23203 23204 23205 23206 23207 23208 23209 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 23225 23226 23227 23228 23229 23230 23231 23232 23233 23234 23235 23236 23237 23238 23239 23240 23241 23242 23243 23244 23245 23246 23247 23248 23249 23250 23251 23252 23253 23254 23255 23256 23257 23258 23259 23260 23261 23262 23263 23264 23265 23266 23267 23268 23269 23270 23271 23272 23273 23274 23275 23276 23277 23278 23279 23280 23281 23282 23283 23284 23285 23286 23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 23325 23326 23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 23344 23345 23346 23347 23348 23349 23350 23351 23352 23353 23354 23355 23356 23357 23358 23359 23360 23361 23362 23363 23364 23365 23366 23367 23368 23369 23370 23371 23372 23373 23374 23375 23376 23377 23378 23379 23380 23381 23382 23383 23384 23385 23386 23387 23388 23389 23390 23391 23392 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 23426 23427 23428 23429 23430 23431 23432 23433 23434 23435 23436 23437 23438 23439 23440 23441 23442 23443 23444 23445 23446 23447 23448 23449 23450 23451 23452 23453 23454 23455 23456 23457 23458 23459 23460 23461 23462 23463 23464 23465 23466 23467 23468 23469 23470 23471 23472 23473 23474 23475 23476 23477 23478 23479 23480 23481 23482 23483 23484 23485 23486 23487 23488 23489 23490 23491 23492 23493 23494 23495 23496 23497 23498 23499 23500 23501 23502 23503 23504 23505 23506 23507 23508 23509 23510 23511 23512 23513 23514 23515 23516 23517 23518 23519 23520 23521 23522 23523 23524 23525 23526 23527 23528 23529 23530 23531 23532 23533 23534 23535 23536 23537 23538 23539 23540 23541 23542 23543 23544 23545 23546 23547 23548 23549 23550 23551 23552 23553 23554 23555 23556 23557 23558 23559 23560 23561 23562 23563 23564 23565 23566 23567 23568 23569 23570 23571 23572 23573 23574 23575 23576 23577 23578 23579 23580 23581 23582 23583 23584 23585 23586 23587 23588 23589 23590 23591 23592 23593 23594 23595 23596 23597 23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 23617 23618 23619 23620 23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 23634 23635 23636 23637 23638 23639 23640 23641 23642 23643 23644 23645 23646 23647 23648 23649 23650 23651 23652 23653 23654 23655 23656 23657 23658 23659 23660 23661 23662 23663 23664 23665 23666 23667 23668 23669 23670 23671 23672 23673 23674 23675 23676 23677 23678 23679 23680 23681 23682 23683 23684 23685 23686 23687 23688 23689 23690 23691 23692 23693 23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 23704 23705 23706 23707 23708 23709 23710 23711 23712 23713 23714 23715 23716 23717 23718 23719 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 23730 23731 23732 23733 23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 23753 23754 23755 23756 23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 23776 23777 23778 23779 23780 23781 23782 23783 23784 23785 23786 23787 23788 23789 23790 23791 23792 23793 23794 23795 23796 23797 23798 23799 23800 23801 23802 23803 23804 23805 23806 23807 23808 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 23822 23823 23824 23825 23826 23827 23828 23829 23830 23831 23832 23833 23834 23835 23836 23837 23838 23839 23840 23841 23842 23843 23844 23845 23846 23847 23848 23849 23850 23851 23852 23853 23854 23855 23856 23857 23858 23859 23860 23861 23862 23863 23864 23865 23866 23867 23868 23869 23870 23871 23872 23873 23874 23875 23876 23877 23878 23879 23880 23881 23882 23883 23884 23885 23886 23887 23888 23889 23890 23891 23892 23893 23894 23895 23896 23897 23898 23899 23900 23901 23902 23903 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 23918 23919 23920 23921 23922 23923 23924 23925 23926 23927 23928 23929 23930 23931 23932 23933 23934 23935 23936 23937 23938 23939 23940 23941 23942 23943 23944 23945 23946 23947 23948 23949 23950 23951 23952 23953 23954 23955 23956 23957 23958 23959 23960 23961 23962 23963 23964 23965 23966 23967 23968 23969 23970 23971 23972 23973 23974 23975 23976 23977 23978 23979 23980 23981 23982 23983 23984 23985 23986 23987 23988 23989 23990 23991 23992 23993 23994 23995 23996 23997 23998 23999 24000 24001 24002 24003 24004 24005 24006 24007 24008 24009 24010 24011 24012 24013 24014 24015 24016 24017 24018 24019 24020 24021 24022 24023 24024 24025 24026 24027 24028 24029 24030 24031 24032 24033 24034 24035 24036 24037 24038 24039 24040 24041 24042 24043 24044 24045 24046 24047 24048 24049 24050 24051 24052 24053 24054 24055 24056 24057 24058 24059 24060 24061 24062 24063 24064 24065 24066 24067 24068 24069 24070 24071 24072 24073 24074 24075 24076 24077 24078 24079 24080 24081 24082 24083 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 24099 24100 24101 24102 24103 24104 24105 24106 24107 24108 24109 24110 24111 24112 24113 24114 24115 24116 24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 24147 24148 24149 24150 24151 24152 24153 24154 24155 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 24182 24183 24184 24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 24196 24197 24198 24199 24200 24201 24202 24203 24204 24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 24251 24252 24253 24254 24255 24256 24257 24258 24259 24260 24261 24262 24263 24264 24265 24266 24267 24268 24269 24270 24271 24272 24273 24274 24275 24276 24277 24278 24279 24280 24281 24282 24283 24284 24285 24286 24287 24288 24289 24290 24291 24292 24293 24294 24295 24296 24297 24298 24299 24300 24301 24302 24303 24304 24305 24306 24307 24308 24309 24310 24311 24312 24313 24314 24315 24316 24317 24318 24319 24320 24321 24322 24323 24324 24325 24326 24327 24328 24329 24330 24331 24332 24333 24334 24335 24336 24337 24338 24339 24340 24341 24342 24343 24344 24345 24346 24347 24348 24349 24350 24351 24352 24353 24354 24355 24356 24357 24358 24359 24360 24361 24362 24363 24364 24365 24366 24367 24368 24369 24370 24371 24372 24373 24374 24375 24376 24377 24378 24379 24380 24381 24382 24383 24384 24385 24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 24397 24398 24399 24400 24401 24402 24403 24404 24405 24406 24407 24408 24409 24410 24411 24412 24413 24414 24415 24416 24417 24418 24419 24420 24421 24422 24423 24424 24425 24426 24427 24428 24429 24430 24431 24432 24433 24434 24435 24436 24437 24438 24439 24440 24441 24442 24443 24444 24445 24446 24447 24448 24449 24450 24451 24452 24453 24454 24455 24456 24457 24458 24459 24460 24461 24462 24463 24464 24465 24466 24467 24468 24469 24470 24471 24472 24473 24474 24475 24476 24477 24478 24479 24480 24481 24482 24483 24484 24485 24486 24487 24488 24489 24490 24491 24492 24493 24494 24495 24496 24497 24498 24499 24500 24501 24502 24503 24504 24505 24506 24507 24508 24509 24510 24511 24512 24513 24514 24515 24516 24517 24518 24519 24520 24521 24522 24523 24524 24525 24526 24527 24528 24529 24530 24531 24532 24533 24534 24535 24536 24537 24538 24539 24540 24541 24542 24543 24544 24545 24546 24547 24548 24549 24550 24551 24552 24553 24554 24555 24556 24557 24558 24559 24560 24561 24562 24563 24564 24565 24566 24567 24568 24569 24570 24571 24572 24573 24574 24575 24576 24577 24578 24579 24580 24581 24582 24583 24584 24585 24586 24587 24588 24589 24590 24591 24592 24593 24594 24595 24596 24597 24598 24599 24600 24601 24602 24603 24604 24605 24606 24607 24608 24609 24610 24611 24612 24613 24614 24615 24616 24617 24618 24619 24620 24621 24622 24623 24624 24625 24626 24627 24628 24629 24630 24631 24632 24633 24634 24635 24636 24637 24638 24639 24640 24641 24642 24643 24644 24645 24646 24647 24648 24649 24650 24651 24652 24653 24654 24655 24656 24657 24658 24659 24660 24661 24662 24663 24664 24665 24666 24667 24668 24669 24670 24671 24672 24673 24674 24675 24676 24677 24678 24679 24680 24681 24682 24683 24684 24685 24686 24687 24688 24689 24690 24691 24692 24693 24694 24695 24696 24697 24698 24699 24700 24701 24702 24703 24704 24705 24706 24707 24708 24709 24710 24711 24712 24713 24714 24715 24716 24717 24718 24719 24720 24721 24722 24723 24724 24725 24726 24727 24728 24729 24730 24731 24732 24733 24734 24735 24736 24737 24738 24739 24740 24741 24742 24743 24744 24745 24746 24747 24748 24749 24750 24751 24752 24753 24754 24755 24756 24757 24758 24759 24760 24761 24762 24763 24764 24765 24766 24767 24768 24769 24770 24771 24772 24773 24774 24775 24776 24777 24778 24779 24780 24781 24782 24783 24784 24785 24786 24787 24788 24789 24790 24791 24792 24793 24794 24795 24796 24797 24798 24799 24800 24801 24802 24803 24804 24805 24806 24807 24808 24809 24810 24811 24812 24813 24814 24815 24816 24817 24818 24819 24820 24821 24822 24823 24824 24825 24826 24827 24828 24829 24830 24831 24832 24833 24834 24835 24836 24837 24838 24839 24840 24841 24842 24843 24844 24845 24846 24847 24848 24849 24850 24851 24852 24853 24854 24855 24856 24857 24858 24859 24860 24861 24862 24863 24864 24865 24866 24867 24868 24869 24870 24871 24872 24873 24874 24875 24876 24877 24878 24879 24880 24881 24882 24883 24884 24885 24886 24887 24888 24889 24890 24891 24892 24893 24894 24895 24896 24897 24898 24899 24900 24901 24902 24903 24904 24905 24906 24907 24908 24909 24910 24911 24912 24913 24914 24915 24916 24917 24918 24919 24920 24921 24922 24923 24924 24925 24926 24927 24928 24929 24930 24931 24932 24933 24934 24935 24936 24937 24938 24939 24940 24941 24942 24943 24944 24945 24946 24947 24948 24949 24950 24951 24952 24953 24954 24955 24956 24957 24958 24959 24960 24961 24962 24963 24964 24965 24966 24967 24968 24969 24970 24971 24972 24973 24974 24975 24976 24977 24978 24979 24980 24981 24982 24983 24984 24985 24986 24987 24988 24989 24990 24991 24992 24993 24994 24995 24996 24997 24998 24999 25000 25001 25002 25003 25004 25005 25006 25007 25008 25009 25010 25011 25012 25013 25014 25015 25016 25017 25018 25019 25020 25021 25022 25023 25024 25025 25026 25027 25028 25029 25030 25031 25032 25033 25034 25035 25036 25037 25038 25039 25040 25041 25042 25043 25044 25045 25046 25047 25048 25049 25050 25051 25052 25053 25054 25055 25056 25057 25058 25059 25060 25061 25062 25063 25064 25065 25066 25067 25068 25069 25070 25071 25072 25073 25074 25075 25076 25077 25078 25079 25080 25081 25082 25083 25084 25085 25086 25087 25088 25089 25090 25091 25092 25093 25094 25095 25096 25097 25098 25099 25100 25101 25102 25103 25104 25105 25106 25107 25108 25109 25110 25111 25112 25113 25114 25115 25116 25117 25118 25119 25120 25121 25122 25123 25124 25125 25126 25127 25128 25129 25130 25131 25132 25133 25134 25135 25136 25137 25138 25139 25140 25141 25142 25143 25144 25145 25146 25147 25148 25149 25150 25151 25152 25153 25154 25155 25156 25157 25158 25159 25160 25161 25162 25163 25164 25165 25166 25167 25168 25169 25170 25171 25172 25173 25174 25175 25176 25177 25178 25179 25180 25181 25182 25183 25184 25185 25186 25187 25188 25189 25190 25191 25192 25193 25194 25195 25196 25197 25198 25199 25200 25201 25202 25203 25204 25205 25206 25207 25208 25209 25210 25211 25212 25213 25214 25215 25216 25217 25218 25219 25220 25221 25222 25223 25224 25225 25226 25227 25228 25229 25230 25231 25232 25233 25234 25235 25236 25237 25238 25239 25240 25241 25242 25243 25244 25245 25246 25247 25248 25249 25250 25251 25252 25253 25254 25255 25256 25257 25258 25259 25260 25261 25262 25263 25264 25265 25266 25267 25268 25269 25270 25271 25272 25273 25274 25275 25276 25277 25278 25279 25280 25281 25282 25283 25284 25285 25286 25287 25288 25289 25290 25291 25292 25293 25294 25295 25296 25297 25298 25299 25300 25301 25302 25303 25304 25305 25306 25307 25308 25309 25310 25311 25312 25313 25314 25315 25316 25317 25318 25319 25320 25321 25322 25323 25324 25325 25326 25327 25328 25329 25330 25331 25332 25333 25334 25335 25336 25337 25338 25339 25340 25341 25342 25343 25344 25345 25346 25347 25348 25349 25350 25351 25352 25353 25354 25355 25356 25357 25358 25359 25360 25361 25362 25363 25364 25365 25366 25367 25368 25369 25370 25371 25372 25373 25374 25375 25376 25377 25378 25379 25380 25381 25382 25383 25384 25385 25386 25387 25388 25389 25390 25391 25392 25393 25394 25395 25396 25397 25398 25399 25400 25401 25402 25403 25404 25405 25406 25407 25408 25409 25410 25411 25412 25413 25414 25415 25416 25417 25418 25419 25420 25421 25422 25423 25424 25425 25426 25427 25428 25429 25430 25431 25432 25433 25434 25435 25436 25437 25438 25439 25440 25441 25442 25443 25444 25445 25446 25447 25448 25449 25450 25451 25452 25453 25454 25455 25456 25457 25458 25459 25460 25461 25462 25463 25464 25465 25466 25467 25468 25469 25470 25471 25472 25473 25474 25475 25476 25477 25478 25479 25480 25481 25482 25483 25484 25485 25486 25487 25488 25489 25490 25491 25492 25493 25494 25495 25496 25497 25498 25499 25500 25501 25502 25503 25504 25505 25506 25507 25508 25509 25510 25511 25512 25513 25514 25515 25516 25517 25518 25519 25520 25521 25522 25523 25524 25525 25526 25527 25528 25529 25530 25531 25532 25533 25534 25535 25536 25537 25538 25539 25540 25541 25542 25543 25544 25545 25546 25547 25548 25549 25550 25551 25552 25553 25554 25555 25556 25557 25558 25559 25560 25561 25562 25563 25564 25565 25566 25567 25568 25569 25570 25571 25572 25573 25574 25575 25576 25577 25578 25579 25580 25581 25582 25583 25584 25585 25586 25587 25588 25589 25590 25591 25592 25593 25594 25595 25596 25597 25598 25599 25600 25601 25602 25603 25604 25605 25606 25607 25608 25609 25610 25611 25612 25613 25614 25615 25616 25617 25618 25619 25620 25621 25622 25623 25624 25625 25626 25627 25628 25629 25630 25631 25632 25633 25634 25635 25636 25637 25638 25639 25640 25641 25642 25643 25644 25645 25646 25647 25648 25649 25650 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 25689 25690 25691 25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 25703 25704 25705 25706 25707 25708 25709 25710 25711 25712 25713 25714 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 25739 25740 25741 25742 25743 25744 25745 25746 25747 25748 25749 25750 25751 25752 25753 25754 25755 25756 25757 25758 25759 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 25775 25776 25777 25778 25779 25780 25781 25782 25783 25784 25785 25786 25787 25788 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 25807 25808 25809 25810 25811 25812 25813 25814 25815 25816 25817 25818 25819 25820 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 25844 25845 25846 25847 25848 25849 25850 25851 25852 25853 25854 25855 25856 25857 25858 25859 25860 25861 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 25897 25898 25899 25900 25901 25902 25903 25904 25905 25906 25907 25908 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949 25950 25951 25952 25953 25954 25955 25956 25957 25958 25959 25960 25961 25962 25963 25964 25965 25966 25967 25968 25969 25970 25971 25972 25973 25974 25975 25976 25977 25978 25979 25980 25981 25982 25983 25984 25985 25986 25987 25988 25989 25990 25991 25992 25993 25994 25995 25996 25997 25998 25999 26000 26001 26002 26003 26004 26005 26006 26007 26008 26009 26010 26011 26012 26013 26014 26015 26016 26017 26018 26019 26020 26021 26022 26023 26024 26025 26026 26027 26028 26029 26030 26031 26032 26033 26034 26035 26036 26037 26038 26039 26040 26041 26042 26043 26044 26045 26046 26047 26048 26049 26050 26051 26052 26053 26054 26055 26056 26057 26058 26059 26060 26061 26062 26063 26064 26065 26066 26067 26068 26069 26070 26071 26072 26073 26074 26075 26076 26077 26078 26079 26080 26081 26082 26083 26084 26085 26086 26087 26088 26089 26090 26091 26092 26093 26094 26095 26096 26097 26098 26099 26100 26101 26102 26103 26104 26105 26106 26107 26108 26109 26110 26111 26112 26113 26114 26115 26116 26117 26118 26119 26120 26121 26122 26123 26124 26125 26126 26127 26128 26129 26130 26131 26132 26133 26134 26135 26136 26137 26138 26139 26140 26141 26142 26143 26144 26145 26146 26147 26148 26149 26150 26151 26152 26153 26154 26155 26156 26157 26158 26159 26160 26161 26162 26163 26164 26165 26166 26167 26168 26169 26170 26171 26172 26173 26174 26175 26176 26177 26178 26179 26180 26181 26182 26183 26184 26185 26186 26187 26188 26189 26190 26191 26192 26193 26194 26195 26196 26197 26198 26199 26200 26201 26202 26203 26204 26205 26206 26207 26208 26209 26210 26211 26212 26213 26214 26215 26216 26217 26218 26219 26220 26221 26222 26223 26224 26225 26226 26227 26228 26229 26230 26231 26232 26233 26234 26235 26236 26237 26238 26239 26240 26241 26242 26243 26244 26245 26246 26247 26248 26249 26250 26251 26252 26253 26254 26255 26256 26257 26258 26259 26260 26261 26262 26263 26264 26265 26266 26267 26268 26269 26270 26271 26272 26273 26274 26275 26276 26277 26278 26279 26280 26281 26282 26283 26284 26285 26286 26287 26288 26289 26290 26291 26292 26293 26294 26295 26296 26297 26298 26299 26300 26301 26302 26303 26304 26305 26306 26307 26308 26309 26310 26311 26312 26313 26314 26315 26316 26317 26318 26319 26320 26321 26322 26323 26324 26325 26326 26327 26328 26329 26330 26331 26332 26333 26334 26335 26336 26337 26338 26339 26340 26341 26342 26343 26344 26345 26346 26347 26348 26349 26350 26351 26352 26353 26354 26355 26356 26357 26358 26359 26360 26361 26362 26363 26364 26365 26366 26367 26368 26369 26370 26371 26372 26373 26374 26375 26376 26377 26378 26379 26380 26381 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 26392 26393 26394 26395 26396 26397 26398 26399 26400 26401 26402 26403 26404 26405 26406 26407 26408 26409 26410 26411 26412 26413 26414 26415 26416 26417 26418 26419 26420 26421 26422 26423 26424 26425 26426 26427 26428 26429 26430 26431 26432 26433 26434 26435 26436 26437 26438 26439 26440 26441 26442 26443 26444 26445 26446 26447 26448 26449 26450 26451 26452 26453 26454 26455 26456 26457 26458 26459 26460 26461 26462 26463 26464 26465 26466 26467 26468 26469 26470 26471 26472 26473 26474 26475 26476 26477 26478 26479 26480 26481 26482 26483 26484 26485 26486 26487 26488 26489 26490 26491 26492 26493 26494 26495 26496 26497 26498 26499 26500 26501 26502 26503 26504 26505 26506 26507 26508 26509 26510 26511 26512 26513 26514 26515 26516 26517 26518 26519 26520 26521 26522 26523 26524 26525 26526 26527 26528 26529 26530 26531 26532 26533 26534 26535 26536 26537 26538 26539 26540 26541 26542 26543 26544 26545 26546 26547 26548 26549 26550 26551 26552 26553 26554 26555 26556 26557 26558 26559 26560 26561 26562 26563 26564 26565 26566 26567 26568 26569 26570 26571 26572 26573 26574 26575 26576 26577 26578 26579 26580 26581 26582 26583 26584 26585 26586 26587 26588 26589 26590 26591 26592 26593 26594 26595 26596 26597 26598 26599 26600 26601 26602 26603 26604 26605 26606 26607 26608 26609 26610 26611 26612 26613 26614 26615 26616 26617 26618 26619 26620 26621 26622 26623 26624 26625 26626 26627 26628 26629 26630 26631 26632 26633 26634 26635 26636 26637 26638 26639 26640 26641 26642 26643 26644 26645 26646 26647 26648 26649 26650 26651 26652 26653 26654 26655 26656 26657 26658 26659 26660 26661 26662 26663 26664 26665 26666 26667 26668 26669 26670 26671 26672 26673 26674 26675 26676 26677 26678 26679 26680 26681 26682 26683 26684 26685 26686 26687 26688 26689 26690 26691 26692 26693 26694 26695 26696 26697 26698 26699 26700 26701 26702 26703 26704 26705 26706 26707 26708 26709 26710 26711 26712 26713 26714 26715 26716 26717 26718 26719 26720 26721 26722 26723 26724 26725 26726 26727 26728 26729 26730 26731 26732 26733 26734 26735 26736 26737 26738 26739 26740 26741 26742 26743 26744 26745 26746 26747 26748 26749 26750 26751 26752 26753 26754 26755 26756 26757 26758 26759 26760 26761 26762 26763 26764 26765 26766 26767 26768 26769 26770 26771 26772 26773 26774 26775 26776 26777 26778 26779 26780 26781 26782 26783 26784 26785 26786 26787 26788 26789 26790 26791 26792 26793 26794 26795 26796 26797 26798 26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856 26857 26858 26859 26860 26861 26862 26863 26864 26865 26866 26867 26868 26869 26870 26871 26872 26873 26874 26875 26876 26877 26878 26879 26880 26881 26882 26883 26884 26885 26886 26887 26888 26889 26890 26891 26892 26893 26894 26895 26896 26897 26898 26899 26900 26901 26902 26903 26904 26905 26906 26907 26908 26909 26910 26911 26912 26913 26914 26915 26916 26917 26918 26919 26920 26921 26922 26923 26924 26925 26926 26927 26928 26929 26930 26931 26932 26933 26934 26935 26936 26937 26938 26939 26940 26941 26942 26943 26944 26945 26946 26947 26948 26949 26950 26951 26952 26953 26954 26955 26956 26957 26958 26959 26960 26961 26962 26963 26964 26965 26966 26967 26968 26969 26970 26971 26972 26973 26974 26975 26976 26977 26978 26979 26980 26981 26982 26983 26984 26985 26986 26987 26988 26989 26990 26991 26992 26993 26994 26995 26996 26997 26998 26999 27000 27001 27002 27003 27004 27005 27006 27007 27008 27009 27010 27011 27012 27013 27014 27015 27016 27017 27018 27019 27020 27021 27022 27023 27024 27025 27026 27027 27028 27029 27030 27031 27032 27033 27034 27035 27036 27037 27038 27039 27040 27041 27042 27043 27044 27045 27046 27047 27048 27049 27050 27051 27052 27053 27054 27055 27056 27057 27058 27059 27060 27061 27062 27063 27064 27065 27066 27067 27068 27069 27070 27071 27072 27073 27074 27075 27076 27077 27078 27079 27080 27081 27082 27083 27084 27085 27086 27087 27088 27089 27090 27091 27092 27093 27094 27095 27096 27097 27098 27099 27100 27101 27102 27103 27104 27105 27106 27107 27108 27109 27110 27111 27112 27113 27114 27115 27116 27117 27118 27119 27120 27121 27122 27123 27124 27125 27126 27127 27128 27129 27130 27131 27132 27133 27134 27135 27136 27137 27138 27139 27140 27141 27142 27143 27144 27145 27146 27147 27148 27149 27150 27151 27152 27153 27154 27155 27156 27157 27158 27159 27160 27161 27162 27163 27164 27165 27166 27167 27168 27169 27170 27171 27172 27173 27174 27175 27176 27177 27178 27179 27180 27181 27182 27183 27184 27185 27186 27187 27188 27189 27190 27191 27192 27193 27194 27195 27196 27197 27198 27199 27200 27201 27202 27203 27204 27205 27206 27207 27208 27209 27210 27211 27212 27213 27214 27215 27216 27217 27218 27219 27220 27221 27222 27223 27224 27225 27226 27227 27228 27229 27230 27231 27232 27233 27234 27235 27236 27237 27238 27239 27240 27241 27242 27243 27244 27245 27246 27247 27248 27249 27250 27251 27252 27253 27254 27255 27256 27257 27258 27259 27260 27261 27262 27263 27264 27265 27266 27267 27268 27269 27270 27271 27272 27273 27274 27275 27276 27277 27278 27279 27280 27281 27282 27283 27284 27285 27286 27287 27288 27289 27290 27291 27292 27293 27294 27295 27296 27297 27298 27299 27300 27301 27302 27303 27304 27305 27306 27307 27308 27309 27310 27311 27312 27313 27314 27315 27316 27317 27318 27319 27320 27321 27322 27323 27324 27325 27326 27327 27328 27329 27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 27343 27344 27345 27346 27347 27348 27349 27350 27351 27352 27353 27354 27355 27356 27357 27358 27359 27360 27361 27362 27363 27364 27365 27366 27367 27368 27369 27370 27371 27372 27373 27374 27375 27376 27377 27378 27379 27380 27381 27382 27383 27384 27385 27386 27387 27388 27389 27390 27391 27392 27393 27394 27395 27396 27397 27398 27399 27400 27401 27402 27403 27404 27405 27406 27407 27408 27409 27410 27411 27412 27413 27414 27415 27416 27417 27418 27419 27420 27421 27422 27423 27424 27425 27426 27427 27428 27429 27430 27431 27432 27433 27434 27435 27436 27437 27438 27439 27440 27441 27442 27443 27444 27445 27446 27447 27448 27449 27450 27451 27452 27453 27454 27455 27456 27457 27458 27459 27460 27461 27462 27463 27464 27465 27466 27467 27468 27469 27470 27471 27472 27473 27474 27475 27476 27477 27478 27479 27480 27481 27482 27483 27484 27485 27486 27487 27488 27489 27490 27491 27492 27493 27494 27495 27496 27497 27498 27499 27500 27501 27502 27503 27504 27505 27506 27507 27508 27509 27510 27511 27512 27513 27514 27515 27516 27517 27518 27519 27520 27521 27522 27523 27524 27525 27526 27527 27528 27529 27530 27531 27532 27533 27534 27535 27536 27537 27538 27539 27540 27541 27542 27543 27544 27545 27546 27547 27548 27549 27550 27551 27552 27553 27554 27555 27556 27557 27558 27559 27560 27561 27562 27563 27564 27565 27566 27567 27568 27569 27570 27571 27572 27573 27574 27575 27576 27577 27578 27579 27580 27581 27582 27583 27584 27585 27586 27587 27588 27589 27590 27591 27592 27593 27594 27595 27596 27597 27598 27599 27600 27601 27602 27603 27604 27605 27606 27607 27608 27609 27610 27611 27612 27613 27614 27615 27616 27617 27618 27619 27620 27621 27622 27623 27624 27625 27626 27627 27628 27629 27630 27631 27632 27633 27634 27635 27636 27637 27638 27639 27640 27641 27642 27643 27644 27645 27646 27647 27648 27649 27650 27651 27652 27653 27654 27655 27656 27657 27658 27659 27660 27661 27662 27663 27664 27665 27666 27667 27668 27669 27670 27671 27672 27673 27674 27675 27676 27677 27678 27679 27680 27681 27682 27683 27684 27685 27686 27687 27688 27689 27690 27691 27692 27693 27694 27695 27696 27697 27698 27699 27700 27701 27702 27703 27704 27705 27706 27707 27708 27709 27710 27711 27712 27713 27714 27715 27716 27717 27718 27719 27720 27721 27722 27723 27724 27725 27726 27727 27728 27729 27730 27731 27732 27733 27734 27735 27736 27737 27738 27739 27740 27741 27742 27743 27744 27745 27746 27747 27748 27749 27750 27751 27752 27753 27754 27755 27756 27757 27758 27759 27760 27761 27762 27763 27764 27765 27766 27767 27768 27769 27770 27771 27772 27773 27774 27775 27776 27777 27778 27779 27780 27781 27782 27783 27784 27785 27786 27787 27788 27789 27790 27791 27792 27793 27794 27795 27796 27797 27798 27799 27800 27801 27802 27803 27804 27805 27806 27807 27808 27809 27810 27811 27812 27813 27814 27815 27816 27817 27818 27819 27820 27821 27822 27823 27824 27825 27826 27827 27828 27829 27830 27831 27832 27833 27834 27835 27836 27837 27838 27839 27840 27841 27842 27843 27844 27845 27846 27847 27848 27849 27850 27851 27852 27853 27854 27855 27856 27857 27858 27859 27860 27861 27862 27863 27864 27865 27866 27867 27868 27869 27870 27871 27872 27873 27874 27875 27876 27877 27878 27879 27880 27881 27882 27883 27884 27885 27886 27887 27888 27889 27890 27891 27892 27893 27894 27895 27896 27897 27898 27899 27900 27901 27902 27903 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951 27952 27953 27954 27955 27956 27957 27958 27959 27960 27961 27962 27963 27964 27965 27966 27967 27968 27969 27970 27971 27972 27973 27974 27975 27976 27977 27978 27979 27980 27981 27982 27983 27984 27985 27986 27987 27988 27989 27990 27991 27992 27993 27994 27995 27996 27997 27998 27999 28000 28001 28002 28003 28004 28005 28006 28007 28008 28009 28010 28011 28012 28013 28014 28015 28016 28017 28018 28019 28020 28021 28022 28023 28024 28025 28026 28027 28028 28029 28030 28031 28032 28033 28034 28035 28036 28037 28038 28039 28040 28041 28042 28043 28044 28045 28046 28047 28048 28049 28050 28051 28052 28053 28054 28055 28056 28057 28058 28059 28060 28061 28062 28063 28064 28065 28066 28067 28068 28069 28070 28071 28072 28073 28074 28075 28076 28077 28078 28079 28080 28081 28082 28083 28084 28085 28086 28087 28088 28089 28090 28091 28092 28093 28094 28095 28096 28097 28098 28099 28100 28101 28102 28103 28104 28105 28106 28107 28108 28109 28110 28111 28112 28113 28114 28115 28116 28117 28118 28119 28120 28121 28122 28123 28124 28125 28126 28127 28128 28129 28130 28131 28132 28133 28134 28135 28136 28137 28138 28139 28140 28141 28142 28143 28144 28145 28146 28147 28148 28149 28150 28151 28152 28153 28154 28155 28156 28157 28158 28159 28160 28161 28162 28163 28164 28165 28166 28167 28168 28169 28170 28171 28172 28173 28174 28175 28176 28177 28178 28179 28180 28181 28182 28183 28184 28185 28186 28187 28188 28189 28190 28191 28192 28193 28194 28195 28196 28197 28198 28199 28200 28201 28202 28203 28204 28205 28206 28207 28208 28209 28210 28211 28212 28213 28214 28215 28216 28217 28218 28219 28220 28221 28222 28223 28224 28225 28226 28227 28228 28229 28230 28231 28232 28233 28234 28235 28236 28237 28238 28239 28240 28241 28242 28243 28244 28245 28246 28247 28248 28249 28250 28251 28252 28253 28254 28255 28256 28257 28258 28259 28260 28261 28262 28263 28264 28265 28266 28267 28268 28269 28270 28271 28272 28273 28274 28275 28276 28277 28278 28279 28280 28281 28282 28283 28284 28285 28286 28287 28288 28289 28290 28291 28292 28293 28294 28295 28296 28297 28298 28299 28300 28301 28302 28303 28304 28305 28306 28307 28308 28309 28310 28311 28312 28313 28314 28315 28316 28317 28318 28319 28320 28321 28322 28323 28324 28325 28326 28327 28328 28329 28330 28331 28332 28333 28334 28335 28336 28337 28338 28339 28340 28341 28342 28343 28344 28345 28346 28347 28348 28349 28350 28351 28352 28353 28354 28355 28356 28357 28358 28359 28360 28361 28362 28363 28364 28365 28366 28367 28368 28369 28370 28371 28372 28373 28374 28375 28376 28377 28378 28379 28380 28381 28382 28383 28384 28385 28386 28387 28388 28389 28390 28391 28392 28393 28394 28395 28396 28397 28398 28399 28400 28401 28402 28403 28404 28405 28406 28407 28408 28409 28410 28411 28412 28413 28414 28415 28416 28417 28418 28419 28420 28421 28422 28423 28424 28425 28426 28427 28428 28429 28430 28431 28432 28433 28434 28435 28436 28437 28438 28439 28440 28441 28442 28443 28444 28445 28446 28447 28448 28449 28450 28451 28452 28453 28454 28455 28456 28457 28458 28459 28460 28461 28462 28463 28464 28465 28466 28467 28468 28469 28470 28471 28472 28473 28474 28475 28476 28477 28478 28479 28480 28481 28482 28483 28484 28485 28486 28487 28488 28489 28490 28491 28492 28493 28494 28495 28496 28497 28498 28499 28500 28501 28502 28503 28504 28505 28506 28507 28508 28509 28510 28511 28512 28513 28514 28515 28516 28517 28518 28519 28520 28521 28522 28523 28524 28525 28526 28527 28528 28529 28530 28531 28532 28533 28534 28535 28536 28537 28538 28539 28540 28541 28542 28543 28544 28545 28546 28547 28548 28549 28550 28551 28552 28553 28554 28555 28556 28557 28558 28559 28560 28561 28562 28563 28564 28565 28566 28567 28568 28569 28570 28571 28572 28573 28574 28575 28576 28577 28578 28579 28580 28581 28582 28583 28584 28585 28586 28587 28588 28589 28590 28591 28592 28593 28594 28595 28596 28597 28598 28599 28600 28601 28602 28603 28604 28605 28606 28607 28608 28609 28610 28611 28612 28613 28614 28615 28616 28617 28618 28619 28620 28621 28622 28623 28624 28625 28626 28627 28628 28629 28630 28631 28632 28633 28634 28635 28636 28637 28638 28639 28640 28641 28642 28643 28644 28645 28646 28647 28648 28649 28650 28651 28652 28653 28654 28655 28656 28657 28658 28659 28660 28661 28662 28663 28664 28665 28666 28667 28668 28669 28670 28671 28672 28673 28674 28675 28676 28677 28678 28679 28680 28681 28682 28683 28684 28685 28686 28687 28688 28689 28690 28691 28692 28693 28694 28695 28696 28697 28698 28699 28700 28701 28702 28703 28704 28705 28706 28707 28708 28709 28710 28711 28712 28713 28714 28715 28716 28717 28718 28719 28720 28721 28722 28723 28724 28725 28726 28727 28728 28729 28730 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 28746 28747 28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774 28775 28776 28777 28778 28779 28780 28781 28782 28783 28784 28785 28786 28787 28788 28789 28790 28791 28792 28793 28794 28795 28796 28797 28798 28799 28800 28801 28802 28803 28804 28805 28806 28807 28808 28809 28810 28811 28812 28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 28825 28826 28827 28828 28829 28830 28831 28832 28833 28834 28835 28836 28837 28838 28839 28840 28841 28842 28843 28844 28845 28846 28847 28848 28849 28850 28851 28852 28853 28854 28855 28856 28857 28858 28859 28860 28861 28862 28863 28864 28865 28866 28867 28868 28869 28870 28871 28872 28873 28874 28875 28876 28877 28878 28879 28880 28881 28882 28883 28884 28885 28886 28887 28888 28889 28890 28891 28892 28893 28894 28895 28896 28897 28898 28899 28900 28901 28902 28903 28904 28905 28906 28907 28908 28909 28910 28911 28912 28913 28914 28915 28916 28917 28918 28919 28920 28921 28922 28923 28924 28925 28926 28927 28928 28929 28930 28931 28932 28933 28934 28935 28936 28937 28938 28939 28940 28941 28942 28943 28944 28945 28946 28947 28948 28949 28950 28951 28952 28953 28954 28955 28956 28957 28958 28959 28960 28961 28962 28963 28964 28965 28966 28967 28968 28969 28970 28971 28972 28973 28974 28975 28976 28977 28978 28979 28980 28981 28982 28983 28984 28985 28986 28987 28988 28989 28990 28991 28992 28993 28994 28995 28996 28997 28998 28999 29000 29001 29002 29003 29004 29005 29006 29007 29008 29009 29010 29011 29012 29013 29014 29015 29016 29017 29018 29019 29020 29021 29022 29023 29024 29025 29026 29027 29028 29029 29030 29031 29032 29033 29034 29035 29036 29037 29038 29039 29040 29041 29042 29043 29044 29045 29046 29047 29048 29049 29050 29051 29052 29053 29054 29055 29056 29057 29058 29059 29060 29061 29062 29063 29064 29065 29066 29067 29068 29069 29070 29071 29072 29073 29074 29075 29076 29077 29078 29079 29080 29081 29082 29083 29084 29085 29086 29087 29088 29089 29090 29091 29092 29093 29094 29095 29096 29097 29098 29099 29100 29101 29102 29103 29104 29105 29106 29107 29108 29109 29110 29111 29112 29113 29114 29115 29116 29117 29118 29119 29120 29121 29122 29123 29124 29125 29126 29127 29128 29129 29130 29131 29132 29133 29134 29135 29136 29137 29138 29139 29140 29141 29142 29143 29144 29145 29146 29147 29148 29149 29150 29151 29152 29153 29154 29155 29156 29157 29158 29159 29160 29161 29162 29163 29164 29165 29166 29167 29168 29169 29170 29171 29172 29173 29174 29175 29176 29177 29178 29179 29180 29181 29182 29183 29184 29185 29186 29187 29188 29189 29190 29191 29192 29193 29194 29195 29196 29197 29198 29199 29200 29201 29202 29203 29204 29205 29206 29207 29208 29209 29210 29211 29212 29213 29214 29215 29216 29217 29218 29219 29220 29221 29222 29223 29224 29225 29226 29227 29228 29229 29230 29231 29232 29233 29234 29235 29236 29237 29238 29239 29240 29241 29242 29243 29244 29245 29246 29247 29248 29249 29250 29251 29252 29253 29254 29255 29256 29257 29258 29259 29260 29261 29262 29263 29264 29265 29266 29267 29268 29269 29270 29271 29272 29273 29274 29275 29276 29277 29278 29279 29280 29281 29282 29283 29284 29285 29286 29287 29288 29289 29290 29291 29292 29293 29294 29295 29296 29297 29298 29299 29300 29301 29302 29303 29304 29305 29306 29307 29308 29309 29310 29311 29312 29313 29314 29315 29316 29317 29318 29319 29320 29321 29322 29323 29324 29325 29326 29327 29328 29329 29330 29331 29332 29333 29334 29335 29336 29337 29338 29339 29340 29341 29342 29343 29344 29345 29346 29347 29348 29349 29350 29351 29352 29353 29354 29355 29356 29357 29358 29359 29360 29361 29362 29363 29364 29365 29366 29367 29368 29369 29370 29371 29372 29373 29374 29375 29376 29377 29378 29379 29380 29381 29382 29383 29384 29385 29386 29387 29388 29389 29390 29391 29392 29393 29394 29395 29396 29397 29398 29399 29400 29401 29402 29403 29404 29405 29406 29407 29408 29409 29410 29411 29412 29413 29414 29415 29416 29417 29418 29419 29420 29421 29422 29423 29424 29425 29426 29427 29428 29429 29430 29431 29432 29433 29434 29435 29436 29437 29438 29439 29440 29441 29442 29443 29444 29445 29446 29447 29448 29449 29450 29451 29452 29453 29454 29455 29456 29457 29458 29459 29460 29461 29462 29463 29464 29465 29466 29467 29468 29469 29470 29471 29472 29473 29474 29475 29476 29477 29478 29479 29480 29481 29482 29483 29484 29485 29486 29487 29488 29489 29490 29491 29492 29493 29494 29495 29496 29497 29498 29499 29500 29501 29502 29503 29504 29505 29506 29507 29508 29509 29510 29511 29512 29513 29514 29515 29516 29517 29518 29519 29520 29521 29522 29523 29524 29525 29526 29527 29528 29529 29530 29531 29532 29533 29534 29535 29536 29537 29538 29539 29540 29541 29542 29543 29544 29545 29546 29547 29548 29549 29550 29551 29552 29553 29554 29555 29556 29557 29558 29559 29560 29561 29562 29563 29564 29565 29566 29567 29568 29569 29570 29571 29572 29573 29574 29575 29576 29577 29578 29579 29580 29581 29582 29583 29584 29585 29586 29587 29588 29589 29590 29591 29592 29593 29594 29595 29596 29597 29598 29599 29600 29601 29602 29603 29604 29605 29606 29607 29608 29609 29610 29611 29612 29613 29614 29615 29616 29617 29618 29619 29620 29621 29622 29623 29624 29625 29626 29627 29628 29629 29630 29631 29632 29633 29634 29635 29636 29637 29638 29639 29640 29641 29642 29643 29644 29645 29646 29647 29648 29649 29650 29651 29652 29653 29654 29655 29656 29657 29658 29659 29660 29661 29662 29663 29664 29665 29666 29667 29668 29669 29670 29671 29672 29673 29674 29675 29676 29677 29678 29679 29680 29681 29682 29683 29684 29685 29686 29687 29688 29689 29690 29691 29692 29693 29694 29695 29696 29697 29698 29699 29700 29701 29702 29703 29704 29705 29706 29707 29708 29709 29710 29711 29712 29713 29714 29715 29716 29717 29718 29719 29720 29721 29722 29723 29724 29725 29726 29727 29728 29729 29730 29731 29732 29733 29734 29735 29736 29737 29738 29739 29740 29741 29742 29743 29744 29745 29746 29747 29748 29749 29750 29751 29752 29753 29754 29755 29756 29757 29758 29759 29760 29761 29762 29763 29764 29765 29766 29767 29768 29769 29770 29771 29772 29773 29774 29775 29776 29777 29778 29779 29780 29781 29782 29783 29784 29785 29786 29787 29788 29789 29790 29791 29792 29793 29794 29795 29796 29797 29798 29799 29800 29801 29802 29803 29804 29805 29806 29807 29808 29809 29810 29811 29812 29813 29814 29815 29816 29817 29818 29819 29820 29821 29822 29823 29824 29825 29826 29827 29828 29829 29830 29831 29832 29833 29834 29835 29836 29837 29838 29839 29840 29841 29842 29843 29844 29845 29846 29847 29848 29849 29850 29851 29852 29853 29854 29855 29856 29857 29858 29859 29860 29861 29862 29863 29864 29865 29866 29867 29868 29869 29870 29871 29872 29873 29874 29875 29876 29877 29878 29879 29880 29881 29882 29883 29884 29885 29886 29887 29888 29889 29890 29891 29892 29893 29894 29895 29896 29897 29898 29899 29900 29901 29902 29903 29904 29905 29906 29907 29908 29909 29910 29911 29912 29913 29914 29915 29916 29917 29918 29919 29920 29921 29922 29923 29924 29925 29926 29927 29928 29929 29930 29931 29932 29933 29934 29935 29936 29937 29938 29939 29940 29941 29942 29943 29944 29945 29946 29947 29948 29949 29950 29951 29952 29953 29954 29955 29956 29957 29958 29959 29960 29961 29962 29963 29964 29965 29966 29967 29968 29969 29970 29971 29972 29973 29974 29975 29976 29977 29978 29979 29980 29981 29982 29983 29984 29985 29986 29987 29988 29989 29990 29991 29992 29993 29994 29995 29996 29997 29998 29999 30000 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 30011 30012 30013 30014 30015 30016 30017 30018 30019 30020 30021 30022 30023 30024 30025 30026 30027 30028 30029 30030 30031 30032 30033 30034 30035 30036 30037 30038 30039 30040 30041 30042 30043 30044 30045 30046 30047 30048 30049 30050 30051 30052 30053 30054 30055 30056 30057 30058 30059 30060 30061 30062 30063 30064 30065 30066 30067 30068 30069 30070 30071 30072 30073 30074 30075 30076 30077 30078 30079 30080 30081 30082 30083 30084 30085 30086 30087 30088 30089 30090 30091 30092 30093 30094 30095 30096 30097 30098 30099 30100 30101 30102 30103 30104 30105 30106 30107 30108 30109 30110 30111 30112 30113 30114 30115 30116 30117 30118 30119 30120 30121 30122 30123 30124 30125 30126 30127 30128 30129 30130 30131 30132 30133 30134 30135 30136 30137 30138 30139 30140 30141 30142 30143 30144 30145 30146 30147 30148 30149 30150 30151 30152 30153 30154 30155 30156 30157 30158 30159 30160 30161 30162 30163 30164 30165 30166 30167 30168 30169 30170 30171 30172 30173 30174 30175 30176 30177 30178 30179 30180 30181 30182 30183 30184 30185 30186 30187 30188 30189 30190 30191 30192 30193 30194 30195 30196 30197 30198 30199 30200 30201 30202 30203 30204 30205 30206 30207 30208 30209 30210 30211 30212 30213 30214 30215 30216 30217 30218 30219 30220 30221 30222 30223 30224 30225 30226 30227 30228 30229 30230 30231 30232 30233 30234 30235 30236 30237 30238 30239 30240 30241 30242 30243 30244 30245 30246 30247 30248 30249 30250 30251 30252 30253 30254 30255 30256 30257 30258 30259 30260 30261 30262 30263 30264 30265 30266 30267 30268 30269 30270 30271 30272 30273 30274 30275 30276 30277 30278 30279 30280 30281 30282 30283 30284 30285 30286 30287 30288 30289 30290 30291 30292 30293 30294 30295 30296 30297 30298 30299 30300 30301 30302 30303 30304 30305 30306 30307 30308 30309 30310 30311 30312 30313 30314 30315 30316 30317 30318 30319 30320 30321 30322 30323 30324 30325 30326 30327 30328 30329 30330 30331 30332 30333 30334 30335 30336 30337 30338 30339 30340 30341 30342 30343 30344 30345 30346 30347 30348 30349 30350 30351 30352 30353 30354 30355 30356 30357 30358 30359 30360 30361 30362 30363 30364 30365 30366 30367 30368 30369 30370 30371 30372 30373 30374 30375 30376 30377 30378 30379 30380 30381 30382 30383 30384 30385 30386 30387 30388 30389 30390 30391 30392 30393 30394 30395 30396 30397 30398 30399 30400 30401 30402 30403 30404 30405 30406 30407 30408 30409 30410 30411 30412 30413 30414 30415 30416 30417 30418 30419 30420 30421 30422 30423 30424 30425 30426 30427 30428 30429 30430 30431 30432 30433 30434 30435 30436 30437 30438 30439 30440 30441 30442 30443 30444 30445 30446 30447 30448 30449 30450 30451 30452 30453 30454 30455 30456 30457 30458 30459 30460 30461 30462 30463 30464 30465 30466 30467 30468 30469 30470 30471 30472 30473 30474 30475 30476 30477 30478 30479 30480 30481 30482 30483 30484 30485 30486 30487 30488 30489 30490 30491 30492 30493 30494 30495 30496 30497 30498 30499 30500 30501 30502 30503 30504 30505 30506 30507 30508 30509 30510 30511 30512 30513 30514 30515 30516 30517 30518 30519 30520 30521 30522 30523 30524 30525 30526 30527 30528 30529 30530 30531 30532 30533 30534 30535 30536 30537 30538 30539 30540 30541 30542 30543 30544 30545 30546 30547 30548 30549 30550 30551 30552 30553 30554 30555 30556 30557 30558 30559 30560 30561 30562 30563 30564 30565 30566 30567 30568 30569 30570 30571 30572 30573 30574 30575 30576 30577 30578 30579 30580 30581 30582 30583 30584 30585 30586 30587 30588 30589 30590 30591 30592 30593 30594 30595 30596 30597 30598 30599 30600 30601 30602 30603 30604 30605 30606 30607 30608 30609 30610 30611 30612 30613 30614 30615 30616 30617 30618 30619 30620 30621 30622 30623 30624 30625 30626 30627 30628 30629 30630 30631 30632 30633 30634 30635 30636 30637 30638 30639 30640 30641 30642 30643 30644 30645 30646 30647 30648 30649 30650 30651 30652 30653 30654 30655 30656 30657 30658 30659 30660 30661 30662 30663 30664 30665 30666 30667 30668 30669 30670 30671 30672 30673 30674 30675 30676 30677 30678 30679 30680 30681 30682 30683 30684 30685 30686 30687 30688 30689 30690 30691 30692 30693 30694 30695 30696 30697 30698 30699 30700 30701 30702 30703 30704 30705 30706 30707 30708 30709 30710 30711 30712 30713 30714 30715 30716 30717 30718 30719 30720 30721 30722 30723 30724 30725 30726 30727 30728 30729 30730 30731 30732 30733 30734 30735 30736 30737 30738 30739 30740 30741 30742 30743 30744 30745 30746 30747 30748 30749 30750 30751 30752 30753 30754 30755 30756 30757 30758 30759 30760 30761 30762 30763 30764 30765 30766 30767 30768 30769 30770 30771 30772 30773 30774 30775 30776 30777 30778 30779 30780 30781 30782 30783 30784 30785 30786 30787 30788 30789 30790 30791 30792 30793 30794 30795 30796 30797 30798 30799 30800 30801 30802 30803 30804 30805 30806 30807 30808 30809 30810 30811 30812 30813 30814 30815 30816 30817 30818 30819 30820 30821 30822 30823 30824 30825 30826 30827 30828 30829 30830 30831 30832 30833 30834 30835 30836 30837 30838 30839 30840 30841 30842 30843 30844 30845 30846 30847 30848 30849 30850 30851 30852 30853 30854 30855 30856 30857 30858 30859 30860 30861 30862 30863 30864 30865 30866 30867 30868 30869 30870 30871 30872 30873 30874 30875 30876 30877 30878 30879 30880 30881 30882 30883 30884 30885 30886 30887 30888 30889 30890 30891 30892 30893 30894 30895 30896 30897 30898 30899 30900 30901 30902 30903 30904 30905 30906 30907 30908 30909 30910 30911 30912 30913 30914 30915 30916 30917 30918 30919 30920 30921 30922 30923 30924 30925 30926 30927 30928 30929 30930 30931 30932 30933 30934 30935 30936 30937 30938 30939 30940 30941 30942 30943 30944 30945 30946 30947 30948 30949 30950 30951 30952 30953 30954 30955 30956 30957 30958 30959 30960 30961 30962 30963 30964 30965 30966 30967 30968 30969 30970 30971 30972 30973 30974 30975 30976 30977 30978 30979 30980 30981 30982 30983 30984 30985 30986 30987 30988 30989 30990 30991 30992 30993 30994 30995 30996 30997 30998 30999 31000 31001 31002 31003 31004 31005 31006 31007 31008 31009 31010 31011 31012 31013 31014 31015 31016 31017 31018 31019 31020 31021 31022 31023 31024 31025 31026 31027 31028 31029 31030 31031 31032 31033 31034 31035 31036 31037 31038 31039 31040 31041 31042 31043 31044 31045 31046 31047 31048 31049 31050 31051 31052 31053 31054 31055 31056 31057 31058 31059 31060 31061 31062 31063 31064 31065 31066 31067 31068 31069 31070 31071 31072 31073 31074 31075 31076 31077 31078 31079 31080 31081 31082 31083 31084 31085 31086 31087 31088 31089 31090 31091 31092 31093 31094 31095 31096 31097 31098 31099 31100 31101 31102 31103 31104 31105 31106 31107 31108 31109 31110 31111 31112 31113 31114 31115 31116 31117 31118 31119 31120 31121 31122 31123 31124 31125 31126 31127 31128 31129 31130 31131 31132 31133 31134 31135 31136 31137 31138 31139 31140 31141 31142 31143 31144 31145 31146 31147 31148 31149 31150 31151 31152 31153 31154 31155 31156 31157 31158 31159 31160 31161 31162 31163 31164 31165 31166 31167 31168 31169 31170 31171 31172 31173 31174 31175 31176 31177 31178 31179 31180 31181 31182 31183 31184 31185 31186 31187 31188 31189 31190 31191 31192 31193 31194 31195 31196 31197 31198 31199 31200 31201 31202 31203 31204 31205 31206 31207 31208 31209 31210 31211 31212 31213 31214 31215 31216 31217 31218 31219 31220 31221 31222 31223 31224 31225 31226 31227 31228 31229 31230 31231 31232 31233 31234 31235 31236 31237 31238 31239 31240 31241 31242 31243 31244 31245 31246 31247 31248 31249 31250 31251 31252 31253 31254 31255 31256 31257 31258 31259 31260 31261 31262 31263 31264 31265 31266 31267 31268 31269 31270 31271 31272 31273 31274 31275 31276 31277 31278 31279 31280 31281 31282 31283 31284 31285 31286 31287 31288 31289 31290 31291 31292 31293 31294 31295 31296 31297 31298 31299 31300 31301 31302 31303 31304 31305 31306 31307 31308 31309 31310 31311 31312 31313 31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 31327 31328 31329 31330 31331 31332 31333 31334 31335 31336 31337 31338 31339 31340 31341 31342 31343 31344 31345 31346 31347 31348 31349 31350 31351 31352 31353 31354 31355 31356 31357 31358 31359 31360 31361 31362 31363 31364 31365 31366 31367 31368 31369 31370 31371 31372 31373 31374 31375 31376 31377 31378 31379 31380 31381 31382 31383 31384 31385 31386 31387 31388 31389 31390 31391 31392 31393 31394 31395 31396 31397 31398 31399 31400 31401 31402 31403 31404 31405 31406 31407 31408 31409 31410 31411 31412 31413 31414 31415 31416 31417 31418 31419 31420 31421 31422 31423 31424 31425 31426 31427 31428 31429 31430 31431 31432 31433 31434 31435 31436 31437 31438 31439 31440 31441 31442 31443 31444 31445 31446 31447 31448 31449 31450 31451 31452 31453 31454 31455 31456 31457 31458 31459 31460 31461 31462 31463 31464 31465 31466 31467 31468 31469 31470 31471 31472 31473 31474 31475 31476 31477 31478 31479 31480 31481 31482 31483 31484 31485 31486 31487 31488 31489 31490 31491 31492 31493 31494 31495 31496 31497 31498 31499 31500 31501 31502 31503 31504 31505 31506 31507 31508 31509 31510 31511 31512 31513 31514 31515 31516 31517 31518 31519 31520 31521 31522 31523 31524 31525 31526 31527 31528 31529 31530 31531 31532 31533 31534 31535 31536 31537 31538 31539 31540 31541 31542 31543 31544 31545 31546 31547 31548 31549 31550 31551 31552 31553 31554 31555 31556 31557 31558 31559 31560 31561 31562 31563 31564 31565 31566 31567 31568 31569 31570 31571 31572 31573 31574 31575 31576 31577 31578 31579 31580 31581 31582 31583 31584 31585 31586 31587 31588 31589 31590 31591 31592 31593 31594 31595 31596 31597 31598 31599 31600 31601 31602 31603 31604 31605 31606 31607 31608 31609 31610 31611 31612 31613 31614 31615 31616 31617 31618 31619 31620 31621 31622 31623 31624 31625 31626 31627 31628 31629 31630 31631 31632 31633 31634 31635 31636 31637 31638 31639 31640 31641 31642 31643 31644 31645 31646 31647 31648 31649 31650 31651 31652 31653 31654 31655 31656 31657 31658 31659 31660 31661 31662 31663 31664 31665 31666 31667 31668 31669 31670 31671 31672 31673 31674 31675 31676 31677 31678 31679 31680 31681 31682 31683 31684 31685 31686 31687 31688 31689 31690 31691 31692 31693 31694 31695 31696 31697 31698 31699 31700 31701 31702 31703 31704 31705 31706 31707 31708 31709 31710 31711 31712 31713 31714 31715 31716 31717 31718 31719 31720 31721 31722 31723 31724 31725 31726 31727 31728 31729 31730 31731 31732 31733 31734 31735 31736 31737 31738 31739 31740 31741 31742 31743 31744 31745 31746 31747 31748 31749 31750 31751 31752 31753 31754 31755 31756 31757 31758 31759 31760 31761 31762 31763 31764 31765 31766 31767 31768 31769 31770 31771 31772 31773 31774 31775 31776 31777 31778 31779 31780 31781 31782 31783 31784 31785 31786 31787 31788 31789 31790 31791 31792 31793 31794 31795 31796 31797 31798 31799 31800 31801 31802 31803 31804 31805 31806 31807 31808 31809 31810 31811 31812 31813 31814 31815 31816 31817 31818 31819 31820 31821 31822 31823 31824 31825 31826 31827 31828 31829 31830 31831 31832 31833 31834 31835 31836 31837 31838 31839 31840 31841 31842 31843 31844 31845 31846 31847 31848 31849 31850 31851 31852 31853 31854 31855 31856 31857 31858 31859 31860 31861 31862 31863 31864 31865 31866 31867 31868 31869 31870 31871 31872 31873 31874 31875 31876 31877 31878 31879 31880 31881 31882 31883 31884 31885 31886 31887 31888 31889 31890 31891 31892 31893 31894 31895 31896 31897 31898 31899 31900 31901 31902 31903 31904 31905 31906 31907 31908 31909 31910 31911 31912 31913 31914 31915 31916 31917 31918 31919 31920 31921 31922 31923 31924 31925 31926 31927 31928 31929 31930 31931 31932 31933 31934 31935 31936 31937 31938 31939 31940 31941 31942 31943 31944 31945 31946 31947 31948 31949 31950 31951 31952 31953 31954 31955 31956 31957 31958 31959 31960 31961 31962 31963 31964 31965 31966 31967 31968 31969 31970 31971 31972 31973 31974 31975 31976 31977 31978 31979 31980 31981 31982 31983 31984 31985 31986 31987 31988 31989 31990 31991 31992 31993 31994 31995 31996 31997 31998 31999 32000 32001 32002 32003 32004 32005 32006 32007 32008 32009 32010 32011 32012 32013 32014 32015 32016 32017 32018 32019 32020 32021 32022 32023 32024 32025 32026 32027 32028 32029 32030 32031 32032 32033 32034 32035 32036 32037 32038 32039 32040 32041 32042 32043 32044 32045 32046 32047 32048 32049 32050 32051 32052 32053 32054 32055 32056 32057 32058 32059 32060 32061 32062 32063 32064 32065 32066 32067 32068 32069 32070 32071 32072 32073 32074 32075 32076 32077 32078 32079 32080 32081 32082 32083 32084 32085 32086 32087 32088 32089 32090 32091 32092 32093 32094 32095 32096 32097 32098 32099 32100 32101 32102 32103 32104 32105 32106 32107 32108 32109 32110 32111 32112 32113 32114 32115 32116 32117 32118 32119 32120 32121 32122 32123 32124 32125 32126 32127 32128 32129 32130 32131 32132 32133 32134 32135 32136 32137 32138 32139 32140 32141 32142 32143 32144 32145 32146 32147 32148 32149 32150 32151 32152 32153 32154 32155 32156 32157 32158 32159 32160 32161 32162 32163 32164 32165 32166 32167 32168 32169 32170 32171 32172 32173 32174 32175 32176 32177 32178 32179 32180 32181 32182 32183 32184 32185 32186 32187 32188 32189 32190 32191 32192 32193 32194 32195 32196 32197 32198 32199 32200 32201 32202 32203 32204 32205 32206 32207 32208 32209 32210 32211 32212 32213 32214 32215 32216 32217 32218 32219 32220 32221 32222 32223 32224 32225 32226 32227 32228 32229 32230 32231 32232 32233 32234 32235 32236 32237 32238 32239 32240 32241 32242 32243 32244 32245 32246 32247 32248 32249 32250 32251 32252 32253 32254 32255 32256 32257 32258 32259 32260 32261 32262 32263 32264 32265 32266 32267 32268 32269 32270 32271 32272 32273 32274 32275 32276 32277 32278 32279 32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380 32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 32393 32394 32395 32396 32397 32398 32399 32400 32401 32402 32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 32419 32420 32421 32422 32423 32424 32425 32426 32427 32428 32429 32430 32431 32432 32433 32434 32435 32436 32437 32438 32439 32440 32441 32442 32443 32444 32445 32446 32447 32448 32449 32450 32451 32452 32453 32454 32455 32456 32457 32458 32459 32460 32461 32462 32463 32464 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 32484 32485 32486 32487 32488 32489 32490 32491 32492 32493 32494 32495 32496 32497 32498 32499 32500 32501 32502 32503 32504 32505 32506 32507 32508 32509 32510 32511 32512 32513 32514 32515 32516 32517 32518 32519 32520 32521 32522 32523 32524 32525 32526 32527 32528 32529 32530 32531 32532 32533 32534 32535 32536 32537 32538 32539 32540 32541 32542 32543 32544 32545 32546 32547 32548 32549 32550 32551 32552 32553 32554 32555 32556 32557 32558 32559 32560 32561 32562 32563 32564 32565 32566 32567 32568 32569 32570 32571 32572 32573 32574 32575 32576 32577 32578 32579 32580 32581 32582 32583 32584 32585 32586 32587 32588 32589 32590 32591 32592 32593 32594 32595 32596 32597 32598 32599 32600 32601 32602 32603 32604 32605 32606 32607 32608 32609 32610 32611 32612 32613 32614 32615 32616 32617 32618 32619 32620 32621 32622 32623 32624 32625 32626 32627 32628 32629 32630 32631 32632 32633 32634 32635 32636 32637 32638 32639 32640 32641 32642 32643 32644 32645 32646 32647 32648 32649 32650 32651 32652 32653 32654 32655 32656 32657 32658 32659 32660 32661 32662 32663 32664 32665 32666 32667 32668 32669 32670 32671 32672 32673 32674 32675 32676 32677 32678 32679 32680 32681 32682 32683 32684 32685 32686 32687 32688 32689 32690 32691 32692 32693 32694 32695 32696 32697 32698 32699 32700 32701 32702 32703 32704 32705 32706 32707 32708 32709 32710 32711 32712 32713 32714 32715 32716 32717 32718 32719 32720 32721 32722 32723 32724 32725 32726 32727 32728 32729 32730 32731 32732 32733 32734 32735 32736 32737 32738 32739 32740 32741 32742 32743 32744 32745 32746 32747 32748 32749 32750 32751 32752 32753 32754 32755 32756 32757 32758 32759 32760 32761 32762 32763 32764 32765 32766 32767 32768 32769 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779 32780 32781 32782 32783 32784 32785 32786 32787 32788 32789 32790 32791 32792 32793 32794 32795 32796 32797 32798 32799 32800 32801 32802 32803 32804 32805 32806 32807 32808 32809 32810 32811 32812 32813 32814 32815 32816 32817 32818 32819 32820 32821 32822 32823 32824 32825 32826 32827 32828 32829 32830 32831 32832 32833 32834 32835 32836 32837 32838 32839 32840 32841 32842 32843 32844 32845 32846 32847 32848 32849 32850 32851 32852 32853 32854 32855 32856 32857 32858 32859 32860 32861 32862 32863 32864 32865 32866 32867 32868 32869 32870 32871 32872 32873 32874 32875 32876 32877 32878 32879 32880 32881 32882 32883 32884 32885 32886 32887 32888 32889 32890 32891 32892 32893 32894 32895 32896 32897 32898 32899 32900 32901 32902 32903 32904 32905 32906 32907 32908 32909 32910 32911 32912 32913 32914 32915 32916 32917 32918 32919 32920 32921 32922 32923 32924 32925 32926 32927 32928 32929 32930 32931 32932 32933 32934 32935 32936 32937 32938 32939 32940 32941 32942 32943 32944 32945 32946 32947 32948 32949 32950 32951 32952 32953 32954 32955 32956 32957 32958 32959 32960 32961 32962 32963 32964 32965 32966 32967 32968 32969 32970 32971 32972 32973 32974 32975 32976 32977 32978 32979 32980 32981 32982 32983 32984 32985 32986 32987 32988 32989 32990 32991 32992 32993 32994 32995 32996 32997 32998 32999 33000 33001 33002 33003 33004 33005 33006 33007 33008 33009 33010 33011 33012 33013 33014 33015 33016 33017 33018 33019 33020 33021 33022 33023 33024 33025 33026 33027 33028 33029 33030 33031 33032 33033 33034 33035 33036 33037 33038 33039 33040 33041 33042 33043 33044 33045 33046 33047 33048 33049 33050 33051 33052 33053 33054 33055 33056 33057 33058 33059 33060 33061 33062 33063 33064 33065 33066 33067 33068 33069 33070 33071 33072 33073 33074 33075 33076 33077 33078 33079 33080 33081 33082 33083 33084 33085 33086 33087 33088 33089 33090 33091 33092 33093 33094 33095 33096 33097 33098 33099 33100 33101 33102 33103 33104 33105 33106 33107 33108 33109 33110 33111 33112 33113 33114 33115 33116 33117 33118 33119 33120 33121 33122 33123 33124 33125 33126 33127 33128 33129 33130 33131 33132 33133 33134 33135 33136 33137 33138 33139 33140 33141 33142 33143 33144 33145 33146 33147 33148 33149 33150 33151 33152 33153 33154 33155 33156 33157 33158 33159 33160 33161 33162 33163 33164 33165 33166 33167 33168 33169 33170 33171 33172 33173 33174 33175 33176 33177 33178 33179 33180 33181 33182 33183 33184 33185 33186 33187 33188 33189 33190 33191 33192 33193 33194 33195 33196 33197 33198 33199 33200 33201 33202 33203 33204 33205 33206 33207 33208 33209 33210 33211 33212 33213 33214 33215 33216 33217 33218 33219 33220 33221 33222 33223 33224 33225 33226 33227 33228 33229 33230 33231 33232 33233 33234 33235 33236 33237 33238 33239 33240 33241 33242 33243 33244 33245 33246 33247 33248 33249 33250 33251 33252 33253 33254 33255 33256 33257 33258 33259 33260 33261 33262 33263 33264 33265 33266 33267 33268 33269 33270 33271 33272 33273 33274 33275 33276 33277 33278 33279 33280 33281 33282 33283 33284 33285 33286 33287 33288 33289 33290 33291 33292 33293 33294 33295 33296 33297 33298 33299 33300 33301 33302 33303 33304 33305 33306 33307 33308 33309 33310 33311 33312 33313 33314 33315 33316 33317 33318 33319 33320 33321 33322 33323 33324 33325 33326 33327 33328 33329 33330 33331 33332 33333 33334 33335 33336 33337 33338 33339 33340 33341 33342 33343 33344 33345 33346 33347 33348 33349 33350 33351 33352 33353 33354 33355 33356 33357 33358 33359 33360 33361 33362 33363 33364 33365 33366 33367 33368 33369 33370 33371 33372 33373 33374 33375 33376 33377 33378 33379 33380 33381 33382 33383 33384 33385 33386 33387 33388 33389 33390 33391 33392 33393 33394 33395 33396 33397 33398 33399 33400 33401 33402 33403 33404 33405 33406 33407 33408 33409 33410 33411 33412 33413 33414 33415 33416 33417 33418 33419 33420 33421 33422 33423 33424 33425 33426 33427 33428 33429 33430 33431 33432 33433 33434 33435 33436 33437 33438 33439 33440 33441 33442 33443 33444 33445 33446 33447 33448 33449 33450 33451 33452 33453 33454 33455 33456 33457 33458 33459 33460 33461 33462 33463 33464 33465 33466 33467 33468 33469 33470 33471 33472 33473 33474 33475 33476 33477 33478 33479 33480 33481 33482 33483 33484 33485 33486 33487 33488 33489 33490 33491 33492 33493 33494 33495 33496 33497 33498 33499 33500 33501 33502 33503 33504 33505 33506 33507 33508 33509 33510 33511 33512 33513 33514 33515 33516 33517 33518 33519 33520 33521 33522 33523 33524 33525 33526 33527 33528 33529 33530 33531 33532 33533 33534 33535 33536 33537 33538 33539 33540 33541 33542 33543 33544 33545 33546 33547 33548 33549 33550 33551 33552 33553 33554 33555 33556 33557 33558 33559 33560 33561 33562 33563 33564 33565 33566 33567 33568 33569 33570 33571 33572 33573 33574 33575 33576 33577 33578 33579 33580 33581 33582 33583 33584 33585 33586 33587 33588 33589 33590 33591 33592 33593 33594 33595 33596 33597 33598 33599 33600 33601 33602 33603 33604 33605 33606 33607 33608 33609 33610 33611 33612 33613 33614 33615 33616 33617 33618 33619 33620 33621 33622 33623 33624 33625 33626 33627 33628 33629 33630 33631 33632 33633 33634 33635 33636 33637 33638 33639 33640 33641 33642 33643 33644 33645 33646 33647 33648 33649 33650 33651 33652 33653 33654 33655 33656 33657 33658 33659 33660 33661 33662 33663 33664 33665 33666 33667 33668 33669 33670 33671 33672 33673 33674 33675 33676 33677 33678 33679 33680 33681 33682 33683 33684 33685 33686 33687 33688 33689 33690 33691 33692 33693 33694 33695 33696 33697 33698 33699 33700 33701 33702 33703 33704 33705 33706 33707 33708 33709 33710 33711 33712 33713 33714 33715 33716 33717 33718 33719 33720 33721 33722 33723 33724 33725 33726 33727 33728 33729 33730 33731 33732 33733 33734 33735 33736 33737 33738 33739 33740 33741 33742 33743 33744 33745 33746 33747 33748 33749 33750 33751 33752 33753 33754 33755 33756 33757 33758 33759 33760 33761 33762 33763 33764 33765 33766 33767 33768 33769 33770 33771 33772 33773 33774 33775 33776 33777 33778 33779 33780 33781 33782 33783 33784 33785 33786 33787 33788 33789 33790 33791 33792 33793 33794 33795 33796 33797 33798 33799 33800 33801 33802 33803 33804 33805 33806 33807 33808 33809 33810 33811 33812 33813 33814 33815 33816 33817 33818 33819 33820 33821 33822 33823 33824 33825 33826 33827 33828 33829 33830 33831 33832 33833 33834 33835 33836 33837 33838 33839 33840 33841 33842 33843 33844 33845 33846 33847 33848 33849 33850 33851 33852 33853 33854 33855 33856 33857 33858 33859 33860 33861 33862 33863 33864 33865 33866 33867 33868 33869 33870 33871 33872 33873 33874 33875 33876 33877 33878 33879 33880 33881 33882 33883 33884 33885 33886 33887 33888 33889 33890 33891 33892 33893 33894 33895 33896 33897 33898 33899 33900 33901 33902 33903 33904 33905 33906 33907 33908 33909 33910 33911 33912 33913 33914 33915 33916 33917 33918 33919 33920 33921 33922 33923 33924 33925 33926 33927 33928 33929 33930 33931 33932 33933 33934 33935 33936 33937 33938 33939 33940 33941 33942 33943 33944 33945 33946 33947 33948 33949 33950 33951 33952 33953 33954 33955 33956 33957 33958 33959 33960 33961 33962 33963 33964 33965 33966 33967 33968 33969 33970 33971 33972 33973 33974 33975 33976 33977 33978 33979 33980 33981 33982 33983 33984 33985 33986 33987 33988 33989 33990 33991 33992 33993 33994 33995 33996 33997 33998 33999 34000 34001 34002 34003 34004 34005 34006 34007 34008 34009 34010 34011 34012 34013 34014 34015 34016 34017 34018 34019 34020 34021 34022 34023 34024 34025 34026 34027 34028 34029 34030 34031 34032 34033 34034 34035 34036 34037 34038 34039 34040 34041 34042 34043 34044 34045 34046 34047 34048 34049 34050 34051 34052 34053 34054 34055 34056 34057 34058 34059 34060 34061 34062 34063 34064 34065 34066 34067 34068 34069 34070 34071 34072 34073 34074 34075 34076 34077 34078 34079 34080 34081 34082 34083 34084 34085 34086 34087 34088 34089 34090 34091 34092 34093 34094 34095 34096 34097 34098 34099 34100 34101 34102 34103 34104 34105 34106 34107 34108 34109 34110 34111 34112 34113 34114 34115 34116 34117 34118 34119 34120 34121 34122 34123 34124 34125 34126 34127 34128 34129 34130 34131 34132 34133 34134 34135 34136 34137 34138 34139 34140 34141 34142 34143 34144 34145 34146 34147 34148 34149 34150 34151 34152 34153 34154 34155 34156 34157 34158 34159 34160 34161 34162 34163 34164 34165 34166 34167 34168 34169 34170 34171 34172 34173 34174 34175 34176 34177 34178 34179 34180 34181 34182 34183 34184 34185 34186 34187 34188 34189 34190 34191 34192 34193 34194 34195 34196 34197 34198 34199 34200 34201 34202 34203 34204 34205 34206 34207 34208 34209 34210 34211 34212 34213 34214 34215 34216 34217 34218 34219 34220 34221 34222 34223 34224 34225 34226 34227 34228 34229 34230 34231 34232 34233 34234 34235 34236 34237 34238 34239 34240 34241 34242 34243 34244 34245 34246 34247 34248 34249 34250 34251 34252 34253 34254 34255 34256 34257 34258 34259 34260 34261 34262 34263 34264 34265 34266 34267 34268 34269 34270 34271 34272 34273 34274 34275 34276 34277 34278 34279 34280 34281 34282 34283 34284 34285 34286 34287 34288 34289 34290 34291 34292 34293 34294 34295 34296 34297 34298 34299 34300 34301 34302 34303 34304 34305 34306 34307 34308 34309 34310 34311 34312 34313 34314 34315 34316 34317 34318 34319 34320 34321 34322 34323 34324 34325 34326 34327 34328 34329 34330 34331 34332 34333 34334 34335 34336 34337 34338 34339 34340 34341 34342 34343 34344 34345 34346 34347 34348 34349 34350 34351 34352 34353 34354 34355 34356 34357 34358 34359 34360 34361 34362 34363 34364 34365 34366 34367 34368 34369 34370 34371 34372 34373 34374 34375 34376 34377 34378 34379 34380 34381 34382 34383 34384 34385 34386 34387 34388 34389 34390 34391 34392 34393 34394 34395 34396 34397 34398 34399 34400 34401 34402 34403 34404 34405 34406 34407 34408 34409 34410 34411 34412 34413 34414 34415 34416 34417 34418 34419 34420 34421 34422 34423 34424 34425 34426 34427 34428 34429 34430 34431 34432 34433 34434 34435 34436 34437 34438 34439 34440 34441 34442 34443 34444 34445 34446 34447 34448 34449 34450 34451 34452 34453 34454 34455 34456 34457 34458 34459 34460 34461 34462 34463 34464 34465 34466 34467 34468 34469 34470 34471 34472 34473 34474 34475 34476 34477 34478 34479 34480 34481 34482 34483 34484 34485 34486 34487 34488 34489 34490 34491 34492 34493 34494 34495 34496 34497 34498 34499 34500 34501 34502 34503 34504 34505 34506 34507 34508 34509 34510 34511 34512 34513 34514 34515 34516 34517 34518 34519 34520 34521 34522 34523 34524 34525 34526 34527 34528 34529 34530 34531 34532 34533 34534 34535 34536 34537 34538 34539 34540 34541 34542 34543 34544 34545 34546 34547 34548 34549 34550 34551 34552 34553 34554 34555 34556 34557 34558 34559 34560 34561 34562 34563 34564 34565 34566 34567 34568 34569 34570 34571 34572 34573 34574 34575 34576 34577 34578 34579 34580 34581 34582 34583 34584 34585 34586 34587 34588 34589 34590 34591 34592 34593 34594 34595 34596 34597 34598 34599 34600 34601 34602 34603 34604 34605 34606 34607 34608 34609 34610 34611 34612 34613 34614 34615 34616 34617 34618 34619 34620 34621 34622 34623 34624 34625 34626 34627 34628 34629 34630 34631 34632 34633 34634 34635 34636 34637 34638 34639 34640 34641 34642 34643 34644 34645 34646 34647 34648 34649 34650 34651 34652 34653 34654 34655 34656 34657 34658 34659 34660 34661 34662 34663 34664 34665 34666 34667 34668 34669 34670 34671 34672 34673 34674 34675 34676 34677 34678 34679 34680 34681 34682 34683 34684 34685 34686 34687 34688 34689 34690 34691 34692 34693 34694 34695 34696 34697 34698 34699 34700 34701 34702 34703 34704 34705 34706 34707 34708 34709 34710 34711 34712 34713 34714 34715 34716 34717 34718 34719 34720 34721 34722 34723 34724 34725 34726 34727 34728 34729 34730 34731 34732 34733 34734 34735 34736 34737 34738 34739 34740 34741 34742 34743 34744 34745 34746 34747 34748 34749 34750 34751 34752 34753 34754 34755 34756 34757 34758 34759 34760 34761 34762 34763 34764 34765 34766 34767 34768 34769 34770 34771 34772 34773 34774 34775 34776 34777 34778 34779 34780 34781 34782 34783 34784 34785 34786 34787 34788 34789 34790 34791 34792 34793 34794 34795 34796 34797 34798 34799 34800 34801 34802 34803 34804 34805 34806 34807 34808 34809 34810 34811 34812 34813 34814 34815 34816 34817 34818 34819 34820 34821 34822 34823 34824 34825 34826 34827 34828 34829 34830 34831 34832 34833 34834 34835 34836 34837 34838 34839 34840 34841 34842 34843 34844 34845 34846 34847 34848 34849 34850 34851 34852 34853 34854 34855 34856 34857 34858 34859 34860 34861 34862 34863 34864 34865 34866 34867 34868 34869 34870 34871 34872 34873 34874 34875 34876 34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 34887 34888 34889 34890 34891 34892 34893 34894 34895 34896 34897 34898 34899 34900 34901 34902 34903 34904 34905 34906 34907 34908 34909 34910 34911 34912 34913 34914 34915 34916 34917 34918 34919 34920 34921 34922 34923 34924 34925 34926 34927 34928 34929 34930 34931 34932 34933 34934 34935 34936 34937 34938 34939 34940 34941 34942 34943 34944 34945 34946 34947 34948 34949 34950 34951 34952 34953 34954 34955 34956 34957 34958 34959 34960 34961 34962 34963 34964 34965 34966 34967 34968 34969 34970 34971 34972 34973 34974 34975 34976 34977 34978 34979 34980 34981 34982 34983 34984 34985 34986 34987 34988 34989 34990 34991 34992 34993 34994 34995 34996 34997 34998 34999 35000 35001 35002 35003 35004 35005 35006 35007 35008 35009 35010 35011 35012 35013 35014 35015 35016 35017 35018 35019 35020 35021 35022 35023 35024 35025 35026 35027 35028 35029 35030 35031 35032 35033 35034 35035 35036 35037 35038 35039 35040 35041 35042 35043 35044 35045 35046 35047 35048 35049 35050 35051 35052 35053 35054 35055 35056 35057 35058 35059 35060 35061 35062 35063 35064 35065 35066 35067 35068 35069 35070 35071 35072 35073 35074 35075 35076 35077 35078 35079 35080 35081 35082 35083 35084 35085 35086 35087 35088 35089 35090 35091 35092 35093 35094 35095 35096 35097 35098 35099 35100 35101 35102 35103 35104 35105 35106 35107 35108 35109 35110 35111 35112 35113 35114 35115 35116 35117 35118 35119 35120 35121 35122 35123 35124 35125 35126 35127 35128 35129 35130 35131 35132 35133 35134 35135 35136 35137 35138 35139 35140 35141 35142 35143 35144 35145 35146 35147 35148 35149 35150 35151 35152 35153 35154 35155 35156 35157 35158 35159 35160 35161 35162 35163 35164 35165 35166 35167 35168 35169 35170 35171 35172 35173 35174 35175 35176 35177 35178 35179 35180 35181 35182 35183 35184 35185 35186 35187 35188 35189 35190 35191 35192 35193 35194 35195 35196 35197 35198 35199 35200 35201 35202 35203 35204 35205 35206 35207 35208 35209 35210 35211 35212 35213 35214 35215 35216 35217 35218 35219 35220 35221 35222 35223 35224 35225 35226 35227 35228 35229 35230 35231 35232 35233 35234 35235 35236 35237 35238 35239 35240 35241 35242 35243 35244 35245 35246 35247 35248 35249 35250 35251 35252 35253 35254 35255 35256 35257 35258 35259 35260 35261 35262 35263 35264 35265 35266 35267 35268 35269 35270 35271 35272 35273 35274 35275 35276 35277 35278 35279 35280 35281 35282 35283 35284 35285 35286 35287 35288 35289 35290 35291 35292 35293 35294 35295 35296 35297 35298 35299 35300 35301 35302 35303 35304 35305 35306 35307 35308 35309 35310 35311 35312 35313 35314 35315 35316 35317 35318 35319 35320 35321 35322 35323 35324 35325 35326 35327 35328 35329 35330 35331 35332 35333 35334 35335 35336 35337 35338 35339 35340 35341 35342 35343 35344 35345 35346 35347 35348 35349 35350 35351 35352 35353 35354 35355 35356 35357 35358 35359 35360 35361 35362 35363 35364 35365 35366 35367 35368 35369 35370 35371 35372 35373 35374 35375 35376 35377 35378 35379 35380 35381 35382 35383 35384 35385 35386 35387 35388 35389 35390 35391 35392 35393 35394 35395 35396 35397 35398 35399 35400 35401 35402 35403 35404 35405 35406 35407 35408 35409 35410 35411 35412 35413 35414 35415 35416 35417 35418 35419 35420 35421 35422 35423 35424 35425 35426 35427 35428 35429 35430 35431 35432 35433 35434 35435 35436 35437 35438 35439 35440 35441 35442 35443 35444 35445 35446 35447 35448 35449 35450 35451 35452 35453 35454 35455 35456 35457 35458 35459 35460 35461 35462 35463 35464 35465 35466 35467 35468 35469 35470 35471 35472 35473 35474 35475 35476 35477 35478 35479 35480 35481 35482 35483 35484 35485 35486 35487 35488 35489 35490 35491 35492 35493 35494 35495 35496 35497 35498 35499 35500 35501 35502 35503 35504 35505 35506 35507 35508 35509 35510 35511 35512 35513 35514 35515 35516 35517 35518 35519 35520 35521 35522 35523 35524 35525 35526 35527 35528 35529 35530 35531 35532 35533 35534 35535 35536 35537 35538 35539 35540 35541 35542 35543 35544 35545 35546 35547 35548 35549 35550 35551 35552 35553 35554 35555 35556 35557 35558 35559 35560 35561 35562 35563 35564 35565 35566 35567 35568 35569 35570 35571 35572 35573 35574 35575 35576 35577 35578 35579 35580 35581 35582 35583 35584 35585 35586 35587 35588 35589 35590 35591 35592 35593 35594 35595 35596 35597 35598 35599 35600 35601 35602 35603 35604 35605 35606 35607 35608 35609 35610 35611 35612 35613 35614 35615 35616 35617 35618 35619 35620 35621 35622 35623 35624 35625 35626 35627 35628 35629 35630 35631 35632 35633 35634 35635 35636 35637 35638 35639 35640 35641 35642 35643 35644 35645 35646 35647 35648 35649 35650 35651 35652 35653 35654 35655 35656 35657 35658 35659 35660 35661 35662 35663 35664 35665 35666 35667 35668 35669 35670 35671 35672 35673 35674 35675 35676 35677 35678 35679 35680 35681 35682 35683 35684 35685 35686 35687 35688 35689 35690 35691 35692 35693 35694 35695 35696 35697 35698 35699 35700 35701 35702 35703 35704 35705 35706 35707 35708 35709 35710 35711 35712 35713 35714 35715 35716 35717 35718 35719 35720 35721 35722 35723 35724 35725 35726 35727 35728 35729 35730 35731 35732 35733 35734 35735 35736 35737 35738 35739 35740 35741 35742 35743 35744 35745 35746 35747 35748 35749 35750 35751 35752 35753 35754 35755 35756 35757 35758 35759 35760 35761 35762 35763 35764 35765 35766 35767 35768 35769 35770 35771 35772 35773 35774 35775 35776 35777 35778 35779 35780 35781 35782 35783 35784 35785 35786 35787 35788 35789 35790 35791 35792 35793 35794 35795 35796 35797 35798 35799 35800 35801 35802 35803 35804 35805 35806 35807 35808 35809 35810 35811 35812 35813 35814 35815 35816 35817 35818 35819 35820 35821 35822 35823 35824 35825 35826 35827 35828 35829 35830 35831 35832 35833 35834 35835 35836 35837 35838 35839 35840 35841 35842 35843 35844 35845 35846 35847 35848 35849 35850 35851 35852 35853 35854 35855 35856 35857 35858 35859 35860 35861 35862 35863 35864 35865 35866 35867 35868 35869 35870 35871 35872 35873 35874 35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017 36018 36019 36020 36021 36022 36023 36024 36025 36026 36027 36028 36029 36030 36031 36032 36033 36034 36035 36036 36037 36038 36039 36040 36041 36042 36043 36044 36045 36046 36047 36048 36049 36050 36051 36052 36053 36054 36055 36056 36057 36058 36059 36060 36061 36062 36063 36064 36065 36066 36067 36068 36069 36070 36071 36072 36073 36074 36075 36076 36077 36078 36079 36080 36081 36082 36083 36084 36085 36086 36087 36088 36089 36090 36091 36092 36093 36094 36095 36096 36097 36098 36099 36100 36101 36102 36103 36104 36105 36106 36107 36108 36109 36110 36111 36112 36113 36114 36115 36116 36117 36118 36119 36120 36121 36122 36123 36124 36125 36126 36127 36128 36129 36130 36131 36132 36133 36134 36135 36136 36137 36138 36139 36140 36141 36142 36143 36144 36145 36146 36147 36148 36149 36150 36151 36152 36153 36154 36155 36156 36157 36158 36159 36160 36161 36162 36163 36164 36165 36166 36167 36168 36169 36170 36171 36172 36173 36174 36175 36176 36177 36178 36179 36180 36181 36182 36183 36184 36185 36186 36187 36188 36189 36190 36191 36192 36193 36194 36195 36196 36197 36198 36199 36200 36201 36202 36203 36204 36205 36206 36207 36208 36209 36210 36211 36212 36213 36214 36215 36216 36217 36218 36219 36220 36221 36222 36223 36224 36225 36226 36227 36228 36229 36230 36231 36232 36233 36234 36235 36236 36237 36238 36239 36240 36241 36242 36243 36244 36245 36246 36247 36248 36249 36250 36251 36252 36253 36254 36255 36256 36257 36258 36259 36260 36261 36262 36263 36264 36265 36266 36267 36268 36269 36270 36271 36272 36273 36274 36275 36276 36277 36278 36279 36280 36281 36282 36283 36284 36285 36286 36287 36288 36289 36290 36291 36292 36293 36294 36295 36296 36297 36298 36299 36300 36301 36302 36303 36304 36305 36306 36307 36308 36309 36310 36311 36312 36313 36314 36315 36316 36317 36318 36319 36320 36321 36322 36323 36324 36325 36326 36327 36328 36329 36330 36331 36332 36333 36334 36335 36336 36337 36338 36339 36340 36341 36342 36343 36344 36345 36346 36347 36348 36349 36350 36351 36352 36353 36354 36355 36356 36357 36358 36359 36360 36361 36362 36363 36364 36365 36366 36367 36368 36369 36370 36371 36372 36373 36374 36375 36376 36377 36378 36379 36380 36381 36382 36383 36384 36385 36386 36387 36388 36389 36390 36391 36392 36393 36394 36395 36396 36397 36398 36399 36400 36401 36402 36403 36404 36405 36406 36407 36408 36409 36410 36411 36412 36413 36414 36415 36416 36417 36418 36419 36420 36421 36422 36423 36424 36425 36426 36427 36428 36429 36430 36431 36432 36433 36434 36435 36436 36437 36438 36439 36440 36441 36442 36443 36444 36445 36446 36447 36448 36449 36450 36451 36452 36453 36454 36455 36456 36457 36458 36459 36460 36461 36462 36463 36464 36465 36466 36467 36468 36469 36470 36471 36472 36473 36474 36475 36476 36477 36478 36479 36480 36481 36482 36483 36484 36485 36486 36487 36488 36489 36490 36491 36492 36493 36494 36495 36496 36497 36498 36499 36500 36501 36502 36503 36504 36505 36506 36507 36508 36509 36510 36511 36512 36513 36514 36515 36516 36517 36518 36519 36520 36521 36522 36523 36524 36525 36526 36527 36528 36529 36530 36531 36532 36533 36534 36535 36536 36537 36538 36539 36540 36541 36542 36543 36544 36545 36546 36547 36548 36549 36550 36551 36552 36553 36554 36555 36556 36557 36558 36559 36560 36561 36562 36563 36564 36565 36566 36567 36568 36569 36570 36571 36572 36573 36574 36575 36576 36577 36578 36579 36580 36581 36582 36583 36584 36585 36586 36587 36588 36589 36590 36591 36592 36593 36594 36595 36596 36597 36598 36599 36600 36601 36602 36603 36604 36605 36606 36607 36608 36609 36610 36611 36612 36613 36614 36615 36616 36617 36618 36619 36620 36621 36622 36623 36624 36625 36626 36627 36628 36629 36630 36631 36632 36633 36634 36635 36636 36637 36638 36639 36640 36641 36642 36643 36644 36645 36646 36647 36648 36649 36650 36651 36652 36653 36654 36655 36656 36657 36658 36659 36660 36661 36662 36663 36664 36665 36666 36667 36668 36669 36670 36671 36672 36673 36674 36675 36676 36677 36678 36679 36680 36681 36682 36683 36684 36685 36686 36687 36688 36689 36690 36691 36692 36693 36694 36695 36696 36697 36698 36699 36700 36701 36702 36703 36704 36705 36706 36707 36708 36709 36710 36711 36712 36713 36714 36715 36716 36717 36718 36719 36720 36721 36722 36723 36724 36725 36726 36727 36728 36729 36730 36731 36732 36733 36734 36735 36736 36737 36738 36739 36740 36741 36742 36743 36744 36745 36746 36747 36748 36749 36750 36751 36752 36753 36754 36755 36756 36757 36758 36759 36760 36761 36762 36763 36764 36765 36766 36767 36768 36769 36770 36771 36772 36773 36774 36775 36776 36777 36778 36779 36780 36781 36782 36783 36784 36785 36786 36787 36788 36789 36790 36791 36792 36793 36794 36795 36796 36797 36798 36799 36800 36801 36802 36803 36804 36805 36806 36807 36808 36809 36810 36811 36812 36813 36814 36815 36816 36817 36818 36819 36820 36821 36822 36823 36824 36825 36826 36827 36828 36829 36830 36831 36832 36833 36834 36835 36836 36837 36838 36839 36840 36841 36842 36843 36844 36845 36846 36847 36848 36849 36850 36851 36852 36853 36854 36855 36856 36857 36858 36859 36860 36861 36862 36863 36864 36865 36866 36867 36868 36869 36870 36871 36872 36873 36874 36875 36876 36877 36878 36879 36880 36881 36882 36883 36884 36885 36886 36887 36888 36889 36890 36891 36892 36893 36894 36895 36896 36897 36898 36899 36900 36901 36902 36903 36904 36905 36906 36907 36908 36909 36910 36911 36912 36913 36914 36915 36916 36917 36918 36919 36920 36921 36922 36923 36924 36925 36926 36927 36928 36929 36930 36931 36932 36933 36934 36935 36936 36937 36938 36939 36940 36941 36942 36943 36944 36945 36946 36947 36948 36949 36950 36951 36952 36953 36954 36955 36956 36957 36958 36959 36960 36961 36962 36963 36964 36965 36966 36967 36968 36969 36970 36971 36972 36973 36974 36975 36976 36977 36978 36979 36980 36981 36982 36983 36984 36985 36986 36987 36988 36989 36990 36991 36992 36993 36994 36995 36996 36997 36998 36999 37000 37001 37002 37003 37004 37005 37006 37007 37008 37009 37010 37011 37012 37013 37014 37015 37016 37017 37018 37019 37020 37021 37022 37023 37024 37025 37026 37027 37028 37029 37030 37031 37032 37033 37034 37035 37036 37037 37038 37039 37040 37041 37042 37043 37044 37045 37046 37047 37048 37049 37050 37051 37052 37053 37054 37055 37056 37057 37058 37059 37060 37061 37062 37063 37064 37065 37066 37067 37068 37069 37070 37071 37072 37073 37074 37075 37076 37077 37078 37079 37080 37081 37082 37083 37084 37085 37086 37087 37088 37089 37090 37091 37092 37093 37094 37095 37096 37097 37098 37099 37100 37101 37102 37103 37104 37105 37106 37107 37108 37109 37110 37111 37112 37113 37114 37115 37116 37117 37118 37119 37120 37121 37122 37123 37124 37125 37126 37127 37128 37129 37130 37131 37132 37133 37134 37135 37136 37137 37138 37139 37140 37141 37142 37143 37144 37145 37146 37147 37148 37149 37150 37151 37152 37153 37154 37155 37156 37157 37158 37159 37160 37161 37162 37163 37164 37165 37166 37167 37168 37169 37170 37171 37172 37173 37174 37175 37176 37177 37178 37179 37180 37181 37182 37183 37184 37185 37186 37187 37188 37189 37190 37191 37192 37193 37194 37195 37196 37197 37198 37199 37200 37201 37202 37203 37204 37205 37206 37207 37208 37209 37210 37211 37212 37213 37214 37215 37216 37217 37218 37219 37220 37221 37222 37223 37224 37225 37226 37227 37228 37229 37230 37231 37232 37233 37234 37235 37236 37237 37238 37239 37240 37241 37242 37243 37244 37245 37246 37247 37248 37249 37250 37251 37252 37253 37254 37255 37256 37257 37258 37259 37260 37261 37262 37263 37264 37265 37266 37267 37268 37269 37270 37271 37272 37273 37274 37275 37276 37277 37278 37279 37280 37281 37282 37283 37284 37285 37286 37287 37288 37289 37290 37291 37292 37293 37294 37295 37296 37297 37298 37299 37300 37301 37302 37303 37304 37305 37306 37307 37308 37309 37310 37311 37312 37313 37314 37315 37316 37317 37318 37319 37320 37321 37322 37323 37324 37325 37326 37327 37328 37329 37330 37331 37332 37333 37334 37335 37336 37337 37338 37339 37340 37341 37342 37343 37344 37345 37346 37347 37348 37349 37350 37351 37352 37353 37354 37355 37356 37357 37358 37359 37360 37361 37362 37363 37364 37365 37366 37367 37368 37369 37370 37371 37372 37373 37374 37375 37376 37377 37378 37379 37380 37381 37382 37383 37384 37385 37386 37387 37388 37389 37390 37391 37392 37393 37394 37395 37396 37397 37398 37399 37400 37401 37402 37403 37404 37405 37406 37407 37408 37409 37410 37411 37412 37413 37414 37415 37416 37417 37418 37419 37420 37421 37422 37423 37424 37425 37426 37427 37428 37429 37430 37431 37432 37433 37434 37435 37436 37437 37438 37439 37440 37441 37442 37443 37444 37445 37446 37447 37448 37449 37450 37451 37452 37453 37454 37455 37456 37457 37458 37459 37460 37461 37462 37463 37464 37465 37466 37467 37468 37469 37470 37471 37472 37473 37474 37475 37476 37477 37478 37479 37480 37481 37482 37483 37484 37485 37486 37487 37488 37489 37490 37491 37492 37493 37494 37495 37496 37497 37498 37499 37500 37501 37502 37503 37504 37505 37506 37507 37508 37509 37510 37511 37512 37513 37514 37515 37516 37517 37518 37519 37520 37521 37522 37523 37524 37525 37526 37527 37528 37529 37530 37531 37532 37533 37534 37535 37536 37537 37538 37539 37540 37541 37542 37543 37544 37545 37546 37547 37548 37549 37550 37551 37552 37553 37554 37555 37556 37557 37558 37559 37560 37561 37562 37563 37564 37565 37566 37567 37568 37569 37570 37571 37572 37573 37574 37575 37576 37577 37578 37579 37580 37581 37582 37583 37584 37585 37586 37587 37588 37589 37590 37591 37592 37593 37594 37595 37596 37597 37598 37599 37600 37601 37602 37603 37604 37605 37606 37607 37608 37609 37610 37611 37612 37613 37614 37615 37616 37617 37618 37619 37620 37621 37622 37623 37624 37625 37626 37627 37628 37629 37630 37631 37632 37633 37634 37635 37636 37637 37638 37639 37640 37641 37642 37643 37644 37645 37646 37647 37648 37649 37650 37651 37652 37653 37654 37655 37656 37657 37658 37659 37660 37661 37662 37663 37664 37665 37666 37667 37668 37669 37670 37671 37672 37673 37674 37675 37676 37677 37678 37679 37680 37681 37682 37683 37684 37685 37686 37687 37688 37689 37690 37691 37692 37693 37694 37695 37696 37697 37698 37699 37700 37701 37702 37703 37704 37705 37706 37707 37708 37709 37710 37711 37712 37713 37714 37715 37716 37717 37718 37719 37720 37721 37722 37723 37724 37725 37726 37727 37728 37729 37730 37731 37732 37733 37734 37735 37736 37737 37738 37739 37740 37741 37742 37743 37744 37745 37746 37747 37748 37749 37750 37751 37752 37753 37754 37755 37756 37757 37758 37759 37760 37761 37762 37763 37764 37765 37766 37767 37768 37769 37770 37771 37772 37773 37774 37775 37776 37777 37778 37779 37780 37781 37782 37783 37784 37785 37786 37787 37788 37789 37790 37791 37792 37793 37794 37795 37796 37797 37798 37799 37800 37801 37802 37803 37804 37805 37806 37807 37808 37809 37810 37811 37812 37813 37814 37815 37816 37817 37818 37819 37820 37821 37822 37823 37824 37825 37826 37827 37828 37829 37830 37831 37832 37833 37834 37835 37836 37837 37838 37839 37840 37841 37842 37843 37844 37845 37846 37847 37848 37849 37850 37851 37852 37853 37854 37855 37856 37857 37858 37859 37860 37861 37862 37863 37864 37865 37866 37867 37868 37869 37870 37871 37872 37873 37874 37875 37876 37877 37878 37879 37880 37881 37882 37883 37884 37885 37886 37887 37888 37889 37890 37891 37892 37893 37894 37895 37896 37897 37898 37899 37900 37901 37902 37903 37904 37905 37906 37907 37908 37909 37910 37911 37912 37913 37914 37915 37916 37917 37918 37919 37920 37921 37922 37923 37924 37925 37926 37927 37928 37929 37930 37931 37932 37933 37934 37935 37936 37937 37938 37939 37940 37941 37942 37943 37944 37945 37946 37947 37948 37949 37950 37951 37952 37953 37954 37955 37956 37957 37958 37959 37960 37961 37962 37963 37964 37965 37966 37967 37968 37969 37970 37971 37972 37973 37974 37975 37976 37977 37978 37979 37980 37981 37982 37983 37984 37985 37986 37987 37988 37989 37990 37991 37992 37993 37994 37995 37996 37997 37998 37999 38000 38001 38002 38003 38004 38005 38006 38007 38008 38009 38010 38011 38012 38013 38014 38015 38016 38017 38018 38019 38020 38021 38022 38023 38024 38025 38026 38027 38028 38029 38030 38031 38032 38033 38034 38035 38036 38037 38038 38039 38040 38041 38042 38043 38044 38045 38046 38047 38048 38049 38050 38051 38052 38053 38054 38055 38056 38057 38058 38059 38060 38061 38062 38063 38064 38065 38066 38067 38068 38069 38070 38071 38072 38073 38074 38075 38076 38077 38078 38079 38080 38081 38082 38083 38084 38085 38086 38087 38088 38089 38090 38091 38092 38093 38094 38095 38096 38097 38098 38099 38100 38101 38102 38103 38104 38105 38106 38107 38108 38109 38110 38111 38112 38113 38114 38115 38116 38117 38118 38119 38120 38121 38122 38123 38124 38125 38126 38127 38128 38129 38130 38131 38132 38133 38134 38135 38136 38137 38138 38139 38140 38141 38142 38143 38144 38145 38146 38147 38148 38149 38150 38151 38152 38153 38154 38155 38156 38157 38158 38159 38160 38161 38162 38163 38164 38165 38166 38167 38168 38169 38170 38171 38172 38173 38174 38175 38176 38177 38178 38179 38180 38181 38182 38183 38184 38185 38186 38187 38188 38189 38190 38191 38192 38193 38194 38195 38196 38197 38198 38199 38200 38201 38202 38203 38204 38205 38206 38207 38208 38209 38210 38211 38212 38213 38214 38215 38216 38217 38218 38219 38220 38221 38222 38223 38224 38225 38226 38227 38228 38229 38230 38231 38232 38233 38234 38235 38236 38237 38238 38239 38240 38241 38242 38243 38244 38245 38246 38247 38248 38249 38250 38251 38252 38253 38254 38255 38256 38257 38258 38259 38260 38261 38262 38263 38264 38265 38266 38267 38268 38269 38270 38271 38272 38273 38274 38275 38276 38277 38278 38279 38280 38281 38282 38283 38284 38285 38286 38287 38288 38289 38290 38291 38292 38293 38294 38295 38296 38297 38298 38299 38300 38301 38302 38303 38304 38305 38306 38307 38308 38309 38310 38311 38312 38313 38314 38315 38316 38317 38318 38319 38320 38321 38322 38323 38324 38325 38326 38327 38328 38329 38330 38331 38332 38333 38334 38335 38336 38337 38338 38339 38340 38341 38342 38343 38344 38345 38346 38347 38348 38349 38350 38351 38352 38353 38354 38355 38356 38357 38358 38359 38360 38361 38362 38363 38364 38365 38366 38367 38368 38369 38370 38371 38372 38373 38374 38375 38376 38377 38378 38379 38380 38381 38382 38383 38384 38385 38386 38387 38388 38389 38390 38391 38392 38393 38394 38395 38396 38397 38398 38399 38400 38401 38402 38403 38404 38405 38406 38407 38408 38409 38410 38411 38412 38413 38414 38415 38416 38417 38418 38419 38420 38421 38422 38423 38424 38425 38426 38427 38428 38429 38430 38431 38432 38433 38434 38435 38436 38437 38438 38439 38440 38441 38442 38443 38444 38445 38446 38447 38448 38449 38450 38451 38452 38453 38454 38455 38456 38457 38458 38459 38460 38461 38462 38463 38464 38465 38466 38467 38468 38469 38470 38471 38472 38473 38474 38475 38476 38477 38478 38479 38480 38481 38482 38483 38484 38485 38486 38487 38488 38489 38490 38491 38492 38493 38494 38495 38496 38497 38498 38499 38500 38501 38502 38503 38504 38505 38506 38507 38508 38509 38510 38511 38512 38513 38514 38515 38516 38517 38518 38519 38520 38521 38522 38523 38524 38525 38526 38527 38528 38529 38530 38531 38532 38533 38534 38535 38536 38537 38538 38539 38540 38541 38542 38543 38544 38545 38546 38547 38548 38549 38550 38551 38552 38553 38554 38555 38556 38557 38558 38559 38560 38561 38562 38563 38564 38565 38566 38567 38568 38569 38570 38571 38572 38573 38574 38575 38576 38577 38578 38579 38580 38581 38582 38583 38584 38585 38586 38587 38588 38589 38590 38591 38592 38593 38594 38595 38596 38597 38598 38599 38600 38601 38602 38603 38604 38605 38606 38607 38608 38609 38610 38611 38612 38613 38614 38615 38616 38617 38618 38619 38620 38621 38622 38623 38624 38625 38626 38627 38628 38629 38630 38631 38632 38633 38634 38635 38636 38637 38638 38639 38640 38641 38642 38643 38644 38645 38646 38647 38648 38649 38650 38651 38652 38653 38654 38655 38656 38657 38658 38659 38660 38661 38662 38663 38664 38665 38666 38667 38668 38669 38670 38671 38672 38673 38674 38675 38676 38677 38678 38679 38680 38681 38682 38683 38684 38685 38686 38687 38688 38689 38690 38691 38692 38693 38694 38695 38696 38697 38698 38699 38700 38701 38702 38703 38704 38705 38706 38707 38708 38709 38710 38711 38712 38713 38714 38715 38716 38717 38718 38719 38720 38721 38722 38723 38724 38725 38726 38727 38728 38729 38730 38731 38732 38733 38734 38735 38736 38737 38738 38739 38740 38741 38742 38743 38744 38745 38746 38747 38748 38749 38750 38751 38752 38753 38754 38755 38756 38757 38758 38759 38760 38761 38762 38763 38764 38765 38766 38767 38768 38769 38770 38771 38772 38773 38774 38775 38776 38777 38778 38779 38780 38781 38782 38783 38784 38785 38786 38787 38788 38789 38790 38791 38792 38793 38794 38795 38796 38797 38798 38799 38800 38801 38802 38803 38804 38805 38806 38807 38808 38809 38810 38811 38812 38813 38814 38815 38816 38817 38818 38819 38820 38821 38822 38823 38824 38825 38826 38827 38828 38829 38830 38831 38832 38833 38834 38835 38836 38837 38838 38839 38840 38841 38842 38843 38844 38845 38846 38847 38848 38849 38850 38851 38852 38853 38854 38855 38856 38857 38858 38859 38860 38861 38862 38863 38864 38865 38866 38867 38868 38869 38870 38871 38872 38873 38874 38875 38876 38877 38878 38879 38880 38881 38882 38883 38884 38885 38886 38887 38888 38889 38890 38891 38892 38893 38894 38895 38896 38897 38898 38899 38900 38901 38902 38903 38904 38905 38906 38907 38908 38909 38910 38911 38912 38913 38914 38915 38916 38917 38918 38919 38920 38921 38922 38923 38924 38925 38926 38927 38928 38929 38930 38931 38932 38933 38934 38935 38936 38937 38938 38939 38940 38941 38942 38943 38944 38945 38946 38947 38948 38949 38950 38951 38952 38953 38954 38955 38956 38957 38958 38959 38960 38961 38962 38963 38964 38965 38966 38967 38968 38969 38970 38971 38972 38973 38974 38975 38976 38977 38978 38979 38980 38981 38982 38983 38984 38985 38986 38987 38988 38989 38990 38991 38992 38993 38994 38995 38996 38997 38998 38999 39000 39001 39002 39003 39004 39005 39006 39007 39008 39009 39010 39011 39012 39013 39014 39015 39016 39017 39018 39019 39020 39021 39022 39023 39024 39025 39026 39027 39028 39029 39030 39031 39032 39033 39034 39035 39036 39037 39038 39039 39040 39041 39042 39043 39044 39045 39046 39047 39048 39049 39050 39051 39052 39053 39054 39055 39056 39057 39058 39059 39060 39061 39062 39063 39064 39065 39066 39067 39068 39069 39070 39071 39072 39073 39074 39075 39076 39077 39078 39079 39080 39081 39082 39083 39084 39085 39086 39087 39088 39089 39090 39091 39092 39093 39094 39095 39096 39097 39098 39099 39100 39101 39102 39103 39104 39105 39106 39107 39108 39109 39110 39111 39112 39113 39114 39115 39116 39117 39118 39119 39120 39121 39122 39123 39124 39125 39126 39127 39128 39129 39130 39131 39132 39133 39134 39135 39136 39137 39138 39139 39140 39141 39142 39143 39144 39145 39146 39147 39148 39149 39150 39151 39152 39153 39154 39155 39156 39157 39158 39159 39160 39161 39162 39163 39164 39165 39166 39167 39168 39169 39170 39171 39172 39173 39174 39175 39176 39177 39178 39179 39180 39181 39182 39183 39184 39185 39186 39187 39188 39189 39190 39191 39192 39193 39194 39195 39196 39197 39198 39199 39200 39201 39202 39203 39204 39205 39206 39207 39208 39209 39210 39211 39212 39213 39214 39215 39216 39217 39218 39219 39220 39221 39222 39223 39224 39225 39226 39227 39228 39229 39230 39231 39232 39233 39234 39235 39236 39237 39238 39239 39240 39241 39242 39243 39244 39245 39246 39247 39248 39249 39250 39251 39252 39253 39254 39255 39256 39257 39258 39259 39260 39261 39262 39263 39264 39265 39266 39267 39268 39269 39270 39271 39272 39273 39274 39275 39276 39277 39278 39279 39280 39281 39282 39283 39284 39285 39286 39287 39288 39289 39290 39291 39292 39293 39294 39295 39296 39297 39298 39299 39300 39301 39302 39303 39304 39305 39306 39307 39308 39309 39310 39311 39312 39313 39314 39315 39316 39317 39318 39319 39320 39321 39322 39323 39324 39325 39326 39327 39328 39329 39330 39331 39332 39333 39334 39335 39336 39337 39338 39339 39340 39341 39342 39343 39344 39345 39346 39347 39348 39349 39350 39351 39352 39353 39354 39355 39356 39357 39358 39359 39360 39361 39362 39363 39364 39365 39366 39367 39368 39369 39370 39371 39372 39373 39374 39375 39376 39377 39378 39379 39380 39381 39382 39383 39384 39385 39386 39387 39388 39389 39390 39391 39392 39393 39394 39395 39396 39397 39398 39399 39400 39401 39402 39403 39404 39405 39406 39407 39408 39409 39410 39411 39412 39413 39414 39415 39416 39417 39418 39419 39420 39421 39422 39423 39424 39425 39426 39427 39428 39429 39430 39431 39432 39433 39434 39435 39436 39437 39438 39439 39440 39441 39442 39443 39444 39445 39446 39447 39448 39449 39450 39451 39452 39453 39454 39455 39456 39457 39458 39459 39460 39461 39462 39463 39464 39465 39466 39467 39468 39469 39470 39471 39472 39473 39474 39475 39476 39477 39478 39479 39480 39481 39482 39483 39484 39485 39486 39487 39488 39489 39490 39491 39492 39493 39494 39495 39496 39497 39498 39499 39500 39501 39502 39503 39504 39505 39506 39507 39508 39509 39510 39511 39512 39513 39514 39515 39516 39517 39518 39519 39520 39521 39522 39523 39524 39525 39526 39527 39528 39529 39530 39531 39532 39533 39534 39535 39536 39537 39538 39539 39540 39541 39542 39543 39544 39545 39546 39547 39548 39549 39550 39551 39552 39553 39554 39555 39556 39557 39558 39559 39560 39561 39562 39563 39564 39565 39566 39567 39568 39569 39570 39571 39572 39573 39574 39575 39576 39577 39578 39579 39580 39581 39582 39583 39584 39585 39586 39587 39588 39589 39590 39591 39592 39593 39594 39595 39596 39597 39598 39599 39600 39601 39602 39603 39604 39605 39606 39607 39608 39609 39610 39611 39612 39613 39614 39615 39616 39617 39618 39619 39620 39621 39622 39623 39624 39625 39626 39627 39628 39629 39630 39631 39632 39633 39634 39635 39636 39637 39638 39639 39640 39641 39642 39643 39644 39645 39646 39647 39648 39649 39650 39651 39652 39653 39654 39655 39656 39657 39658 39659 39660 39661 39662 39663 39664 39665 39666 39667 39668 39669 39670 39671 39672 39673 39674 39675 39676 39677 39678 39679 39680 39681 39682 39683 39684 39685 39686 39687 39688 39689 39690 39691 39692 39693 39694 39695 39696 39697 39698 39699 39700 39701 39702 39703 39704 39705 39706 39707 39708 39709 39710 39711 39712 39713 39714 39715 39716 39717 39718 39719 39720 39721 39722 39723 39724 39725 39726 39727 39728 39729 39730 39731 39732 39733 39734 39735 39736 39737 39738 39739 39740 39741 39742 39743 39744 39745 39746 39747 39748 39749 39750 39751 39752 39753 39754 39755 39756 39757 39758 39759 39760 39761 39762 39763 39764 39765 39766 39767 39768 39769 39770 39771 39772 39773 39774 39775 39776 39777 39778 39779 39780 39781 39782 39783 39784 39785 39786 39787 39788 39789 39790 39791 39792 39793 39794 39795 39796 39797 39798 39799 39800 39801 39802 39803 39804 39805 39806 39807 39808 39809 39810 39811 39812 39813 39814 39815 39816 39817 39818 39819 39820 39821 39822 39823 39824 39825 39826 39827 39828 39829 39830 39831 39832 39833 39834 39835 39836 39837 39838 39839 39840 39841 39842 39843 39844 39845 39846 39847 39848 39849 39850 39851 39852 39853 39854 39855 39856 39857 39858 39859 39860 39861 39862 39863 39864 39865 39866 39867 39868 39869 39870 39871 39872 39873 39874 39875 39876 39877 39878 39879 39880 39881 39882 39883 39884 39885 39886 39887 39888 39889 39890 39891 39892 39893 39894 39895 39896 39897 39898 39899 39900 39901 39902 39903 39904 39905 39906 39907 39908 39909 39910 39911 39912 39913 39914 39915 39916 39917 39918 39919 39920 39921 39922 39923 39924 39925 39926 39927 39928 39929 39930 39931 39932 39933 39934 39935 39936 39937 39938 39939 39940 39941 39942 39943 39944 39945 39946 39947 39948 39949 39950 39951 39952 39953 39954 39955 39956 39957 39958 39959 39960 39961 39962 39963 39964 39965 39966 39967 39968 39969 39970 39971 39972 39973 39974 39975 39976 39977 39978 39979 39980 39981 39982 39983 39984 39985 39986 39987 39988 39989 39990 39991 39992 39993 39994 39995 39996 39997 39998 39999 40000 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 40011 40012 40013 40014 40015 40016 40017 40018 40019 40020 40021 40022 40023 40024 40025 40026 40027 40028 40029 40030 40031 40032 40033 40034 40035 40036 40037 40038 40039 40040 40041 40042 40043 40044 40045 40046 40047 40048 40049 40050 40051 40052 40053 40054 40055 40056 40057 40058 40059 40060 40061 40062 40063 40064 40065 40066 40067 40068 40069 40070 40071 40072 40073 40074 40075 40076 40077 40078 40079 40080 40081 40082 40083 40084 40085 40086 40087 40088 40089 40090 40091 40092 40093 40094 40095 40096 40097 40098 40099 40100 40101 40102 40103 40104 40105 40106 40107 40108 40109 40110 40111 40112 40113 40114 40115 40116 40117 40118 40119 40120 40121 40122 40123 40124 40125 40126 40127 40128 40129 40130 40131 40132 40133 40134 40135 40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303 40304 40305 40306 40307 40308 40309 40310 40311 40312 40313 40314 40315 40316 40317 40318 40319 40320 40321 40322 40323 40324 40325 40326 40327 40328 40329 40330 40331 40332 40333 40334 40335 40336 40337 40338 40339 40340 40341 40342 40343 40344 40345 40346 40347 40348 40349 40350 40351 40352 40353 40354 40355 40356 40357 40358 40359 40360 40361 40362 40363 40364 40365 40366 40367 40368 40369 40370 40371 40372 40373 40374 40375 40376 40377 40378 40379 40380 40381 40382 40383 40384 40385 40386 40387 40388 40389 40390 40391 40392 40393 40394 40395 40396 40397 40398 40399 40400 40401 40402 40403 40404 40405 40406 40407 40408 40409 40410 40411 40412 40413 40414 40415 40416 40417 40418 40419 40420 40421 40422 40423 40424 40425 40426 40427 40428 40429 40430 40431 40432 40433 40434 40435 40436 40437 40438 40439 40440 40441 40442 40443 40444 40445 40446 40447 40448 40449 40450 40451 40452 40453 40454 40455 40456 40457 40458 40459 40460 40461 40462 40463 40464 40465 40466 40467 40468 40469 40470 40471 40472 40473 40474 40475 40476 40477 40478 40479 40480 40481 40482 40483 40484 40485 40486 40487 40488 40489 40490 40491 40492 40493 40494 40495 40496 40497 40498 40499 40500 40501 40502 40503 40504 40505 40506 40507 40508 40509 40510 40511 40512 40513 40514 40515 40516 40517 40518 40519 40520 40521 40522 40523 40524 40525 40526 40527 40528 40529 40530 40531 40532 40533 40534 40535 40536 40537 40538 40539 40540 40541 40542 40543 40544 40545 40546 40547 40548 40549 40550 40551 40552 40553 40554 40555 40556 40557 40558 40559 40560 40561 40562 40563 40564 40565 40566 40567 40568 40569 40570 40571 40572 40573 40574 40575 40576 40577 40578 40579 40580 40581 40582 40583 40584 40585 40586 40587 40588 40589 40590 40591 40592 40593 40594 40595 40596 40597 40598 40599 40600 40601 40602 40603 40604 40605 40606 40607 40608 40609 40610 40611 40612 40613 40614 40615 40616 40617 40618 40619 40620 40621 40622 40623 40624 40625 40626 40627 40628 40629 40630 40631 40632 40633 40634 40635 40636 40637 40638 40639 40640 40641 40642 40643 40644 40645 40646 40647 40648 40649 40650 40651 40652 40653 40654 40655 40656 40657 40658 40659 40660 40661 40662 40663 40664 40665 40666 40667 40668 40669 40670 40671 40672 40673 40674 40675 40676 40677 40678 40679 40680 40681 40682 40683 40684 40685 40686 40687 40688 40689 40690 40691 40692 40693 40694 40695 40696 40697 40698 40699 40700 40701 40702 40703 40704 40705 40706 40707 40708 40709 40710 40711 40712 40713 40714 40715 40716 40717 40718 40719 40720 40721 40722 40723 40724 40725 40726 40727 40728 40729 40730 40731 40732 40733 40734 40735 40736 40737 40738 40739 40740 40741 40742 40743 40744 40745 40746 40747 40748 40749 40750 40751 40752 40753 40754 40755 40756 40757 40758 40759 40760 40761 40762 40763 40764 40765 40766 40767 40768 40769 40770 40771 40772 40773 40774 40775 40776 40777 40778 40779 40780 40781 40782 40783 40784 40785 40786 40787 40788 40789 40790 40791 40792 40793 40794 40795 40796 40797 40798 40799 40800 40801 40802 40803 40804 40805 40806 40807 40808 40809 40810 40811 40812 40813 40814 40815 40816 40817 40818 40819 40820 40821 40822 40823 40824 40825 40826 40827 40828 40829 40830 40831 40832 40833 40834 40835 40836 40837 40838 40839 40840 40841 40842 40843 40844 40845 40846 40847 40848 40849 40850 40851 40852 40853 40854 40855 40856 40857 40858 40859 40860 40861 40862 40863 40864 40865 40866 40867 40868 40869 40870 40871 40872 40873 40874 40875 40876 40877 40878 40879 40880 40881 40882 40883 40884 40885 40886 40887 40888 40889 40890 40891 40892 40893 40894 40895 40896 40897 40898 40899 40900 40901 40902 40903 40904 40905 40906 40907 40908 40909 40910 40911 40912 40913 40914 40915 40916 40917 40918 40919 40920 40921 40922 40923 40924 40925 40926 40927 40928 40929 40930 40931 40932 40933 40934 40935 40936 40937 40938 40939 40940 40941 40942 40943 40944 40945 40946 40947 40948 40949 40950 40951 40952 40953 40954 40955 40956 40957 40958 40959 40960 40961 40962 40963 40964 40965 40966 40967 40968 40969 40970 40971 40972 40973 40974 40975 40976 40977 40978 40979 40980 40981 40982 40983 40984 40985 40986 40987 40988 40989 40990 40991 40992 40993 40994 40995 40996 40997 40998 40999 41000 41001 41002 41003 41004 41005 41006 41007 41008 41009 41010 41011 41012 41013 41014 41015 41016 41017 41018 41019 41020 41021 41022 41023 41024 41025 41026 41027 41028 41029 41030 41031 41032 41033 41034 41035 41036 41037 41038 41039 41040 41041 41042 41043 41044 41045 41046 41047 41048 41049 41050 41051 41052 41053 41054 41055 41056 41057 41058 41059 41060 41061 41062 41063 41064 41065 41066 41067 41068 41069 41070 41071 41072 41073 41074 41075 41076 41077 41078 41079 41080 41081 41082 41083 41084 41085 41086 41087 41088 41089 41090 41091 41092 41093 41094 41095 41096 41097 41098 41099 41100 41101 41102 41103 41104 41105 41106 41107 41108 41109 41110 41111 41112 41113 41114 41115 41116 41117 41118 41119 41120 41121 41122 41123 41124 41125 41126 41127 41128 41129 41130 41131 41132 41133 41134 41135 41136 41137 41138 41139 41140 41141 41142 41143 41144 41145 41146 41147 41148 41149 41150 41151 41152 41153 41154 41155 41156 41157 41158 41159 41160 41161 41162 41163 41164 41165 41166 41167 41168 41169 41170 41171 41172 41173 41174 41175 41176 41177 41178 41179 41180 41181 41182 41183 41184 41185 41186 41187 41188 41189 41190 41191 41192 41193 41194 41195 41196 41197 41198 41199 41200 41201 41202 41203 41204 41205 41206 41207 41208 41209 41210 41211 41212 41213 41214 41215 41216 41217 41218 41219 41220 41221 41222 41223 41224 41225 41226 41227 41228 41229 41230 41231 41232 41233 41234 41235 41236 41237 41238 41239 41240 41241 41242 41243 41244 41245 41246 41247 41248 41249 41250 41251 41252 41253 41254 41255 41256 41257 41258 41259 41260 41261 41262 41263 41264 41265 41266 41267 41268 41269 41270 41271 41272 41273 41274 41275 41276 41277 41278 41279 41280 41281 41282 41283 41284 41285 41286 41287 41288 41289 41290 41291 41292 41293 41294 41295 41296 41297 41298 41299 41300 41301 41302 41303 41304 41305 41306 41307 41308 41309 41310 41311 41312 41313 41314 41315 41316 41317 41318 41319 41320 41321 41322 41323 41324 41325 41326 41327 41328 41329 41330 41331 41332 41333 41334 41335 41336 41337 41338 41339 41340 41341 41342 41343 41344 41345 41346 41347 41348 41349 41350 41351 41352 41353 41354 41355 41356 41357 41358 41359 41360 41361 41362 41363 41364 41365 41366 41367 41368 41369 41370 41371 41372 41373 41374 41375 41376 41377 41378 41379 41380 41381 41382 41383 41384 41385 41386 41387 41388 41389 41390 41391 41392 41393 41394 41395 41396 41397 41398 41399 41400 41401 41402 41403 41404 41405 41406 41407 41408 41409 41410 41411 41412 41413 41414 41415 41416 41417 41418 41419 41420 41421 41422 41423 41424 41425 41426 41427 41428 41429 41430 41431 41432 41433 41434 41435 41436 41437 41438 41439 41440 41441 41442 41443 41444 41445 41446 41447 41448 41449 41450 41451 41452 41453 41454 41455 41456 41457 41458 41459 41460 41461 41462 41463 41464 41465 41466 41467 41468 41469 41470 41471 41472 41473 41474 41475 41476 41477 41478 41479 41480 41481 41482 41483 41484 41485 41486 41487 41488 41489 41490 41491 41492 41493 41494 41495 41496 41497 41498 41499 41500 41501 41502 41503 41504 41505 41506 41507 41508 41509 41510 41511 41512 41513 41514 41515 41516 41517 41518 41519 41520 41521 41522 41523 41524 41525 41526 41527 41528 41529 41530 41531 41532 41533 41534 41535 41536 41537 41538 41539 41540 41541 41542 41543 41544 41545 41546 41547 41548 41549 41550 41551 41552 41553 41554 41555 41556 41557 41558 41559 41560 41561 41562 41563 41564 41565 41566 41567 41568 41569 41570 41571 41572 41573 41574 41575 41576 41577 41578 41579 41580 41581 41582 41583 41584 41585 41586 41587 41588 41589 41590 41591 41592 41593 41594 41595 41596 41597 41598 41599 41600 41601 41602 41603 41604 41605 41606 41607 41608 41609 41610 41611 41612 41613 41614 41615 41616 41617 41618 41619 41620 41621 41622 41623 41624 41625 41626 41627 41628 41629 41630 41631 41632 41633 41634 41635 41636 41637 41638 41639 41640 41641 41642 41643 41644 41645 41646 41647 41648 41649 41650 41651 41652 41653 41654 41655 41656 41657 41658 41659 41660 41661 41662 41663 41664 41665 41666 41667 41668 41669 41670 41671 41672 41673 41674 41675 41676 41677 41678 41679 41680 41681 41682 41683 41684 41685 41686 41687 41688 41689 41690 41691 41692 41693 41694 41695 41696 41697 41698 41699 41700 41701 41702 41703 41704 41705 41706 41707 41708 41709 41710 41711 41712 41713 41714 41715 41716 41717 41718 41719 41720 41721 41722 41723 41724 41725 41726 41727 41728 41729 41730 41731 41732 41733 41734 41735 41736 41737 41738 41739 41740 41741 41742 41743 41744 41745 41746 41747 41748 41749 41750 41751 41752 41753 41754 41755 41756 41757 41758 41759 41760 41761 41762 41763 41764 41765 41766 41767 41768 41769 41770 41771 41772 41773 41774 41775 41776 41777 41778 41779 41780 41781 41782 41783 41784 41785 41786 41787 41788 41789 41790 41791 41792 41793 41794 41795 41796 41797 41798 41799 41800 41801 41802 41803 41804 41805 41806 41807 41808 41809 41810 41811 41812 41813 41814 41815 41816 41817 41818 41819 41820 41821 41822 41823 41824 41825 41826 41827 41828 41829 41830 41831 41832 41833 41834 41835 41836 41837 41838 41839 41840 41841 41842 41843 41844 41845 41846 41847 41848 41849 41850 41851 41852 41853 41854 41855 41856 41857 41858 41859 41860 41861 41862 41863 41864 41865 41866 41867 41868 41869 41870 41871 41872 41873 41874 41875 41876 41877 41878 41879 41880 41881 41882 41883 41884 41885 41886 41887 41888 41889 41890 41891 41892 41893 41894 41895 41896 41897 41898 41899 41900 41901 41902 41903 41904 41905 41906 41907 41908 41909 41910 41911 41912 41913 41914 41915 41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 41932 41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 41985 41986 41987 41988 41989 41990 41991 41992 41993 41994 41995 41996 41997 41998 41999 42000 42001 42002 42003 42004 42005 42006 42007 42008 42009 42010 42011 42012 42013 42014 42015 42016 42017 42018 42019 42020 42021 42022 42023 42024 42025 42026 42027 42028 42029 42030 42031 42032 42033 42034 42035 42036 42037 42038 42039 42040 42041 42042 42043 42044 42045 42046 42047 42048 42049 42050 42051 42052 42053 42054 42055 42056 42057 42058 42059 42060 42061 42062 42063 42064 42065 42066 42067 42068 42069 42070 42071 42072 42073 42074 42075 42076 42077 42078 42079 42080 42081 42082 42083 42084 42085 42086 42087 42088 42089 42090 42091 42092 42093 42094 42095 42096 42097 42098 42099 42100 42101 42102 42103 42104 42105 42106 42107 42108 42109 42110 42111 42112 42113 42114 42115 42116 42117 42118 42119 42120 42121 42122 42123 42124 42125 42126 42127 42128 42129 42130 42131 42132 42133 42134 42135 42136 42137 42138 42139 42140 42141 42142 42143 42144 42145 42146 42147 42148 42149 42150 42151 42152 42153 42154 42155 42156 42157 42158 42159 42160 42161 42162 42163 42164 42165 42166 42167 42168 42169 42170 42171 42172 42173 42174 42175 42176 42177 42178 42179 42180 42181 42182 42183 42184 42185 42186 42187 42188 42189 42190 42191 42192 42193 42194 42195 42196 42197 42198 42199 42200 42201 42202 42203 42204 42205 42206 42207 42208 42209 42210 42211 42212 42213 42214 42215 42216 42217 42218 42219 42220 42221 42222 42223 42224 42225 42226 42227 42228 42229 42230 42231 42232 42233 42234 42235 42236 42237 42238 42239 42240 42241 42242 42243 42244 42245 42246 42247 42248 42249 42250 42251 42252 42253 42254 42255 42256 42257 42258 42259 42260 42261 42262 42263 42264 42265 42266 42267 42268 42269 42270 42271 42272 42273 42274 42275 42276 42277 42278 42279 42280 42281 42282 42283 42284 42285 42286 42287 42288 42289 42290 42291 42292 42293 42294 42295 42296 42297 42298 42299 42300 42301 42302 42303 42304 42305 42306 42307 42308 42309 42310 42311 42312 42313 42314 42315 42316 42317 42318 42319 42320 42321 42322 42323 42324 42325 42326 42327 42328 42329 42330 42331 42332 42333 42334 42335 42336 42337 42338 42339 42340 42341 42342 42343 42344 42345 42346 42347 42348 42349 42350 42351 42352 42353 42354 42355 42356 42357 42358 42359 42360 42361 42362 42363 42364 42365 42366 42367 42368 42369 42370 42371 42372 42373 42374 42375 42376 42377 42378 42379 42380 42381 42382 42383 42384 42385 42386 42387 42388 42389 42390 42391 42392 42393 42394 42395 42396 42397 42398 42399 42400 42401 42402 42403 42404 42405 42406 42407 42408 42409 42410 42411 42412 42413 42414 42415 42416 42417 42418 42419 42420 42421 42422 42423 42424 42425 42426 42427 42428 42429 42430 42431 42432 42433 42434 42435 42436 42437 42438 42439 42440 42441 42442 42443 42444 42445 42446 42447 42448 42449 42450 42451 42452 42453 42454 42455 42456 42457 42458 42459 42460 42461 42462 42463 42464 42465 42466 42467 42468 42469 42470 42471 42472 42473 42474 42475 42476 42477 42478 42479 42480 42481 42482 42483 42484 42485 42486 42487 42488 42489 42490 42491 42492 42493 42494 42495 42496 42497 42498 42499 42500 42501 42502 42503 42504 42505 42506 42507 42508 42509 42510 42511 42512 42513 42514 42515 42516 42517 42518 42519 42520 42521 42522 42523 42524 42525 42526 42527 42528 42529 42530 42531 42532 42533 42534 42535 42536 42537 42538 42539 42540 42541 42542 42543 42544 42545 42546 42547 42548 42549 42550 42551 42552 42553 42554 42555 42556 42557 42558 42559 42560 42561 42562 42563 42564 42565 42566 42567 42568 42569 42570 42571 42572 42573 42574 42575 42576 42577 42578 42579 42580 42581 42582 42583 42584 42585 42586 42587 42588 42589 42590 42591 42592 42593 42594 42595 42596 42597 42598 42599 42600 42601 42602 42603 42604 42605 42606 42607 42608 42609 42610 42611 42612 42613 42614 42615 42616 42617 42618 42619 42620 42621 42622 42623 42624 42625 42626 42627 42628 42629 42630 42631 42632 42633 42634 42635 42636 42637 42638 42639 42640 42641 42642 42643 42644 42645 42646 42647 42648 42649 42650 42651 42652 42653 42654 42655 42656 42657 42658 42659 42660 42661 42662 42663 42664 42665 42666 42667 42668 42669 42670 42671 42672 42673 42674 42675 42676 42677 42678 42679 42680 42681 42682 42683 42684 42685 42686 42687 42688 42689 42690 42691 42692 42693 42694 42695 42696 42697 42698 42699 42700 42701 42702 42703 42704 42705 42706 42707 42708 42709 42710 42711 42712 42713 42714 42715 42716 42717 42718 42719 42720 42721 42722 42723 42724 42725 42726 42727 42728 42729 42730 42731 42732 42733 42734 42735 42736 42737 42738 42739 42740 42741 42742 42743 42744 42745 42746 42747 42748 42749 42750 42751 42752 42753 42754 42755 42756 42757 42758 42759 42760 42761 42762 42763 42764 42765 42766 42767 42768 42769 42770 42771 42772 42773 42774 42775 42776 42777 42778 42779 42780 42781 42782 42783 42784 42785 42786 42787 42788 42789 42790 42791 42792 42793 42794 42795 42796 42797 42798 42799 42800 42801 42802 42803 42804 42805 42806 42807 42808 42809 42810 42811 42812 42813 42814 42815 42816 42817 42818 42819 42820 42821 42822 42823 42824 42825 42826 42827 42828 42829 42830 42831 42832 42833 42834 42835 42836 42837 42838 42839 42840 42841 42842 42843 42844 42845 42846 42847 42848 42849 42850 42851 42852 42853 42854 42855 42856 42857 42858 42859 42860 42861 42862 42863 42864 42865 42866 42867 42868 42869 42870 42871 42872 42873 42874 42875 42876 42877 42878 42879 42880 42881 42882 42883 42884 42885 42886 42887 42888 42889 42890 42891 42892 42893 42894 42895 42896 42897 42898 42899 42900 42901 42902 42903 42904 42905 42906 42907 42908 42909 42910 42911 42912 42913 42914 42915 42916 42917 42918 42919 42920 42921 42922 42923 42924 42925 42926 42927 42928 42929 42930 42931 42932 42933 42934 42935 42936 42937 42938 42939 42940 42941 42942 42943 42944 42945 42946 42947 42948 42949 42950 42951 42952 42953 42954 42955 42956 42957 42958 42959 42960 42961 42962 42963 42964 42965 42966 42967 42968 42969 42970 42971 42972 42973 42974 42975 42976 42977 42978 42979 42980 42981 42982 42983 42984 42985 42986 42987 42988 42989 42990 42991 42992 42993 42994 42995 42996 42997 42998 42999 43000 43001 43002 43003 43004 43005 43006 43007 43008 43009 43010 43011 43012 43013 43014 43015 43016 43017 43018 43019 43020 43021 43022 43023 43024 43025 43026 43027 43028 43029 43030 43031 43032 43033 43034 43035 43036 43037 43038 43039 43040 43041 43042 43043 43044 43045 43046 43047 43048 43049 43050 43051 43052 43053 43054 43055 43056 43057 43058 43059 43060 43061 43062 43063 43064 43065 43066 43067 43068 43069 43070 43071 43072 43073 43074 43075 43076 43077 43078 43079 43080 43081 43082 43083 43084 43085 43086 43087 43088 43089 43090 43091 43092 43093 43094 43095 43096 43097 43098 43099 43100 43101 43102 43103 43104 43105 43106 43107 43108 43109 43110 43111 43112 43113 43114 43115 43116 43117 43118 43119 43120 43121 43122 43123 43124 43125 43126 43127 43128 43129 43130 43131 43132 43133 43134 43135 43136 43137 43138 43139 43140 43141 43142 43143 43144 43145 43146 43147 43148 43149 43150 43151 43152 43153 43154 43155 43156 43157 43158 43159 43160 43161 43162 43163 43164 43165 43166 43167 43168 43169 43170 43171 43172 43173 43174 43175 43176 43177 43178 43179 43180 43181 43182 43183 43184 43185 43186 43187 43188 43189 43190 43191 43192 43193 43194 43195 43196 43197 43198 43199 43200 43201 43202 43203 43204 43205 43206 43207 43208 43209 43210 43211 43212 43213 43214 43215 43216 43217 43218 43219 43220 43221 43222 43223 43224 43225 43226 43227 43228 43229 43230 43231 43232 43233 43234 43235 43236 43237 43238 43239 43240 43241 43242 43243 43244 43245 43246 43247 43248 43249 43250 43251 43252 43253 43254 43255 43256 43257 43258 43259 43260 43261 43262 43263 43264 43265 43266 43267 43268 43269 43270 43271 43272 43273 43274 43275 43276 43277 43278 43279 43280 43281 43282 43283 43284 43285 43286 43287 43288 43289 43290 43291 43292 43293 43294 43295 43296 43297 43298 43299 43300 43301 43302 43303 43304 43305 43306 43307 43308 43309 43310 43311 43312 43313 43314 43315 43316 43317 43318 43319 43320 43321 43322 43323 43324 43325 43326 43327 43328 43329 43330 43331 43332 43333 43334 43335 43336 43337 43338 43339 43340 43341 43342 43343 43344 43345 43346 43347 43348 43349 43350 43351 43352 43353 43354 43355 43356 43357 43358 43359 43360 43361 43362 43363 43364 43365 43366 43367 43368 43369 43370 43371 43372 43373 43374 43375 43376 43377 43378 43379 43380 43381 43382 43383 43384 43385 43386 43387 43388 43389 43390 43391 43392 43393 43394 43395 43396 43397 43398 43399 43400 43401 43402 43403 43404 43405 43406 43407 43408 43409 43410 43411 43412 43413 43414 43415 43416 43417 43418 43419 43420 43421 43422 43423 43424 43425 43426 43427 43428 43429 43430 43431 43432 43433 43434 43435 43436 43437 43438 43439 43440 43441 43442 43443 43444 43445 43446 43447 43448 43449 43450 43451 43452 43453 43454 43455 43456 43457 43458 43459 43460 43461 43462 43463 43464 43465 43466 43467 43468 43469 43470 43471 43472 43473 43474 43475 43476 43477 43478 43479 43480 43481 43482 43483 43484 43485 43486 43487 43488 43489 43490 43491 43492 43493 43494 43495 43496 43497 43498 43499 43500 43501 43502 43503 43504 43505 43506 43507 43508 43509 43510 43511 43512 43513 43514 43515 43516 43517 43518 43519 43520 43521 43522 43523 43524 43525 43526 43527 43528 43529 43530 43531 43532 43533 43534 43535 43536 43537 43538 43539 43540 43541 43542 43543 43544 43545 43546 43547 43548 43549 43550 43551 43552 43553 43554 43555 43556 43557 43558 43559 43560 43561 43562 43563 43564 43565 43566 43567 43568 43569 43570 43571 43572 43573 43574 43575 43576 43577 43578 43579 43580 43581 43582 43583 43584 43585 43586 43587 43588 43589 43590 43591 43592 43593 43594 43595 43596 43597 43598 43599 43600 43601 43602 43603 43604 43605 43606 43607 43608 43609 43610 43611 43612 43613 43614 43615 43616 43617 43618 43619 43620 43621 43622 43623 43624 43625 43626 43627 43628 43629 43630 43631 43632 43633 43634 43635 43636 43637 43638 43639 43640 43641 43642 43643 43644 43645 43646 43647 43648 43649 43650 43651 43652 43653 43654 43655 43656 43657 43658 43659 43660 43661 43662 43663 43664 43665 43666 43667 43668 43669 43670 43671 43672 43673 43674 43675 43676 43677 43678 43679 43680 43681 43682 43683 43684 43685 43686 43687 43688 43689 43690 43691 43692 43693 43694 43695 43696 43697 43698 43699 43700 43701 43702 43703 43704 43705 43706 43707 43708 43709 43710 43711 43712 43713 43714 43715 43716 43717 43718 43719 43720 43721 43722 43723 43724 43725 43726 43727 43728 43729 43730 43731 43732 43733 43734 43735 43736 43737 43738 43739 43740 43741 43742 43743 43744 43745 43746 43747 43748 43749 43750 43751 43752 43753 43754 43755 43756 43757 43758 43759 43760 43761 43762 43763 43764 43765 43766 43767 43768 43769 43770 43771 43772 43773 43774 43775 43776 43777 43778 43779 43780 43781 43782 43783 43784 43785 43786 43787 43788 43789 43790 43791 43792 43793 43794 43795 43796 43797 43798 43799 43800 43801 43802 43803 43804 43805 43806 43807 43808 43809 43810 43811 43812 43813 43814 43815 43816 43817 43818 43819 43820 43821 43822 43823 43824 43825 43826 43827 43828 43829 43830 43831 43832 43833 43834 43835 43836 43837 43838 43839 43840 43841 43842 43843 43844 43845 43846 43847 43848 43849 43850 43851 43852 43853 43854 43855 43856 43857 43858 43859 43860 43861 43862 43863 43864 43865 43866 43867 43868 43869 43870 43871 43872 43873 43874 43875 43876 43877 43878 43879 43880 43881 43882 43883 43884 43885 43886 43887 43888 43889 43890 43891 43892 43893 43894 43895 43896 43897 43898 43899 43900 43901 43902 43903 43904 43905 43906 43907 43908 43909 43910 43911 43912 43913 43914 43915 43916 43917 43918 43919 43920 43921 43922 43923 43924 43925 43926 43927 43928 43929 43930 43931 43932 43933 43934 43935 43936 43937 43938 43939 43940 43941 43942 43943 43944 43945 43946 43947 43948 43949 43950 43951 43952 43953 43954 43955 43956 43957 43958 43959 43960 43961 43962 43963 43964 43965 43966 43967 43968 43969 43970 43971 43972 43973 43974 43975 43976 43977 43978 43979 43980 43981 43982 43983 43984 43985 43986 43987 43988 43989 43990 43991 43992 43993 43994 43995 43996 43997 43998 43999 44000 44001 44002 44003 44004 44005 44006 44007 44008 44009 44010 44011 44012 44013 44014 44015 44016 44017 44018 44019 44020 44021 44022 44023 44024 44025 44026 44027 44028 44029 44030 44031 44032 44033
|
#! /bin/sh -e
dir=.
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir=$3
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p1 < $0
rm -f $dir/aclocal.m4
rm -f $dir/configure
rm -f $dir/doc/bashref.info
rm -f $dir/examples/bashdb/bashdb.el
rm -f $dir/lib/readline/doc/Makefile
rm -f $dir/parser-built
rm -f $dir/pathnames.h
rm -f $dir/y.tab.[ch]
(cd $dir && aclocal -I . -I debugger)
(cd $dir && autoconf)
for i in config.guess config.sub elisp-comp install-sh \
missing mkinstalldirs
do
cp -p /usr/share/automake-1.7/$i $dir/debugger/
done
for i in mdate-sh texinfo.tex; do
cp -p /usr/share/automake-1.7/$i $dir/debugger/doc/
done
(cd $dir/debugger && aclocal -I ..)
cp -p $dir/debugger/elisp-comp $dir/debugger/emacs/.
(cd $dir/debugger && automake)
(cd $dir/debugger && autoconf)
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
# how to construct this file:
# - unpack the upstream bash source
# - unpack the bashdb source
# - apply bash the seven bash upstream patches
# - diff -ur --unidirectional-new-file \
--exclude CVS --exclude=.cvsignore --exclude=/db/ \
# bash-2.05b bashdb
# DP: bashdb changes
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/ChangeLog cvs/ChangeLog
--- bash-2.05b/ChangeLog 1970-01-01 01:00:00.000000000 +0100
+++ cvs/ChangeLog 2003-06-01 03:18:28.000000000 +0200
@@ -0,0 +1,4559 @@
+2003-05-27 07:32 rockyb
+
+ * lib/readline/histfile.c: Bug: uninitalized initial bp1
+
+2003-05-27 07:22 rockyb
+
+ * lib/readline/histfile.c: This time, for sure.
+
+2003-05-27 07:19 rockyb
+
+ * lib/readline/histfile.c: Wasn't updating bp1. There's still a bug
+ in truncating the history though.
+
+2003-05-24 16:45 rockyb
+
+ * tests/: history.right, run-histexpand, run-history: Update
+ history regression tests for new code.
+
+2003-05-24 16:29 rockyb
+
+ * configure.in: Get ready for yet another release...
+
+2003-05-24 16:22 rockyb
+
+ * builtins/history.def: Small typo.
+
+2003-05-24 16:13 rockyb
+
+ * ChangeLog, bashhist.c, builtins/history.def, doc/bashref.texi:
+ Add timestamp to history file. Environment variable HISTTIMEFORMAT
+ controls how to display.
+
+2003-05-24 16:11 rockyb
+
+ * lib/readline/examples/.cvsignore: Useful file.
+
+2003-05-24 16:10 rockyb
+
+ * lib/readline/: histfile.c, history.c, history.h,
+ examples/Makefile, examples/histexamp.c: Add timestamps to history
+ files. Makefile: add targets for histexamp
+
+2003-05-21 03:45 rockyb
+
+ * doc/bashdb.texi: Clarification of "stepi" for scripting
+ languages.
+
+2003-05-21 03:43 rockyb
+
+ * configure.in: [no log message]
+
+2003-05-20 14:02 rockyb
+
+ * debugger/dbg-init.inc: More OS-independent (output independent)
+ test if a terminal is attached.
+
+2003-05-07 19:12 rockyb
+
+ * execute_cmd.c: Cater to older C compilers.
+
+2003-04-29 20:33 rockyb
+
+ * debugger/NEWS: [no log message]
+
+2003-04-29 20:22 rockyb
+
+ * debugger/: bashdb, dbg-cmds.inc, dbg-fns.inc, dbg-init.inc: Bug:
+ Was using source filename rather than canonicalized (expanded)
+ filename.
+
+2003-04-29 20:21 rockyb
+
+ * debugger/tests/: debug.right, list.right, sig.right: Basename
+ made to work like basename.
+
+2003-04-07 23:29 rockyb
+
+ * MANIFEST, configure.in, debugger/ddd/ddd-3.3.1-bashdb.diff: We
+ now have this all in CVS as well as a file release.
+
+2003-04-07 23:28 rockyb
+
+ * doc/: bashdb.texi, version.texi.in: [no log message]
+
+2003-04-07 23:27 rockyb
+
+ * debugger/tests/sig.right: Line number always changing on me.
+
+2003-04-07 23:26 rockyb
+
+ * debugger/tests/: misc.cmd, misc.right: Give invalid command to
+ get "Invalid command" back.
+
+2003-04-07 23:24 rockyb
+
+ * debugger/dbg-cmds.inc: Use gdb undefined command message.
+
+2003-04-02 02:45 rockyb
+
+ * doc/: bashdb.texi, bashdb.texi: [no log message]
+
+2003-04-02 02:34 rockyb
+
+ * doc/bashdb.texi: Lots of little typos. Apparently @xxx{} doesn't
+ work as expected.
+
+2003-04-01 10:12 rockyb
+
+ * doc/bashdb.texi: Add section on using bashdb from DDD.
+
+ Breakpoints now start at 1.
+
+ Update to reflect changed breakpoint output.
+
+ Document "set annotate"
+
+ Minor corrections.
+
+2003-03-31 10:09 rockyb
+
+ * debugger/: NEWS, dbg-brk.inc, tests/action.right,
+ tests/brkpt1.right, tests/brkpt2.right, tests/display.right,
+ tests/tbreak.right, tests/watch1.right: Numbers in
+ breakpoint/watchpoint/action numbers are printed in a "%-3d" rather
+ than (I think the nicer) %3d" to match gdb's output. This helps ddd
+ parse breakpoints.
+
+2003-03-30 22:04 rockyb
+
+ * debugger/: NEWS, dbg-brk.inc, tests/action.right,
+ tests/brkpt1.cmd, tests/brkpt1.right, tests/brkpt2.cmd,
+ tests/brkpt2.right, tests/brkpt3.cmd, tests/brkpt3.right,
+ tests/bugIFS.right, tests/debug.right, tests/display.right,
+ tests/finish.right, tests/parm.right, tests/tbreak.right,
+ tests/watch2.right: Breakpoints are now are origin 1 to match gdb.
+ It also helps ddd.
+
+2003-03-27 00:34 rockyb
+
+ * debugger/dbg-pre.inc.in: Ooops - changed dbg-pre.inc but should
+ have changed this one instead.
+
+2003-03-26 09:09 rockyb
+
+ * debugger/tests/: list.cmd, list.right: Add test of filename
+ canonicalization
+
+2003-03-26 09:05 rockyb
+
+ * debugger/: dbg-file.inc, dbg-io.inc: Add routine to resolve based
+ on dir and then expand a filename. Hopefully will be more
+ permissive in specified and work more like gdb.
+
+2003-03-26 09:01 rockyb
+
+ * debugger/dbg-brk.inc: Expand filename only the breakpoint exists.
+
+2003-03-25 23:30 rockyb
+
+ * debugger/dbg-list.inc: When set annotate=1 expand full filenames
+ when listing source lines.
+
+2003-03-25 23:29 rockyb
+
+ * debugger/dbg-file.inc: Bug in testing absolute file name.
+
+2003-03-25 18:46 rockyb
+
+ * debugger/: dbg-brk.inc, dbg-file.inc, dbg-list.inc,
+ tests/brkpt3.cmd, tests/brkpt3.right, tests/list.right:
+ Canonicalize filenames in list and breakpoint commands and update
+ regression tests to make sure we don't slip back.
+
+2003-03-21 19:16 rockyb
+
+ * debugger/: dbg-file.inc, dbg-set.inc: Small stuff.
+
+2003-03-21 18:54 rockyb
+
+ * debugger/: bashdb, dbg-brk.inc, dbg-file.inc, dbg-fns.inc,
+ dbg-help.inc, dbg-init.inc, dbg-set.inc, tests/brkpt2.right,
+ tests/debug.right, tests/finish.right, tests/parm.right,
+ tests/sig.right, tests/tbreak.right: Add "show dir" and directory
+ search in filename lookup (such as for breakpoints or line
+ listing).
+
+2003-03-21 12:59 rockyb
+
+ * debugger/: dbg-sig.inc, tests/sig.right: Signal received message
+ is now gdb's. This simplifies ddd handling.
+
+2003-03-21 12:56 rockyb
+
+ * debugger/TODO: Current sitiation.
+
+2003-03-02 13:52 rockyb
+
+ * debugger/ddd/ddd-3.3.1-bashdb.diff: Spelled g++ option
+ incorrectly!
+
+2003-02-27 05:14 rockyb
+
+ * debugger/: dbg-brk.inc, dbg-file.inc, dbg-fns.inc, dbg-help.inc,
+ dbg-io.inc: _filenames -> _Dbg_filenames. Array now has expanded
+ name Add routine to print filename in form appropriate to
+ annotation and basename only
+
+2003-02-27 02:33 rockyb
+
+ * debugger/NEWS, doc/bashdb.texi, tests/dbg-fns,
+ tests/dbg-is-fn.right, tests/dbg-is-fn.tests: _bashdb_ -> _Dbg_
+
+2003-02-27 02:27 rockyb
+
+ * debugger/: bashdb, dbg-brk.inc, dbg-cmds.inc, dbg-file.inc,
+ dbg-fns.inc, dbg-help.inc, dbg-hist.inc, dbg-init.inc, dbg-io.inc,
+ dbg-list.inc, dbg-main.inc, dbg-pre.inc.in, dbg-set-d-vars.inc,
+ dbg-set.inc, dbg-sig-ret.inc, dbg-sig.inc, dbg-stack.inc,
+ tests/bugIFS.cmd, tests/misc.cmd, tests/misc.right,
+ tests/sig.right: All _bashdb_ variables renamed _Dbg_. Might help
+ for debuggers in other POSIX shells.
+
+2003-02-26 23:34 rockyb
+
+ * debugger/: NEWS, dbg-help.inc, dbg-init.inc, dbg-set.inc,
+ tests/misc.cmd, tests/misc.right: Add "set annotate." More better
+ set/show regression tests.
+
+2003-02-25 11:22 rockyb
+
+ * debugger/: dbg-brk.inc, tests/brkpt2.right, tests/watch1.right: A
+ little closer to gdb. Mesage reads breakpoint already hit 1 time
+ or breakpoint already hit n times
+
+2003-02-25 10:55 rockyb
+
+ * debugger/: dbg-brk.inc, tests/action.right, tests/brkpt1.right,
+ tests/brkpt2.right, tests/brkpt3.right, tests/bugIFS.right,
+ tests/debug.right, tests/display.right, tests/finish.right,
+ tests/parm.right, tests/tbreak.right, tests/watch1.right,
+ tests/watch2.right: Make breakpoints look more like gdb. It helps
+ ddd parsing.
+
+2003-02-24 22:21 rockyb
+
+ * doc/bashdb.texi: Clarify use of -L option.
+
+2003-02-23 15:40 rockyb
+
+ * debugger/dbg-file.inc: Add tilde to list of translation
+ characters.
+
+2003-02-19 18:45 rockyb
+
+ * debugger/dbg-brk.inc, debugger/dbg-cmds.inc, debugger/dbg-io.inc,
+ debugger/dbg-sig.inc, doc/bashdb.texi: Some declare -a's turned
+ into typeset -a on the hope (from David Korn) that this will be
+ legal ksh.
+
+2003-02-17 19:23 rockyb
+
+ * debugger/.cvsignore: bashdb- -> dbg-
+
+2003-02-17 19:23 rockyb
+
+ * MANIFEST, configure.in, debugger/Makefile.am,
+ debugger/bashdb-sig-ret.inc, debugger/dbg-sig-ret.inc:
+ Miscellaneous small changes for new version and bashdb- -> dbg-
+ changes.
+
+2003-02-17 19:09 rockyb
+
+ * tests/dbg-is-fn.tests: bashdb- -> dbg- change
+
+2003-02-17 19:02 rockyb
+
+ * debugger/: Makefile.am, TODO, bashdb, bashdb-brk.inc,
+ bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc, bashdb-help.inc,
+ bashdb-hist.inc, bashdb-init.inc, bashdb-io.inc, bashdb-list.inc,
+ bashdb-main.inc, bashdb-set-d-vars.inc, bashdb-set.inc,
+ bashdb-sig.inc, bashdb-stack.inc, dbg-brk.inc, dbg-cmds.inc,
+ dbg-file.inc, dbg-fns.inc, dbg-help.inc, dbg-hist.inc,
+ dbg-init.inc, dbg-io.inc, dbg-list.inc, dbg-main.inc, dbg-pre.inc,
+ dbg-set-d-vars.inc, dbg-set.inc, dbg-sig.inc, dbg-stack.inc,
+ tests/sig.right, bashdb-pre.inc.in, dbg-pre.inc, dbg-pre.inc.in:
+ bashdb -> dbg to facilitate porting to other POSIX shells.
+
+2003-02-17 17:01 rockyb
+
+ * MANIFEST, execute_cmd.c, subst.c, trap.c, trap.h,
+ debugger/bashdb-fns.inc, support/mksignames.c,
+ tests/dbg-support.right, tests/dbg-support.tests,
+ tests/errors.right: Remove SUBEXIT trap.
+
+2003-02-17 17:00 rockyb
+
+ * doc/bashdb.texi: Decscribe "print" command a little better. Also,
+ it's 2003.
+
+2003-02-17 16:18 rockyb
+
+ * builtins/source.def: Small doc fix to mention optional ARGUMENTS.
+ Thanks to Chet Ramey for pointing this out.
+
+2003-02-17 13:15 rockyb
+
+ * debugger/: bashdb-brk.inc, tests/brkpt3.cmd, tests/brkpt3.right,
+ tests/tbreak.cmd, tests/tbreak.right: I think I've gotten over the
+ hurdle of passing information back. Removing breakpoints in a
+ subshell and having that persist now works.
+
+2003-02-17 07:34 rockyb
+
+ * debugger/bashdb-brk.inc: Perhaps some cleanup.
+
+2003-02-17 06:51 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
+ bashdb-sig.inc, tests/brkpt3.cmd, tests/brkpt3.right,
+ tests/sig.right, tests/subshell3.right: State saving bugs: save
+ state of more breakpoint/action variables, step/next variables.
+
+2003-02-16 20:08 rockyb
+
+ * debugger/: NEWS, bashdb-brk.inc, bashdb-file.inc, bashdb-sig.inc:
+ Probably just beating around problems. Perhaps closer. Perhaps not.
+
+2003-02-16 20:05 rockyb
+
+ * debugger/tests/: Makefile.am, brkpt3.cmd, brkpt3.right,
+ brkpt3.tests, run-brkpt, run-brkpt2, run-subshell, sig.right,
+ subshell1.cmd, subshell1.right, subshell2.cmd, subshell2.right,
+ subshell3.cmd, subshell3.right, subshell4.cmd, subshell4.right,
+ subshell4.tests: run-brkpt and run-subshell does all 1.. tests.
+ Add another subshell and brkpt test.
+
+2003-02-16 12:18 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
+ bashdb-fns.inc, bashdb-sig.inc: More state recorded in subshell
+ journal: Enable/disable fntrace options
+
+ having breakpoints persist inside a subshell now works. (Removing
+ has problems though, as does saving/restoring the step counter)
+
+2003-02-16 12:14 rockyb
+
+ * MANIFEST, debugger/tests/subshell2.right: multi->subshell
+
+2003-02-16 12:13 rockyb
+
+ * debugger/tests/: Makefile.am, multi.sh, multi1.cmd, multi1.right,
+ multi1.tests, multi2.cmd, multi2.right, multi2.tests, multi3.cmd,
+ multi3.right, multi3.tests, run-subshell, sig.right, subshell.sh,
+ subshell1.cmd, subshell1.right, subshell1.tests, subshell2.cmd,
+ subshell2.tests, subshell3.cmd, subshell3.right, subshell3.tests,
+ subshell4.cmd, subshell4.right: multi -> subshell
+
+2003-02-16 08:34 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-file.inc, bashdb-fns.inc,
+ bashdb-sig.inc, tests/multi4.right: Back to the future. Back to a
+ single journal file. Can't get SUBEXIT working and this seems to be
+ more reliable (albeit more work/slower).
+
+2003-02-14 19:04 rockyb
+
+ * MANIFEST, debugger/tests/sig.right: Small changes.
+
+2003-02-14 18:49 rockyb
+
+ * debugger/tests/: multi4.cmd, multi4.right, multi4.tests: Add
+ another multi test for quit 0 n.
+
+2003-02-14 18:47 rockyb
+
+ * debugger/: NEWS, TODO, bashdb-sig.inc, tests/multi3.cmd,
+ tests/run-multi: Bug in quit 0 n.
+
+2003-02-14 18:38 rockyb
+
+ * debugger/CHANGES: Note BASH_SUBSHELL. Some typographical mistakes
+ corrected.
+
+2003-02-14 18:33 rockyb
+
+ * execute_cmd.c, subst.c, trap.c, trap.h, builtins/caller.def,
+ doc/bashref.texi, support/mksignames.c, tests/dbg-support.right,
+ tests/dbg-support.tests: Bug: caller() now works like it is
+ supposed to. It had mismatched fn/lineno/source levels. It also now
+ returns null if no caller.
+
+ Add SUBEXIT trap to perform action when a subshell is exited.
+
+2003-02-14 18:31 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2003-02-14 18:25 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
+ bashdb-set-d-vars.inc, bashdb-sig.inc: Better journal mechanism:
+ Now have journal per subshell. (Journal is used to pass information
+ between subshell and parent)
+
+ There were escaping bugs in putting history entries into the
+ journal and retrieving them.
+
+ Debugger "Print" now works like quote does. We were having
+ substituion problems before, e.g. "This can't happen" (the single
+ quote in the string).
+
+ bashdb-fns.inc: New fn _bashdb_esq_dq. Save last_xxx state even if
+ we don't enter the debugger.
+
+2003-02-14 18:16 rockyb
+
+ * debugger/tests/: action.cmd, brkpt1.cmd, brkpt1.right,
+ brkpt2.cmd, brkpt2.right, display.cmd, finish.cmd, finish.right,
+ list.cmd, misc.cmd, misc.right, multi3.cmd, multi3.right, parm.cmd,
+ run-multi, search.cmd, search.right, sig.cmd, sig.right, skip.cmd,
+ skip.right, tbreak.cmd, tbreak.right, watch1.cmd, watch1.right:
+ Print now expands * so add quotes around. Some small
+ regularizations. multi: quit 0 2 now works so note that.a
+
+2003-02-13 15:22 rockyb
+
+ * print_cmd.c: "\n" snuck in on last change in
+ print_case_command_head.
+
+2003-02-12 19:55 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
+ bashdb-fns.inc, bashdb-help.inc, bashdb-hist.inc, bashdb-init.inc,
+ bashdb-io.inc, bashdb-list.inc, bashdb-main.inc, bashdb-set.inc,
+ bashdb-sig.inc, bashdb-stack.inc: Try to make more ksh-93
+ compatible.
+
+ declare -> typeset (except when using declare -p or declare -a).
+ source -> .
+
+2003-02-12 01:47 rockyb
+
+ * debugger/bashdb: Small changes to make a little more consistent
+ with ksh93
+
+2002-12-31 23:25 rockyb
+
+ * debugger/bashdb-pre.inc.in: Comment more.
+
+2002-12-31 23:17 rockyb
+
+ * debugger/bashdb-file.inc: Add % to list of translated file
+ characters.
+
+2002-12-31 23:12 rockyb
+
+ * debugger/bashdb-fns.inc: [no log message]
+
+2002-12-31 11:57 rockyb
+
+ * debugger/: bashdb-fns.inc, bashdb-list.inc, bashdb-sig.inc: Make
+ all bashdb functions begin _bashdb - were were missing a couple of
+ routines.
+
+2002-12-30 23:23 rockyb
+
+ * debugger/NEWS: [no log message]
+
+2002-12-30 23:20 rockyb
+
+ * debugger/bashdb-file.inc: Add + to list of translated file2var
+ characters.
+
+2002-12-29 05:08 masata-y
+
+ * doc/bashdb.texi: Added my name again.
+
+2002-12-25 10:30 rockyb
+
+ * debugger/bashdb-cmds.inc: More state saved.
+
+2002-12-25 10:20 rockyb
+
+ * debugger/NEWS: Recent stuff.
+
+2002-12-25 10:18 rockyb
+
+ * debugger/: TODO, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-file.inc, bashdb-hist.inc, bashdb-set.inc, bashdb-sig.inc,
+ tests/misc.right, tests/multi3.cmd, tests/multi3.right,
+ tests/run-multi, tests/sig.right: Start the tedious task of having
+ a mechanism for setting variables that in a subshell so that its
+ value appears in its parent shell.
+
+2002-12-25 00:01 rockyb
+
+ * debugger/TODO: [no log message]
+
+2002-12-24 23:14 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc: Fix setting
+ breakpoints over restart. Needed to save the _brkpt_filevar and
+ _action_filevar arrays as well as _brkpt_count and _brkpt_cond
+ arrays.
+
+ If we are in a subshell, we need to save BASHB_RESTART_FILE so it
+ will get set in sup-shells.
+
+2002-12-24 22:13 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-12-24 22:13 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-file.inc, bashdb-sig.inc:
+ Bug/Feature fix: Restart now quits all subshells before issuing its
+ restart (exec) command.
+
+2002-12-20 21:31 rockyb
+
+ * debugger/bashdb-fns.inc: Small typo.
+
+2002-12-20 13:13 rockyb
+
+ * debugger/tests/Makefile.am: Add run-bugIFS.
+
+2002-12-20 12:22 rockyb
+
+ * debugger/TODO: Update.
+
+2002-12-20 12:17 rockyb
+
+ * debugger/NEWS: - Bug: if IFS set character in filename: the
+ filename would be truncated. Handle IFS save/restore more
+ pervasively by saving on DEBUG handler entry.
+
+2002-12-20 12:13 rockyb
+
+ * MANIFEST: Add bug-IFS tests.
+
+2002-12-20 12:12 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc: Save and restore IFS
+ on debug signal handler. It means we can remove custom
+ save/restores elsewhere in the code.
+
+2002-12-20 12:11 rockyb
+
+ * debugger/tests/: bugIFS, bugIFS.cmd, bugIFS.right, bugIFS.sh,
+ bugIFS.tests, run-bugIFS: Regression test of recent bug when not
+ setting IFS on signal entry.
+
+2002-12-20 12:09 rockyb
+
+ * debugger/tests/sig.right: Update for IFS bug fix.
+
+2002-12-10 04:45 rockyb
+
+ * debugger/bashdb-brk.inc: More bash-oriented way to strip off a
+ suffix.
+
+2002-12-10 01:45 rockyb
+
+ * execute_cmd.c, subst.c: Let BASH_SUBSHELL catch more cases. In
+ particular, command substitution.
+
+2002-12-10 01:44 rockyb
+
+ * doc/bashdb.texi: Even more on quit/return.
+
+2002-12-10 01:28 rockyb
+
+ * doc/bashdb.texi: More on how quit and return are similar and
+ different.
+
+2002-12-10 01:06 rockyb
+
+ * doc/bashref.texi: Spelling mistake.
+
+2002-12-10 01:05 rockyb
+
+ * debugger/emacs/gud.el: Eval expression command is "x" not "pe"
+
+2002-12-10 01:04 rockyb
+
+ * debugger/TODO: [no log message]
+
+2002-12-09 08:16 rockyb
+
+ * MANIFEST, execute_cmd.c, externs.h, print_cmd.c,
+ debugger/CHANGES: "set -x" now show "for", "case" and "select"
+ headers ( "for x in", "case c in", "select s")
+
+2002-12-09 08:12 rockyb
+
+ * tests/: run-set-x, set-x.right, set-x.tests: Add "set -x" tests
+
+2002-12-09 07:13 rockyb
+
+ * debugger/tests/version: not needed?
+
+2002-12-08 01:26 rockyb
+
+ * doc/bashdb.texi: Note DDD and GNU Emacs frontents in sample
+ session.
+
+2002-12-08 01:21 rockyb
+
+ * doc/bashdb.texi: Another example mistake. "pe" doesn't exist any
+ more. We use "x".
+
+2002-12-08 01:17 rockyb
+
+ * doc/bashdb.texi: Output "echo 1" in wrong place.
+
+2002-12-08 00:58 rockyb
+
+ * htdocs/index.html: Add screenshot for ddd.
+
+2002-12-08 00:54 rockyb
+
+ * htdocs/bashdb-ddd.png: Show an example that is less obviously
+ buggy!
+
+2002-12-08 00:38 rockyb
+
+ * htdocs/bashdb-ddd.png: Screenshot in DDD.
+
+2002-12-07 23:21 rockyb
+
+ * doc/bashdb.texi: Correct sample session a bit. It really needs
+ more work
+
+2002-12-07 22:44 rockyb
+
+ * ChangeLog: [no log message]
+
+2002-12-07 22:43 rockyb
+
+ * MANIFEST: Add Changelog.
+
+2002-12-07 22:42 rockyb
+
+ * configure.in, debugger/ChangeLog, debugger/NEWS: Get ready for
+ yet another release.
+
+2002-12-07 22:11 rockyb
+
+ * doc/bashdb.texi: Small typos
+
+2002-12-07 21:59 rockyb
+
+ * doc/bashdb.texi: Revise "restart" command to reflect current
+ state. Document BASHDB_RESTART_FILE and other BASHDB_ and BASH_
+ variables.
+
+2002-12-07 16:54 rockyb
+
+ * debugger/ChangeLog: [no log message]
+
+2002-12-07 16:49 rockyb
+
+ * debugger/bashdb-main.inc: Make sure we can read the restart file.
+
+2002-12-07 16:48 rockyb
+
+ * debugger/bashdb-cmds.inc: Forgot to unset flag which says to
+ reread the file.
+
+2002-12-07 16:43 rockyb
+
+ * debugger/: ChangeLog, bashdb, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-main.inc, tests/brkpt2.right, tests/debug.right,
+ tests/finish.right, tests/parm.right, tests/sig.right: Preserve
+ breakpoints, watchpoints, debugger set variables on a restart.
+
+2002-12-07 16:41 rockyb
+
+ * debugger/Makefile.am: Remove compile of bashdb.elc. It's going
+ away anyway.
+
+2002-12-07 10:24 rockyb
+
+ * debugger/NEWS: As appropriate.
+
+2002-12-07 10:23 rockyb
+
+ * execute_cmd.c, externs.h, print_cmd.c, debugger/ChangeLog: print
+ select head - "select s in"
+
+2002-12-07 08:35 rockyb
+
+ * debugger/bashdb-io.inc: [no log message]
+
+2002-12-07 08:18 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-12-07 08:16 rockyb
+
+ * debugger/bashdb-io.inc: bashdb-io.inc (_bashdb_readlin): - When
+ reading large files which takes a long time, print out status every
+ 1000 lines.
+
+2002-12-07 08:02 rockyb
+
+ * MANIFEST, parse.y, debugger/NEWS, tests/heredoc.right,
+ tests/heredoc.tests, tests/run-heredoc: Bug: (parse.y) line number
+ was not updated properly when in a here documented with an unquoted
+ delimter and containing backslash newline.
+
+ Update and modernize tests and make executable.
+
+2002-12-06 22:57 rockyb
+
+ * tests/dbg-multicmd.right: A tad more correct than the preview
+ "right" check.
+
+2002-12-06 22:51 rockyb
+
+ * bashline.c, subst.c, lib/readline/bind.c,
+ lib/readline/readline.c: Add Official bash 2.05b patches
+
+2002-12-06 22:49 rockyb
+
+ * print_cmd.c: Add routines to print for and case headers "for i
+ in" or "case c in".
+
+2002-12-06 22:48 rockyb
+
+ * externs.h: Add definitions for print_for_head and
+ print_case_head.
+
+2002-12-06 22:48 rockyb
+
+ * execute_cmd.c: set BASH_COMMAND to for_head (for i in xxx) and
+ case_head (case c in).
+
+2002-12-06 22:47 rockyb
+
+ * debugger/bashdb-sig-ret.inc: Not used, but it if it were, this
+ would be right. Need to save/restore IFS around a "set -"
+
+2002-12-06 22:44 rockyb
+
+ * debugger/bashdb-list.inc: Typo.
+
+2002-12-06 22:43 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-12-06 11:27 rockyb
+
+ * debugger/emacs/: gud.el, gud.el.diff: A typo. Also modified DB
+ when I meant to modify bashdb.
+
+2002-12-03 19:46 rockyb
+
+ * debugger/bashdb-help.inc: Typo.
+
+2002-12-03 19:34 rockyb
+
+ * debugger/bashdb-fns.inc: Remove previous variable test. Not
+ needed?
+
+2002-12-03 19:24 rockyb
+
+ * debugger/bashdb-fns.inc: Bug in set was set of IFS messing up
+ "set" parsing. This time for sure!?
+
+2002-12-03 18:36 rockyb
+
+ * debugger/bashdb-fns.inc: More precise function comment.
+
+2002-12-03 18:34 rockyb
+
+ * debugger/bashdb-fns.inc: Bug: if _bashdb_old_set_opts was null.
+ Test now.
+
+2002-12-02 09:42 rockyb
+
+ * doc/bashdb.texi: Document set showcommand
+
+2002-12-02 08:20 rockyb
+
+ * debugger/TODO: Update as appropriate.
+
+2002-12-02 06:58 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-12-02 06:48 rockyb
+
+ * MANIFEST: MANIFEST: add debugger multi tests version.texi.in: new
+ version of manuals.
+
+2002-12-02 06:42 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-file.inc, bashdb-init.inc:
+ bashdb-file.inc: source persistent only if it exists.
+ bashdb-init.inc/bashdb-cmds.inc: read persistent, write persistent.
+
+2002-12-02 06:41 rockyb
+
+ * debugger/bashdb-help.inc: Update doc for "x/examine"
+
+2002-12-02 06:41 rockyb
+
+ * debugger/bashdb-sig.inc: Hack (but works more often) cleanup of
+ persistent file.
+
+2002-12-02 06:40 rockyb
+
+ * debugger/: CHANGES, NEWS, TODO: As appropriate.
+
+2002-12-02 06:39 rockyb
+
+ * debugger/tests/: Makefile.am, run-misc, run-sig: Makefile.am: add
+ run-multi run-sig: line number changes run-misc: bad testing of
+ return codes. Wasn't doing second test.
+
+2002-12-02 05:50 rockyb
+
+ * doc/bashdb.texi: Document quit command. Has been put in command
+ reference and cross-referenced with return. Subshell parenthesis
+ noted.
+
+ Some typos corrected. Help listing updated.
+
+2002-12-02 05:15 rockyb
+
+ * doc/.cvsignore: Add bashdb.tmp
+
+2002-12-02 05:14 rockyb
+
+ * doc/: bashref.texi, version.texi.in: Update for this version.
+
+2002-12-02 04:55 rockyb
+
+ * doc/version.texi.in: Typo
+
+2002-12-02 04:54 rockyb
+
+ * configure.in: Time for another release.
+
+2002-12-02 04:53 rockyb
+
+ * doc/bashref.texi: Update CHANGES - include BASH_SUBSHELL for
+ example.
+
+2002-12-02 04:32 rockyb
+
+ * debugger/CHANGES: Update as appropriate.
+
+2002-12-01 16:26 rockyb
+
+ * debugger/tests/: multi3.cmd, multi3.tests: Regression test for
+ multi-statement lines and quit multiple levels
+
+2002-12-01 16:24 rockyb
+
+ * debugger/tests/: misc.right, multi.sh, multi1.cmd, multi1.right,
+ multi1.tests, multi2.cmd, multi2.right, multi2.tests, multi3.right,
+ run-multi, sig.right: Regression tests for multi-statement lines
+ and new quit command.
+
+2002-11-30 19:34 rockyb
+
+ * debugger/tests/misc.right: Was checking buggy history command.
+
+2002-11-30 19:13 rockyb
+
+ * debugger/bashdb-hist.inc: Typo.. "H count" was broken.
+
+2002-11-30 01:16 masata-y
+
+ * debugger/bashdb: Fix a typo.
+
+2002-11-26 10:47 rockyb
+
+ * debugger/: bashdb-init.inc, bashdb-set-d-vars.inc: More elegant
+ (and I wonder if not more robust) way to set $1 via set. Use "set
+ -- xx yy" rather than "set xx yy"
+
+2002-11-26 07:24 rockyb
+
+ * MANIFEST: Add README, add examples/bashdb/bashdb.el
+
+2002-11-26 07:23 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-11-26 07:20 rockyb
+
+ * examples/bashdb/: README, bashdb.el: Remove bashdb.el as it is
+ likely to cause confusion. Set expectations for the code in this
+ directory.
+
+2002-11-26 07:09 rockyb
+
+ * debugger/emacs/gud.el.diff: Set default minibuf-mod-map in bashdb
+ read call from Masatake YAMATO and add link to
+ http://bashdb.sourceforge.net
+
+2002-11-26 07:04 rockyb
+
+ * debugger/emacs/gud.el: Add HTTP reference.
+
+2002-11-26 06:34 rockyb
+
+ * debugger/emacs/gud.el: Change from Masatake YAMATO in running
+ bash initially. Uses gud-minibuffer-local-map now.
+
+2002-11-23 00:17 rockyb
+
+ * debugger/bashdb-sig.inc: Don't wipe temp files unless subshell is
+ 0. Likewise don't enter command shell if subshell is not 0. Don't
+ know that this will make much difference, but I guess it's the
+ right thing to do.
+
+2002-11-23 00:15 rockyb
+
+ * debugger/tests/misc.right: Output changed because of "set
+ showcommand"
+
+2002-11-22 22:02 rockyb
+
+ * debugger/bashdb-help.inc: Document help "set showcommand"
+
+2002-11-22 21:50 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-11-22 21:50 rockyb
+
+ * debugger/bashdb-init.inc: Bug: if no script we were running "set"
+ to dump environment.
+
+2002-11-22 20:57 rockyb
+
+ * execute_cmd.c, variables.c, debugger/bashdb-cmds.inc,
+ debugger/bashdb-list.inc, debugger/bashdb-set.inc,
+ debugger/emacs/bashdb.el, debugger/emacs/gud.el,
+ debugger/tests/sig.right, doc/bashref.texi: We now keep track of
+ the subshell level: dynamic veriable BASH_SUBSHELL and the debugger
+ prints these as ()'s inside of the prompt.
+
+2002-11-21 00:44 rockyb
+
+ * debugger/ddd/ddd-3.3.1-bashdb.diff: Display bash variables of the
+ form ${foo} or even ${foo[bar]##/*} now.
+
+2002-11-20 12:00 rockyb
+
+ * debugger/TODO: Current state of things and known bugs.
+
+2002-11-20 10:11 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-11-20 10:09 rockyb
+
+ * support/Makefile.in: Remove man2html objects and actually all
+ objects.
+
+2002-11-20 10:00 rockyb
+
+ * support/.cvsignore: Add man2html binary
+
+2002-11-20 09:59 rockyb
+
+ * support/man2html: This is an OS-specific *binary*
+
+2002-11-20 09:55 rockyb
+
+ * debugger/bashdb-init.inc: "bash --debugger script args" was not
+ setting args properly.
+
+2002-11-19 23:42 rockyb
+
+ * doc/Makefile.in: Failiers in this directory aren't important.
+
+2002-11-19 23:31 rockyb
+
+ * debugger/tests/sig.right: Output chagned yet again.
+
+2002-11-19 23:03 rockyb
+
+ * debugger/tests/debug.right: Change to have it work with different
+ paths. Use basename setting.
+
+2002-11-19 23:02 rockyb
+
+ * debugger/bashdb-cmds.inc: Changes to have regression tests work
+ with different paths.
+
+2002-11-19 22:27 rockyb
+
+ * debugger/tests/run-sig: Typo.
+
+2002-11-19 22:22 rockyb
+
+ * debugger/tests/sig.right: [no log message]
+
+2002-11-19 22:20 rockyb
+
+ * debugger/tests/: brkpt2.right, debug.right, finish.right,
+ parm.right: Shortend bashdb.
+
+2002-11-19 22:17 rockyb
+
+ * debugger/bashdb: We have a better expand_fn now if we need it.
+
+2002-11-19 21:44 rockyb
+
+ * debugger/Makefile.am: This is a pain. Get date and autoregen
+ right on bashdb-pre.inc.
+
+2002-11-19 21:41 rockyb
+
+ * doc/Makefile.in: No really!
+
+2002-11-19 21:39 rockyb
+
+ * doc/Makefile.in: This time, for sure!
+
+2002-11-19 21:37 rockyb
+
+ * debugger/tests/misc.right: Made more like GDB output for ddd.
+
+2002-11-19 21:26 rockyb
+
+ * MANIFEST, configure.in, debugger/TODO, doc/Makefile.in: Mostly
+ hacks to make a distribution work smoothly. MANIFEST: add DVI's.
+ This reduce TeX dependency, okay? TODO: document bugs configure.in
+ touch files so that we have right the first time.
+
+2002-11-19 20:27 rockyb
+
+ * configure.in: Remove touch in output. Is now handled in
+ Makefiles.
+
+2002-11-19 20:26 rockyb
+
+ * debugger/bashdb-cmds.inc: Variable name typo. When rerunning,
+ show full command now. Is messing up a bit too much.
+
+2002-11-19 20:25 rockyb
+
+ * debugger/bashdb-set.inc: Update help.
+
+2002-11-19 20:21 rockyb
+
+ * debugger/bashdb: Remove readonly attributes because when we run
+ as a subshell these want to get set again. May have to rethink how
+ to do.
+
+2002-11-19 20:20 rockyb
+
+ * doc/Makefile.in: Put touch of version.texi to avoid redoing
+ unnecessary work and force users to have TeX installed.
+
+2002-11-19 20:20 rockyb
+
+ * debugger/Makefile.am: Put touch inside build of bashd-pre.inc to
+ avoid redoing work.
+
+2002-11-19 20:19 rockyb
+
+ * debugger/bashdb-help.inc: Add set documentation. Put messages in
+ a form that DDD will understand without any hassle.
+
+2002-11-19 16:03 rockyb
+
+ * tests/dbg-multicmd.right: Added case tests.
+
+2002-11-19 16:02 rockyb
+
+ * MANIFEST: Add newest member of debugger bashdb-file.inc.
+
+2002-11-19 16:01 rockyb
+
+ * debugger/NEWS: Update as appropriate. Gee there are lots of
+ changes, mostly bug fixes.
+
+2002-11-19 15:55 rockyb
+
+ * tests/: trap.right, trap.tests: Remove SIGCHILD in trap list
+ since FreeBSD lists in another order.
+
+2002-11-19 15:52 rockyb
+
+ * tests/: dbg-multicmd.right, dbg-multicmd.tests, run-dbg-multicmd:
+ New regression test to check BASH_COMMAND.
+
+2002-11-19 15:47 rockyb
+
+ * execute_cmd.c: Preserve line number selector, i.e. the "foo, bar,
+ baz" of in "case foo, bar baz in ..."
+
+2002-11-19 15:32 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-io.inc, bashdb-main.inc: Canonicalize
+ filevars via a file expand routine. Allows multpile to refer to a
+ given file.
+
+ Add option to have files show only short (basename) names, useful
+ in testing
+
+ Add set/show of these.
+
+ Bug in not setting fntrace correctly on debugger exit.
+
+ Add -c option on bashdb. Analogous to "bash -c string"
+
+2002-11-19 15:28 rockyb
+
+ * debugger/tests/: brkpt2.cmd, brkpt2.right, misc.right, parm.cmd,
+ parm.right: *.cmd: added a couple of info files to check that we
+ read in files only once. misc: added "set/show debugger and
+ basename" *.right: corresponding new output
+
+2002-11-19 15:16 rockyb
+
+ * debugger/: bashdb-help.inc, bashdb-set.inc: Add set/show options
+ to debug debugger and have filenames get listed as basename only.
+
+2002-11-19 15:15 rockyb
+
+ * debugger/: Makefile.am, bashdb-file.inc: Break out more routines
+ into bashdb-file.inc. Add _bashdb_expand_filename to canonicalize
+ file names.
+
+2002-11-19 10:40 rockyb
+
+ * debugger/tests/sig.right: Numbers keep changing...
+
+2002-11-19 10:36 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, tests/brkpt2.right:
+ Fix bug in continue comand. Moved code from bashdb-brk.inc to
+ bashdb-cmds.inc
+
+2002-11-19 03:07 rockyb
+
+ * configure.in: Remove AC_CONFIG_HEADER of non-h files since it
+ munges first line. Boooooo! Setting time back now with touch.
+
+2002-11-19 03:03 rockyb
+
+ * debugger/tests/: brkpt2.cmd, brkpt2.right: Small change to make
+ regression test work on FreeBSD.
+
+2002-11-19 02:58 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-init.inc, bashdb-list.inc,
+ bashdb-pre.inc.in: Use common routines now. Spelled "Bourne"
+ incorrectly in bashdb-{pre,init}.inc
+
+2002-11-19 02:57 rockyb
+
+ * debugger/tests/brkpt1.right: some output changed: linespecs
+ aren't necessarily lines. Erroneously "break" instead of "clear" as
+ a result of cut-and-paste.
+
+2002-11-19 02:55 rockyb
+
+ * debugger/bashdb-fns.inc: Add common routines _bashdb_check_line
+ and _bashdb_get_maxline. Reduces code bulk while making things
+ more reliable. _get_maxline now reads in the file if it hasn't been
+ read in yet.
+
+2002-11-19 02:53 rockyb
+
+ * debugger/bashdb-io.inc: Test to see if file exists before
+ reading. We could probably do better, but will need more code
+ reorganization for this.
+
+2002-11-18 22:59 rockyb
+
+ * configure.in: Take care by using AC_CONFIG_HEADERS not to update
+ a release file if it doesn't need updating. This allows the
+ maintainer/distributor to create a DVI and have it not get
+ recreated if that's not needed. In this way users are not forced
+ say to have TeX installed.
+
+2002-11-18 22:15 rockyb
+
+ * debugger/tests/brkpt1.right: Ditto.
+
+2002-11-18 22:14 rockyb
+
+ * debugger/bashdb-brk.inc: A little closer for FreeBSD...
+
+2002-11-18 22:08 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-stack.inc, tests/brkpt1.right,
+ tests/brkpt2.right, tests/debug.right, tests/finish.right,
+ tests/parm.right, tests/sig.right: Even closer to getting FreeBSD
+ regression tests work okay.
+
+2002-11-18 21:50 rockyb
+
+ * debugger/: bashdb-list.inc, tests/list.right: More changes to
+ make FreeBSD regression tests work out -- more to come...
+
+2002-11-18 21:44 rockyb
+
+ * debugger/tests/: brkpt2.right, dbg-test1.sub, watch2.right: More
+ changes to make FreeBSD regression tests work.
+
+2002-11-18 21:31 rockyb
+
+ * debugger/: bashdb, bashdb-brk.inc, bashdb-init.inc,
+ bashdb-list.inc, bashdb-stack.inc, tests/action.right,
+ tests/action.tests, tests/brkpt1.right, tests/brkpt1.tests,
+ tests/brkpt2.right, tests/brkpt2.tests, tests/debug.right,
+ tests/debug.tests, tests/display.right, tests/display.tests,
+ tests/finish.right, tests/finish.tests, tests/list.right,
+ tests/list.tests, tests/misc.right, tests/misc.tests,
+ tests/parm.right, tests/parm.tests, tests/search.right,
+ tests/search.tests, tests/sig.right, tests/sig.tests,
+ tests/skip.right, tests/skip.tests, tests/tbreak.right,
+ tests/tbreak.tests, tests/watch1.right, tests/watch1.tests,
+ tests/watch2.right, tests/watch2.tests: Add -B option to list only
+ basename in debugger output. Is useful for FreeBSD which list files
+ as foo rather than ./foo.
+
+2002-11-18 19:42 rockyb
+
+ * MANIFEST, configure.in: Get ready for version 0.33. Derived files
+ have been shuffled around. I think though the overall organization
+ is a tad better.
+
+2002-11-18 19:40 rockyb
+
+ * debugger/: .cvsignore, bashdb-pre.inc.in: Release information
+ included via bashdb-pre.inc (via bashdb-pre.inc.in)
+
+2002-11-18 19:38 rockyb
+
+ * doc/: .cvsignore, Makefile.in, bashdb.texi, bashdb.texi.in,
+ bashref.texi, version.texi.in: Add release information
+ automatically via version.texi include file.
+
+2002-11-18 19:36 rockyb
+
+ * debugger/: Makefile.am, NEWS, bashdb, bashdb-init.inc,
+ bashdb-init.inc.in, bashdb.in, tests/brkpt2.right,
+ tests/debug.right, tests/finish.right, tests/misc-output.right,
+ tests/parm.right, tests/sig.right: Add release information via new
+ file bashdb-pre.in rather than modify bashdb-init.inc and bashdb
+
+2002-11-18 09:32 rockyb
+
+ * debugger/NEWS: typo
+
+2002-11-18 09:30 rockyb
+
+ * debugger/NEWS: Note configure script bug fix.
+
+2002-11-18 08:59 rockyb
+
+ * configure.in: Bug: remove --with-debugger-start-file since this
+ isn't a "package." Instead we set via variable DEBUGGER_START_FILE.
+ Thanks to c_thomps@ecolinux.no-ip.com for reporting the problem!
+
+ Clean up a little, version and release numbers are now set in one
+ place.
+
+2002-11-18 08:57 rockyb
+
+ * debugger/configure.in: Clean up a little.
+
+2002-11-17 20:36 rockyb
+
+ * Makefile.in: Add doc to list of things in all made. I *think*
+ this is correct...
+
+2002-11-17 20:26 rockyb
+
+ * MANIFEST, configure.in, debugger/Makefile.am, doc/Makefile.in,
+ doc/bashref.texi: Changes to make .in targets get recreated.
+
+2002-11-17 20:23 rockyb
+
+ * doc/bashdb.texi: Is now derived from bashdb.texi.in
+
+2002-11-17 20:22 rockyb
+
+ * doc/bashdb.texi.in: More stuff was trunctated. Wonder if it has
+ to do with sourceforge move?
+
+ Make references to version get updated automatically.
+
+2002-11-17 19:44 rockyb
+
+ * debugger/: NEWS, TODO: Update to reflect current situation.
+
+2002-11-17 19:42 rockyb
+
+ * debugger/tests/: brkpt2.right, debug.right, finish.right,
+ parm.right, sig.right: Line numbers inside signal handlers changed.
+
+2002-11-17 19:41 rockyb
+
+ * debugger/bashdb-sig.inc: Bug: don't set exit handler inside debug
+ trap handler. Seems to kick to be inhereted on subshells and then
+ we call the exit routine too often.
+
+ exit_handler more like the other handlers. Understands
+ "stop/nostop, print/noprint stack/nostack". Does more of the same
+ things before entering cmdloop that debug_handler does via a more
+ common debugger enter routine.
+
+ Saving _curline now done in common debbber enter routine
+
+2002-11-17 19:38 rockyb
+
+ * debugger/bashdb-cmds.inc: File got trunctated. Like
+ bashdb-help.inc -- Hmm. Something's fishy.
+
+ Anyway, "debug" with no arguments now uses the last command rather
+ the last statement. This should be correct more often.
+
+2002-11-17 19:34 rockyb
+
+ * debugger/: bashdb-fns.inc, bashdb-main.inc: _curline is now set
+ by BASH_LINENO rather than passing as a parameter to the trap.
+
+ Add this common thing inside common debugger enter routine.
+
+2002-11-17 19:30 rockyb
+
+ * debugger/bashdb-help.inc: info signals now shows EXIT in list.
+
+ Some help text got truncated.
+
+ Move CVS Id line to end to facilitate debugging.
+
+2002-11-17 19:26 rockyb
+
+ * debugger/Makefile.am: Add new .in files to distribution
+
+2002-11-17 19:23 rockyb
+
+ * debugger/bashdb: Derived now from bashdb.in
+
+2002-11-17 19:23 rockyb
+
+ * debugger/bashdb-init.inc: Derived now from bashdb-init.in
+
+2002-11-17 19:22 rockyb
+
+ * MANIFEST, configure.in, debugger/bashdb-init.inc.in,
+ debugger/bashdb.in: bashdb and bashdb-init.inc are now derived so
+ that we can automatically put in the release number.
+
+2002-11-16 11:44 rockyb
+
+ * htdocs/index.html: Add link to Bash reference manual which has
+ better error reporting and debugging support.
+
+2002-11-16 11:18 rockyb
+
+ * doc/bashref.texi: Go over debugger changes. Add debug RETURN, and
+ BASH_COMMAND for example.
+
+2002-11-16 11:17 rockyb
+
+ * debugger/CHANGES: Update as appropriate
+
+2002-11-16 09:55 rockyb
+
+ * execute_cmd.c, externs.h, print_cmd.c, trap.c, variables.c: Add
+ feature to save in BASH_COMMAND the command that is about to be
+ executed (provided it's not a "trap" statement). This is useful
+ *inside* a trap handler to know what was being run at the time of
+ the trap: the source code line isn't enough since there can be many
+ commands on one line. And in fact for an "eval" the command may
+ change from say "eval $foo" to "echo this is my life."
+
+2002-11-16 09:50 rockyb
+
+ * debugger/tests/: brkpt2.right, debug.right, finish.right,
+ parm.right, sig.right, skip.right: Recent changes to bashdb-sig.inc
+ changed call-stack line numbers. These tests notice the line
+ number change.
+
+2002-11-16 09:49 rockyb
+
+ * debugger/bashdb-list.inc: We now print the statement to be
+ executed if it was on the same line/file and the statement part is
+ different from the last time we ran this.
+
+2002-11-16 09:48 rockyb
+
+ * debugger/emacs/gud.el: Patched version for emacs 21.2 of gud.el
+ with bash support.
+
+2002-11-16 09:47 rockyb
+
+ * debugger/emacs/gud.el.diff: Patches that I hope will be on the
+ next version of Emacs (assuming the paperwork isn't lost, people
+ don't forget about the patch as a result of the time delay to do
+ the paperwork and so on.)
+
+2002-11-16 09:45 rockyb
+
+ * debugger/emacs/bashdb.el: Move from parent directory here. May
+ have also added provision for "finish" command.
+
+2002-11-16 09:40 rockyb
+
+ * debugger/: bashdb-main.inc, bashdb-sig.inc: Now save the command
+ that is to be executed next.
+
+2002-11-16 09:38 rockyb
+
+ * debugger/bashdb-fns.inc: Add common function
+ _bashdb_set_to_return_from_debugger to regularize the things that
+ need to be done on exit. There are more now, since we are saving
+ the last command executed on this line of the source file.
+
+2002-11-16 09:36 rockyb
+
+ * debugger/bashdb-init.inc: Need to skip more initially for "bashdb
+ -c" setup.
+
+2002-11-16 09:25 rockyb
+
+ * debugger/bashdb: Add -c option analogous to "bash -c".
+
+2002-11-15 08:31 rockyb
+
+ * doc/bashdb.texi: Update edition number and correct note x takes
+ an expression but repeats old one if not given.
+
+2002-11-15 07:52 rockyb
+
+ * doc/bashdb.texi: Document better how x command works. Mention
+ that DDD is available. Numerous small improvements.
+
+2002-11-14 22:25 rockyb
+
+ * debugger/ddd/ddd-3.3.1-bashdb.diff: This time, for sure!
+
+2002-11-14 19:16 rockyb
+
+ * MANIFEST, execute_cmd.c, tests/dbg-support.right: Bug: Somehow a
+ statement is messing up the simple cmd's Simple.line. So don't use
+ that in retrieving the line number. Would like to understand why
+ this is so, and if we could really simplify executing_line_number.
+
+2002-11-14 15:56 rockyb
+
+ * debugger/ddd/ddd-3.3.1-bashdb.diff: Final diff patch for ddd?
+
+2002-11-14 15:45 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, ddd/ddd-3.3.1-bashdb.diff,
+ tests/brkpt2.cmd, tests/brkpt2.right, tests/sig.right: More
+ improvements to "x" command. Use print as a fallback...
+
+2002-11-14 09:25 rockyb
+
+ * configure.in, debugger/bashdb-help.inc, debugger/tests/sig.right,
+ doc/bashdb.texi: configuure.in: get ready for version 0.32
+ bashdb.texi: minor typo changes debugger/help/sig: Remove "Num"
+ from title as it is no longer there.
+
+2002-11-14 09:08 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-11-14 09:03 rockyb
+
+ * tests/run-all: Bug: was not using right shell to run tests.
+
+2002-11-14 08:15 rockyb
+
+ * debugger/: bashdb-help.inc, bashdb-sig.inc, tests/sig.right: A
+ tad more like gdb: no signal numbers listed. No longer trap on
+ SIGWINCH.
+
+2002-11-14 01:09 rockyb
+
+ * MANIFEST: bashdb.el listed in old location.
+
+2002-11-14 01:08 rockyb
+
+ * tests/: run-dbg-support, run-dbg-support2, run-type: Remove
+ "export" -- messes up occasionally.
+
+2002-11-13 23:39 rockyb
+
+ * debugger/: NEWS, bashdb-help.inc, bashdb-sig.inc,
+ tests/sig.right: Add help for "handle". Tidy generic signal handler
+ more and make more general (e.g unconditinally turn off set
+ tracing).
+
+2002-11-13 23:22 rockyb
+
+ * debugger/: bashdb-fns.inc, bashdb-sig.inc, tests/sig.right: Clean
+ up signal handling code a small amount by creating a common routine
+ to set some global variables.
+
+2002-11-13 19:42 rockyb
+
+ * MANIFEST, doc/bashdb.texi: MANIFEST: add new ddd-3.3.1 patch.
+ bashdb.texi: docment handle command
+
+2002-11-13 19:33 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-help.inc, bashdb-sig.inc,
+ tests/sig.cmd, tests/sig.right, tests/sig.sh: Signal handling is
+ more like gdb now. No doubt there're room for improvement, but this
+ is probably a big improvement.
+
+2002-11-13 19:32 rockyb
+
+ * debugger/ddd/ddd-3.3.1-bashdb.diff: Patches to make ddd work.
+
+2002-11-12 15:20 rockyb
+
+ * debugger/: NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-init.inc, bashdb-sig.inc, tests/sig.right: Some work on
+ signal handling. More is there, more to do. So what else is new?
+
+2002-11-12 12:22 rockyb
+
+ * doc/bashdb.texi: Add "info break count". More examples. Embolden
+ typed example output. Remove some duplicate index entries.
+
+2002-11-12 11:50 rockyb
+
+ * debugger/tests/: brkpt1.cmd, brkpt1.right: Add error tests on
+ "info break". And add test for "info break n."
+
+2002-11-12 09:30 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-11-12 09:29 rockyb
+
+ * debugger/tests/: misc.right, sig.right: Recent changes in code
+ are reflected changed output (line numbers or help text)
+
+2002-11-12 09:26 rockyb
+
+ * doc/bashdb.texi: Add documentation for "condition" command.
+
+2002-11-12 07:45 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc: Add
+ gdb's "condition" command.
+
+2002-11-12 07:42 rockyb
+
+ * debugger/bashdb-sig.inc: Oops --- typo in variable name.
+
+2002-11-12 07:41 rockyb
+
+ * debugger/bashdb-sig.inc: Add provision for debugging debugger.
+
+2002-11-12 07:40 rockyb
+
+ * debugger/bashdb-io.inc: Add more file translation characters for
+ ", [, and ] and reorder letters to make mnemonic.
+
+2002-11-12 07:39 rockyb
+
+ * debugger/tests/: brkpt1.cmd, brkpt1.right: Add regression tests
+ for new "condition" command.
+
+2002-11-12 07:37 rockyb
+
+ * tests/: dbg-support.right, dbg-support2.right: Got these two
+ output "right" files reversed, - sorta.
+
+2002-11-11 23:56 rockyb
+
+ * debugger/bashdb-sig.inc: Caught another routine that didn't start
+ _bashdb_
+
+2002-11-11 23:45 rockyb
+
+ * debugger/TODO: Cross many things off list.
+
+2002-11-11 23:45 rockyb
+
+ * debugger/NEWS: Update as appropriate - major changes.
+
+2002-11-11 23:44 rockyb
+
+ * debugger/Makefile.am: Move bashdb.el into emacs directory.
+
+2002-11-11 23:42 rockyb
+
+ * MANIFEST: Add debugger emacs and ddd directories.
+
+2002-11-11 23:41 rockyb
+
+ * execute_cmd.c: Line number reporting improved.
+
+ Fix bug in using trap line numbers inside traps. BASH_LINENO had
+ been wrong for the parts inside of a trap.
+
+ Fix bug in case line numbers reporting line number of "esac" rather
+ than case clause.
+
+ The organization of the how line numbers work should really be
+ rethought. Here we've done a lot of saving and restoring when that
+ shoudl probably be done elsewhere.
+
+2002-11-11 23:39 rockyb
+
+ * tests/: dbg-support.right, dbg-support2.tests: Would you believe
+ we were checking for erroneous values. Put in the trap reporting a
+ line number that (when working properly) *should* change.
+
+2002-11-11 23:37 rockyb
+
+ * tests/run-dbg-support2: Make it so we can run standalone.
+
+2002-11-11 23:36 rockyb
+
+ * debugger/tests/sig.right: Had had wrong line numbers. This time,
+ for sure!
+
+2002-11-11 16:45 rockyb
+
+ * debugger/bashdb.el: Moved inside emacs directory now.
+
+2002-11-11 07:28 rockyb
+
+ * execute_cmd.c: Simplifer and I think a tad more line-number
+ accurate.
+
+2002-11-10 21:26 rockyb
+
+ * execute_cmd.c, trap.c, debugger/NEWS: Believe it or not, the C
+ files have gotten a little bit *simpler*. We are closer towards
+ having line numbers recorded accurately in BASH_LINENO (although
+ things are not perfect yet).
+
+2002-11-10 21:06 rockyb
+
+ * MANIFEST: Make tests 755 so they can more easily be run
+ standalone.
+
+2002-11-10 21:05 rockyb
+
+ * debugger/tests/brkpt2.right: Would you believe that we had been
+ checking an erroneous down all along?
+
+2002-11-10 21:04 rockyb
+
+ * tests/: dbg-support.right, dbg-support.tests, run-dbg-support:
+ Would you believe that we had been checking wrong stuff all along?
+
+2002-11-10 14:39 rockyb
+
+ * debugger/: bashdb-help.inc, bashdb-stack.inc, bashdb.el,
+ tests/brkpt2.right, tests/misc.right: bashdb-help: Make more like
+ gdb - facilitates use in ddd. bashdb-stack.inc: Fix bug in
+ "stack_down". (There's another one though lurking) bashdb.el: add
+ key mapping for finish and other keymappings tests/misc: change in
+ "show" output tests/brkpt2: perhaps better although not quite
+ perfect.
+
+2002-11-10 11:35 rockyb
+
+ * debugger/bashdb-help.inc: Add help for finish command. Invalid
+ help command now reports what gdb does.
+
+2002-11-09 23:54 rockyb
+
+ * debugger/bashdb-help.inc: Missed a place that should have added
+ _bashdb.
+
+2002-11-09 20:28 rockyb
+
+ * debugger/bashdb-set.inc: Make show command work like gdb.
+
+2002-11-09 20:16 rockyb
+
+ * debugger/bashdb-io.inc: Missed a couple more "builtin printf"'s
+
+2002-11-09 20:15 rockyb
+
+ * debugger/bashdb-io.inc: Specify *builtin* printf.
+
+2002-11-09 20:12 rockyb
+
+ * debugger/tests/finish.cmd: gdb "finish" (= perl5db "return")
+ regression test.
+
+2002-11-09 20:07 rockyb
+
+ * tests/: run-trap, run-type: If there's an error we save in a file
+ specific for this test. Is more standalone now.
+
+2002-11-09 10:07 rockyb
+
+ * tests/shopt.right: Update for add set -o errtrace option
+
+2002-11-09 07:38 rockyb
+
+ * debugger/: Makefile.am, NEWS, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-hist.inc, bashdb-io.inc, bashdb-main.inc, bashdb-set.inc,
+ tests/misc.cmd, tests/misc.right, tests/sig.cmd, tests/sig.right,
+ tests/sig.sh: echo -> builtin echo Add "info signals" and "info
+ handler" Break out history into new file bashdb-hist.inc. Help
+ command change v -> M
+
+2002-11-09 07:36 rockyb
+
+ * doc/bashdb.texi: Revise info on signal handling and expand
+ history command section.
+
+2002-11-09 07:34 rockyb
+
+ * configure.in: Get redy for a new release.
+
+2002-11-09 07:34 rockyb
+
+ * MANIFEST: Update with current list.
+
+2002-11-09 07:34 rockyb
+
+ * trap.c: A hack to stop the core dump until I figure out why we
+ are trying to free a mangled string.
+
+2002-11-08 21:29 rockyb
+
+ * debugger/tests/sig.sh: Regression test for signal handling.
+
+2002-11-08 21:24 rockyb
+
+ * tests/: dbg-support2.right, dbg-support2.tests, run-dbg-support2:
+ Regression tests for skipping an instruction.
+
+2002-11-08 21:22 rockyb
+
+ * MANIFEST: Add run-support2 and +x tests/run-*
+
+2002-11-08 21:08 rockyb
+
+ * debugger/tests/sig.right: [no log message]
+
+2002-11-08 21:08 rockyb
+
+ * debugger/bashdb-sig.inc: Previous flie was horribly truncated.
+
+2002-11-07 05:34 rockyb
+
+ * debugger/tests/run-sig: Fix bug in reporting a pass when we fail.
+
+2002-11-05 22:43 rockyb
+
+ * MANIFEST, execute_cmd.c, flags.c, flags.h, trap.c, trap.h,
+ builtins/set.def, debugger/bashdb-sig-ret.inc,
+ debugger/tests/Makefile.am, debugger/tests/finish.right,
+ debugger/tests/finish.tests, debugger/tests/run-finish,
+ debugger/tests/run-sig, doc/bashdb.texi: bashdb.texi: Document
+ finish command.
+
+ debugger/tests*, MANIFEST, Makefile.am: Add finish command test.
+
+ *sig: add signal save/restor test
+
+2002-11-02 15:17 rockyb
+
+ * debugger/NEWS: Today's hacks.
+
+2002-11-02 14:47 rockyb
+
+ * debugger/tests/run-sig: Signal handler testing.
+
+2002-11-02 14:46 rockyb
+
+ * debugger/: Makefile.am, bashdb-list.inc, bashdb-sig-ret.inc,
+ bashdb-sig.inc, tests/Makefile.am, tests/sig.cmd, tests/sig.right,
+ tests/sig.sh, tests/sig.tests: Save/restore signals on entering
+ debugger.
+
+2002-11-02 10:17 rockyb
+
+ * trap.c: Clear trap RETURN on function calls.
+
+2002-11-02 10:16 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-sig.inc: Workaround? for bash
+ bug introduced implementing "trap RETURN"
+
+2002-11-02 09:17 rockyb
+
+ * trap.c: Save and restore return code $? across run_return_trap
+ calls.
+
+2002-11-02 09:15 rockyb
+
+ * debugger/bashdb-sig.inc: [no log message]
+
+2002-11-02 09:15 rockyb
+
+ * debugger/bashdb-sig.inc: Small comment changes.
+
+2002-11-02 09:12 rockyb
+
+ * debugger/CHANGES: Reflects better the changes.
+
+2002-11-02 09:03 rockyb
+
+ * debugger/CHANGES: Update as appropriate.
+
+2002-11-02 08:12 rockyb
+
+ * builtins/return.def, debugger/NEWS, debugger/bashdb-cmds.inc,
+ debugger/bashdb-sig.inc, debugger/bashdb-stack.inc,
+ debugger/tests/brkpt2.right, debugger/tests/parm.right: Fix bug
+ where stack trace current line entry was sometimes wrong. No
+ longer mangle line number in stack changing commands.
+
+ Printing source line on "RETURN" debugger call.
+
+2002-11-01 07:14 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-io.inc, bashdb-list.inc, bashdb-main.inc, bashdb-sig.inc:
+ Add gdb's finish or perl5db's return. Line number on return
+ statement is funny and there are some bugs to make fully work.
+
+ Now all debugger routines start _bashdb.
+
+2002-11-01 07:11 rockyb
+
+ * execute_cmd.c, trap.c, trap.h, support/mksignames.c,
+ tests/dbg-is-fn.right, tests/dbg-is-fn.tests: Add: trap fn ...
+ RETURN
+
+ Line numbers when trap is called are a little off (for use in a
+ debugger), but this works.
+
+2002-10-31 05:59 rockyb
+
+ * debugger/TODO: [no log message]
+
+2002-10-30 22:11 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-10-30 22:03 rockyb
+
+ * configure.in, debugger/bashdb-cmds.inc, debugger/bashdb-help.inc,
+ debugger/tests/misc.cmd, debugger/tests/misc.right,
+ doc/bashdb.texi: Allow negative numbers in history commands. Get
+ ready for release 0.30.
+
+2002-10-30 07:55 rockyb
+
+ * doc/bashdb.texi: /tmp/fact.sh -> fact.sh in example.
+
+2002-10-30 07:46 rockyb
+
+ * doc/bashdb.texi: Index history commands.
+
+2002-10-30 07:13 rockyb
+
+ * debugger/TODO: Cross some things off the list.
+
+2002-10-30 07:02 rockyb
+
+ * doc/bashdb.texi: Add documentation on history command. Minor
+ typographical improvements.
+
+2002-10-29 08:54 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, bashdb-help.inc,
+ tests/misc.cmd, tests/misc.right: Make history command more robust
+ and allow for more features. How allows for !n:p. We now give an
+ error message if the history numbers are out of range. Separate
+ history parsing into a subroutine to tidy and facilitate future
+ features.
+
+2002-10-27 00:05 rockyb
+
+ * debugger/NEWS: Update as appropriate.
+
+2002-10-27 00:02 rockyb
+
+ * debugger/bashdb-set-d-vars.inc: Better way to set dollar
+ parameters. It handles more than $1..$9 and sets $# correctly too.
+
+2002-10-26 23:17 rockyb
+
+ * debugger/bashdb-init.inc: bug in bashdb --debugger some local's
+ must be declares.
+
+2002-10-26 10:29 rockyb
+
+ * doc/bashdb.texi: Add doc for -t option and "set editing" Revise
+ example a little for current output.
+
+2002-10-26 10:27 rockyb
+
+ * debugger/: NEWS, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-help.inc, bashdb-init.inc, bashdb-set.inc: Fix/change
+ history. Numbers now match prompt numbers. Can use !n as well as hi
+ n
+
+ Add GDB's "set editing" command.
+
+ _bashdb_help_set added to show set commands. Made more like GDB's
+ output.
+
+2002-10-26 10:25 rockyb
+
+ * debugger/tests/: misc.cmd, misc.right: Output changes as a result
+ of:
+
+ - Fix/change history. Numbers now match prompt numbers.
+ - Add test of GDB's "set args" command. - Add test of GDB's
+ "set editing" command.
+
+2002-10-25 08:34 rockyb
+
+ * doc/bashdb.texi: Add info about set args, show args, controlling
+ tty, setting and showing the prompt.
+
+2002-10-25 08:15 rockyb
+
+ * debugger/: bashdb-cmds.inc, tests/misc.cmd, tests/misc.right:
+ Make H be like perl's. Fix history (hi) command. Don't but some
+ commands like comment and history in the history. Test.
+
+2002-10-25 08:05 rockyb
+
+ * debugger/: bashdb-cmds.inc, tests/misc.cmd, tests/misc.right:
+ Make H be more like perl's. Make hi work.
+
+2002-10-25 07:07 rockyb
+
+ * debugger/: bashdb-set.inc, tests/brkpt2.right, tests/debug.right,
+ tests/list.right, tests/misc.right, tests/parm.right,
+ tests/run-misc: Tidy up show output. Tests changed largely as a
+ result of size increase in bashdb from last change. run-misc:
+ wasn't giving an error is diff failed on first diff check.
+
+2002-10-25 06:44 rockyb
+
+ * debugger/NEWS: Latest news...
+
+2002-10-25 06:41 rockyb
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-set.inc,
+ tests/misc-output.right, tests/misc.cmd, tests/misc.right,
+ tests/run-misc: Add "set/show prompt." Make prompt customizable.
+ bashdb: all -t to be a filename.
+
+2002-10-25 06:39 rockyb
+
+ * MANIFEST: One more file...
+
+2002-10-24 09:33 rockyb
+
+ * debugger/: bashdb-set.inc, bashdb-sig.inc: Comment about why
+ slightly more complex loop to set args.
+
+2002-10-24 09:08 rockyb
+
+ * debugger/: NEWS, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-help.inc, bashdb-init.inc, bashdb-io.inc, bashdb-set.inc,
+ tests/brkpt2.right, tests/debug.right, tests/misc.cmd,
+ tests/misc.right, tests/parm.right: - Fix bugs in debugger output
+ when debugged program redirects I/O
+
+ - Add GDB's "set args" command
+
+2002-10-23 09:04 rockyb
+
+ * debugger/bashdb: Remove debug statement accidentally committed.
+
+2002-10-23 08:51 rockyb
+
+ * debugger/: bashdb, bashdb-init.inc, bashdb-io.inc,
+ tests/brkpt2.right, tests/debug.right, tests/parm.right: bashdb,
+ bashdb-init.inc: Add -t option to set tty bashdb-io.inc: bug in not
+ testing _bashdb_tty in _bashdb_printf tests: output changes bashdb
+ script has gotten larger.
+
+2002-10-23 08:49 rockyb
+
+ * debugger/TODO: Update as appropriate.
+
+2002-10-23 08:26 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-init.inc, bashdb-io.inc, bashdb-set.inc, tests/misc.cmd,
+ tests/misc.right: Change variable $_tty to $_bashdb_tty
+
+ All "read -e -p" now have input and output redirected.
+
+ Implement tty command to set tty.
+
+2002-10-22 13:36 masata-y
+
+ * htdocs/: bashdb-break.png, bashdb-where.png, index.html: Added
+ new screenshot.
+
+2002-10-22 06:25 rockyb
+
+ * debugger/bashdb-cmds.inc: Fix bug in printing debugger prompt
+ when debugged program has redirected stderr. Thanks to Masatake
+ YAMATO.
+
+2002-10-21 10:59 rockyb
+
+ * debugger/bashdb-cmds.inc: Remove trailing blanks.
+
+2002-10-21 10:48 rockyb
+
+ * debugger/: bashdb-io.inc, bashdb-list.inc, bashdb-sig.inc: Just
+ format changes: remove blanks at the ends of some lines.
+
+2002-10-21 10:26 rockyb
+
+ * debugger/.cvsignore: Allow for different versions of autotools.
+
+2002-10-21 10:25 rockyb
+
+ * debugger/bashdb-help.inc: Bug in "help return" -- missing some
+ lines there.
+
+2002-10-21 10:00 rockyb
+
+ * .cvsignore: Handle embedded version numbers for automate.
+
+2002-10-19 09:26 rockyb
+
+ * debugger/bashdb-help.inc, doc/bashdb.texi: Add documentation for
+ new command return. bashdb.texi: had duplicate help screens
+
+2002-10-19 09:08 rockyb
+
+ * debugger/NEWS: Minor typographical changes.
+
+2002-10-18 23:24 rockyb
+
+ * debugger/: bashdb-cmds.inc, tests/debug.right: Make so regression
+ test is portable. A hack for now
+
+2002-10-18 23:16 rockyb
+
+ * debugger/: bashdb-cmds.inc, tests/debug.cmd, tests/debug.right:
+ Correct debug test.
+
+2002-10-18 23:14 rockyb
+
+ * debugger/tests/debug2.cmd: Need to have a separate file for debug
+ after nested one level.
+
+2002-10-18 23:13 rockyb
+
+ * MANIFEST: Need yet another command file to test "debug" nested
+ one level deep.
+
+2002-10-18 22:40 rockyb
+
+ * debugger/bashdb-set-d-vars.inc: To set dollar variables ($1, $2,
+ ... $?) before evaluation of a user expression.
+
+2002-10-18 22:37 rockyb
+
+ * MANIFEST: This time, for sure!
+
+2002-10-18 22:34 rockyb
+
+ * MANIFEST: More of the same.
+
+2002-10-18 22:31 rockyb
+
+ * MANIFEST: Add missing file.
+
+2002-10-18 22:14 rockyb
+
+ * MANIFEST, debugger/tests/Makefile.am, debugger/tests/run-watch2,
+ debugger/tests/watch2.cmd, debugger/tests/watch2.right,
+ debugger/tests/watch2.tests: Add more tests.
+
+2002-10-18 21:41 rockyb
+
+ * MANIFEST: Fix filename typo
+
+2002-10-18 21:31 rockyb
+
+ * MANIFEST, trap.c, debugger/Makefile.am, debugger/bashdb-brk.inc,
+ debugger/bashdb-cmds.inc, debugger/bashdb-fns.inc,
+ debugger/bashdb-io.inc, debugger/bashdb-sig.inc,
+ debugger/tests/debug.cmd, debugger/tests/debug.right,
+ debugger/tests/debug.sh, debugger/tests/debug.tests,
+ debugger/tests/parm.right, debugger/tests/run-debug,
+ doc/bashdb.texi, doc/bashref.texi: A better way of handling setting
+ dollar variables.
+
+ Add debug test.
+
+2002-10-18 08:44 rockyb
+
+ * debugger/: bashdb-brk.inc, NEWS: Set $1, $2 before
+ watch-expression evaluation
+
+2002-10-18 08:10 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, bashdb-sig.inc: $? is saved and
+ preserved for use inside "eval" and "print"
+
+2002-10-18 08:06 rockyb
+
+ * debugger/tests/: parm.cmd, parm.sh: Test that $? is saved and
+ preserved in eval and print.
+
+2002-10-18 06:38 rockyb
+
+ * debugger/bashdb-set.inc: Correct show version to add more
+ sources.
+
+2002-10-18 06:33 rockyb
+
+ * MANIFEST, execute_cmd.c, trap.c, doc/bashdb.texi: execute_cmd.c:
+ small bug fixes to "return" statement bashdb.texi: document return
+
+ MANIFEST: add skip.sh
+
+2002-10-18 06:32 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, bashdb-sig.inc: Fix bug in skip
+ *count*.
+
+2002-10-18 06:31 rockyb
+
+ * debugger/tests/: action.cmd, tbreak.cmd: Add CVS Id lines.
+
+2002-10-18 06:30 rockyb
+
+ * debugger/tests/: skip.cmd, skip.right, skip.sh, skip.tests: More
+ thorough tests of skip command.
+
+2002-10-18 06:30 rockyb
+
+ * debugger/tests/: parm.cmd, parm.right, parm.sh: Add return tests.
+ More detailed dollar tests.
+
+2002-10-17 08:56 rockyb
+
+ * debugger/: NEWS, TODO, bashdb-cmds.inc, bashdb-main.inc,
+ tests/brkpt2.right, tests/parm.right: bashdb-main.inc: Bug in
+ changing to _bashdb_libdir bashdb-cmds.inc: number of times nested
+ in debug listed via exported variable BASHDB_LEVEL
+
+2002-10-17 08:11 rockyb
+
+ * debugger/bashdb-cmds.inc: Remove debugging statments.
+
+2002-10-17 00:10 rockyb
+
+ * debugger/: NEWS, TODO, bashdb, bashdb-cmds.inc: Get "debug"
+ working much better: variables (e.g. $0) are substituted now.
+ "bash --debugger" invocations work since we no longer fork
+ _libdir renamed to _bashdb_libdir (in bashdb). We add "-L
+ _bashdb_libdir" when executing via bashdb script.
+
+2002-10-16 23:12 rockyb
+
+ * doc/Makefile.in: Correct make uninstall -- this time for sure!
+
+2002-10-16 23:12 rockyb
+
+ * Makefile.in: Correct make uninstall target - add debugger
+ directory.
+
+2002-10-16 22:55 rockyb
+
+ * doc/Makefile.in: Bug in uninstall targets. Was missing trailing
+ ;'s
+
+2002-10-16 08:41 rockyb
+
+ * debugger/bashdb-help.inc, doc/bashdb.texi: Document skip and
+ debug.
+
+2002-10-16 08:40 rockyb
+
+ * debugger/bashdb-cmds.inc: Make skip work like next/step.
+
+2002-10-16 08:39 rockyb
+
+ * configure.in: Get ready for another release.
+
+2002-10-16 08:22 rockyb
+
+ * debugger/NEWS: As appropriate.
+
+2002-10-15 23:40 rockyb
+
+ * debugger/tests/skip.right: Correct output from skip test.
+
+2002-10-15 23:29 rockyb
+
+ * debugger/bashdb-help.inc, doc/bashdb.texi, doc/bashref.texi:
+ Document skip command.
+
+2002-10-15 22:57 rockyb
+
+ * MANIFEST, execute_cmd.c, trap.c, trap.h,
+ debugger/bashdb-cmds.inc, debugger/bashdb-sig.inc,
+ debugger/tests/Makefile.am, debugger/tests/run-skip,
+ debugger/tests/skip.cmd, debugger/tests/skip.tests,
+ doc/bashref.texi: Add ability to skip execution of a command.
+ Debugger command: skip
+
+2002-10-15 22:55 rockyb
+
+ * builtins/caller.def: Documentation improvement.
+
+2002-10-12 09:26 rockyb
+
+ * doc/bashdb.texi: Update stack example and help display to match
+ current settings.
+
+2002-10-11 23:18 rockyb
+
+ * debugger/NEWS: Update to reflect current sitiation
+
+2002-10-11 23:17 rockyb
+
+ * debugger/: bashdb-list.inc, tests/search.cmd, tests/search.right:
+ Fix bug in search forward not resetting line to start.
+
+ Search now lists only one line same as gdb and perl5db do. Update
+ tests as appropriate.
+
+2002-10-11 08:36 rockyb
+
+ * configure.in: Get ready for release 0.28
+
+2002-10-11 08:27 rockyb
+
+ * doc/bashref.texi: Document BASH_ARGC and BASH_ARGV. Change
+ workign on BASH_LINENO and BASH_SOURCE a little.
+
+2002-10-10 21:40 rockyb
+
+ * MANIFEST: Add parm tests.
+
+2002-10-10 21:39 rockyb
+
+ * debugger/tests/parm.sh: To keep run-parm and parm.right company.
+
+2002-10-10 21:21 rockyb
+
+ * debugger/tests/: parm.cmd, parm.right: Add an action command.
+ Forgot to check in parm.right.
+
+2002-10-10 21:08 rockyb
+
+ * debugger/TODO: Update to reflect current situtation: parameters
+ now work.
+
+2002-10-10 20:57 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-main.inc, bashdb-sig.inc,
+ tests/parm.cmd: Fix bug so that $1 preserve embedded blanks (or
+ more precisely, embedded IFS) that they might have had.
+
+2002-10-10 08:47 rockyb
+
+ * debugger/bashdb-cmds.inc: Bug in _bashdb_cmd_eval. Was not
+ erasing evalfile before starting if $1.. was empty, so we'd have
+ accumulated output.
+
+2002-10-10 08:34 rockyb
+
+ * .cvsignore: Add more good derived stuff (from autotools)
+
+2002-10-10 08:34 rockyb
+
+ * array.c, execute_cmd.c, shell.c, variables.c, variables.h,
+ builtins/common.c, builtins/common.h, builtins/evalfile.c,
+ tests/array.right: Add ability to show function and shell
+ parameters. Added BASH arrays BASH_ARGC and BASH_ARGV.
+
+ array.c: handle more error contitions. array.right: change for new
+ array variables
+
+2002-10-10 08:30 rockyb
+
+ * debugger/.cvsignore: Add more good derived stuff (from autotools)
+
+2002-10-10 08:26 rockyb
+
+ * debugger/tests/: run-brkpt1, run-brkpt2, run-display, run-list,
+ run-misc, run-parm, run-search, run-tbreak, run-watch1: Make all
+ run* have these two properties:
+
+ File checked against is now custom for that test (and is called
+ *test*.check) to facilitate running batch tests and moving that to
+ *test*.right or for just comparison.
+
+ Globbing turned off on diff in case there is an discrepency and the
+ difference has a pattern character like *.
+
+2002-10-10 08:20 rockyb
+
+ * debugger/tests/run-action: File checked against is now custom for
+ that test (and is called *test*.check) to facilitate running batch
+ tests and moving that to *test*.right or for just comparison.
+
+2002-10-10 08:17 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-io.inc, bashdb-sig.inc,
+ bashdb-stack.inc, tests/Makefile.am, tests/misc.cmd,
+ tests/parm.cmd, tests/parm.tests, tests/run-display: Add parameters
+ in stack trace. And can now refer to $1 $2 $3 in print and eval
+ commands.
+
+2002-10-10 08:06 rockyb
+
+ * debugger/tests/: brkpt2.right, misc.right: Updated for new stack
+ tracing format and $1, $2 evaluation.
+
+2002-10-10 08:05 rockyb
+
+ * debugger/tests/: run-brkpt1, run-brkpt2, run-list, run-misc,
+ run-parm: File checked against is now custom for that test (and is
+ called *test*.check) to facilitate running batch tests and moving
+ that to *test*.right or for just comparison.
+
+2002-10-03 08:40 rockyb
+
+ * debugger/: bashdb-list.inc, tests/search.cmd, tests/search.right:
+ Fix up search command to do the right thing more often. However
+ need to make another pass to match gdb semantics more perfectly.
+ Save last search pattern and can be repeated if no pattern given.
+
+2002-10-03 01:12 rockyb
+
+ * MANIFEST: Forgot another.
+
+2002-10-03 01:10 rockyb
+
+ * MANIFEST: Forgot one: run-action.
+
+2002-10-03 01:08 rockyb
+
+ * doc/bashdb.texi: Document search.
+
+2002-10-03 01:06 rockyb
+
+ * MANIFEST: Break out list/search routines. Add action and search
+ regression tests.
+
+2002-09-24 13:30 rockyb
+
+ * debugger/: Makefile.am, NEWS, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-help.inc, bashdb-io.inc, bashdb-list.inc, bashdb-main.inc,
+ bashdb-sig.inc, tests/Makefile.am, tests/action.cmd,
+ tests/action.right, tests/action.tests, tests/brkpt1.right,
+ tests/brkpt2.right, tests/run-action, tests/run-search,
+ tests/search.cmd, tests/search.right, tests/search.tests,
+ tests/tbreak.right, tests/watch1.right: Add "search" "reverse"
+ (forward/backward searching) and Perl's "a" (action) commands.
+ bashdb-list.inc split off for the debugger growth.
+
+2002-09-24 12:29 rockyb
+
+ * configure.in: In preparation for yet another release - when I get
+ back from hiking.
+
+2002-09-24 01:26 rockyb
+
+ * debugger/bashdb-help.inc: Add tb to help list.
+
+2002-09-23 18:45 rockyb
+
+ * debugger/NEWS: [no log message]
+
+2002-09-23 18:19 rockyb
+
+ * debugger/NEWS: [no log message]
+
+2002-09-23 18:09 rockyb
+
+ * debugger/NEWS: Make mroe readible.
+
+2002-09-23 17:57 rockyb
+
+ * cvscompile.sh: Spelling typo.
+
+2002-09-23 17:52 rockyb
+
+ * debugger/bashdb.el: Small typo
+
+2002-09-23 17:47 rockyb
+
+ * debugger/bashdb.el: Messed up on author and didn't comment
+ properly.
+
+2002-09-23 17:41 rockyb
+
+ * debugger/MANIFEST: This really isn't used. Autotools rules. (But
+ really we do a make dist in the parent directory.)
+
+2002-09-23 17:39 rockyb
+
+ * MANIFEST: Add display tests.
+
+2002-09-23 17:06 rockyb
+
+ * configure.in: Time for yet another release. (Really should figure
+ out a way to do this by changing another file...)
+
+2002-09-23 09:30 rockyb
+
+ * doc/bashdb.texi: Document display routines. Some unfinished
+ things had been finished Add Masatake YAMATO.
+
+2002-09-23 09:09 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-io.inc, tests/display.right:
+ Change format of display output to identify display number and
+ expression.
+
+2002-09-22 07:40 rockyb
+
+ * debugger/: bashdb-help.inc, tests/Makefile.am, tests/display.cmd,
+ tests/display.right, tests/display.tests, tests/run-display: Add
+ display regression test. bashdb-help.inc: change lines to
+ linespecs in help. Add missing _bashdb_msg.
+
+2002-09-21 22:46 rockyb
+
+ * debugger/bashdb.el: Don't know how to spell my own name!
+
+2002-09-21 22:35 rockyb
+
+ * debugger/bashdb-help.inc: Add help for display. correct en/dis
+ help to watchpoint and display.
+
+2002-09-21 22:07 rockyb
+
+ * htdocs/index.html: Add Masatake YAMATO's screenshot link.
+
+2002-09-21 22:01 rockyb
+
+ * htdocs/index.html: Adding with g+w.
+
+2002-09-21 22:00 rockyb
+
+ * htdocs/index.html: Remove so I can recreate with g+w.
+
+2002-09-21 21:41 rockyb
+
+ * debugger/: NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-help.inc, tests/misc.right: Add gdb's auto display commands
+ (display, undisplay, enable/disable display)
+
+2002-09-21 06:41 rockyb
+
+ * debugger/bashdb-cmds.inc: debug command a tad better -- now
+ allows for command to get run.
+
+2002-09-21 06:17 rockyb
+
+ * debugger/bashdb-cmds.inc: Okay, now get out some of the bugs in
+ the "debug" command. More work is needed to make this more
+ seamless. (In particular need to skip over execution after debugged
+ execution happens).
+
+2002-09-21 05:50 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, bashdb-sig.inc,
+ tests/tbreak.cmd, tests/tbreak.right: Add provision to debug into a
+ script ("debug" command), and leave script without going back into
+ debugger command loop (BASHDB_QUIT_ON_QUIT environment variable).
+
+2002-09-19 14:50 rockyb
+
+ * builtins/caller.def: Add Perl-like caller function
+
+2002-09-19 14:49 rockyb
+
+ * MANIFEST, builtins/Makefile.in, debugger/NEWS,
+ tests/dbg-support.right, tests/dbg-support.tests: Add caller
+ builtin
+
+2002-09-19 13:01 masata-y
+
+ * debugger/: bashdb-help.inc, bashdb.el: bashdb-help.inc: fix
+ typo(tbreak, down), added [count] in up command's help message.
+ bashdb.el: added gud-tbreak.
+
+2002-09-19 12:51 masata-y
+
+ * debugger/bashdb.el: added simple comments about how to install
+ bashdb.el. provided bashdb.
+
+2002-09-19 12:39 masata-y
+
+ * autogen.sh, cvscompile.sh: autogen.sh: invoked bootstrap.sh in
+ the current directory(.). cvscompile.sh: invoked autogen.sh in the
+ current directory(.).
+
+2002-09-18 23:04 rockyb
+
+ * doc/bashdb.texi: Document tbreak, enable and disable. Remove
+ references to catchpoints.
+
+2002-09-18 22:04 rockyb
+
+ * cvscompile.sh: Basically changed name to autogen.sh. This is for
+ compatibility oniy.
+
+2002-09-18 22:04 rockyb
+
+ * MANIFEST: Add tbreak tests
+
+2002-09-18 22:03 rockyb
+
+ * debugger/tests/: Makefile.am, run-tbreak, tbreak.cmd,
+ tbreak.right, tbreak.tests: Regression test for temporary break:
+ tbreak
+
+2002-09-18 21:37 rockyb
+
+ * debugger/: NEWS, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-help.inc, bashdb-sig.inc, tests/brkpt1.right,
+ tests/brkpt2.right: Add temporary break.
+
+2002-09-18 21:06 rockyb
+
+ * autogen.sh, bootstrap.sh: Creates derived files when starting a
+ CVS project. autogen.sh is bootstrap with an invocation of
+ configure.
+
+ Names suggested from autotools book of Gary V. Vaughan et. al by
+ way of information provided by Masatake YAMATO.
+
+2002-09-18 21:02 rockyb
+
+ * INSTALL: Update instructions as per information from Masatake
+ YAMATO.
+
+2002-09-18 02:03 rockyb
+
+ * debugger/bashdb-help.inc: Document "break" command change args
+ help linespec in online help where appropriate.
+
+2002-09-17 09:01 rockyb
+
+ * debugger/NEWS: typo.
+
+2002-09-17 08:03 rockyb
+
+ * debugger/NEWS: Last minute additions for version 0.25 - recent
+ doc changes.
+
+2002-09-17 08:00 rockyb
+
+ * configure.in: Get ready for version 0.25.
+
+2002-09-17 08:00 rockyb
+
+ * INSTALL: Modify for debugger-enabled version of bash.
+
+2002-09-17 07:57 rockyb
+
+ * README: Customize for the debug-enabled version of bash. Is more
+ helpful, I think.
+
+2002-09-17 07:56 rockyb
+
+ * debugger/INSTALL: Remove generic instructions and customize for
+ something specific for the debugger. Should be more helpful, I
+ think.
+
+2002-09-17 07:07 rockyb
+
+ * README: Revise for BASH debugger.
+
+2002-09-17 06:54 rockyb
+
+ * MANIFEST: Add new miscellaneous tests.
+
+2002-09-16 17:37 rockyb
+
+ * debugger/: NEWS, bashdb-fns.inc, bashdb-main.inc, bashdb-sig.inc:
+ Move debug trap handler to bashdb-sig.inc and rename it, well,
+ debug_trap_handler.
+
+ Save restart set parameters and inside set -xv (at least
+ initially).
+
+2002-09-16 17:33 rockyb
+
+ * debugger/tests/: Makefile.am, dbg-test2.sh, misc.cmd, misc.right,
+ misc.tests, prof1.cmd, prof2.cmd, run-misc: Add tests of
+ miscellaneous commands: source, info args, show args, show
+ warranty, and show copying.
+
+2002-09-14 18:26 rockyb
+
+ * debugger/NEWS: Update.
+
+2002-09-14 18:25 rockyb
+
+ * MANIFEST: Add new brkpt2 tests
+
+2002-09-14 18:24 rockyb
+
+ * doc/bashdb.texi: Change documentation of "info args" and ARG.
+ Reorganize sections a bit so there's more in the command reference.
+ Document _bashdb_ variables.
+
+2002-09-14 18:14 rockyb
+
+ * debugger/bashdb-help.inc: Change info args to match closer gdb.
+ Is now $1, $2 and so on rather than initial program arguments.
+
+2002-09-14 17:54 rockyb
+
+ * debugger/: bashdb-fns.inc, bashdb-main.inc: Now support $1 $2 as
+ ${ARG[1}}, ${ARG[2]}.
+
+2002-09-14 17:53 rockyb
+
+ * debugger/tests/: Makefile.am, brkpt1.right, brkpt2.cmd,
+ brkpt2.right, dbg-test1.sh, list.right, watch1.right: Modify
+ dbg-test1.sh so we can test parameters. In the future though,
+ probably time to start a dbg-test2.sh
+
+ Makefile.am: add brkpt2 test.
+
+2002-09-14 15:39 rockyb
+
+ * debugger/tests/: brkpt2.cmd, brkpt2.right, brkpt2.tests,
+ run-brkpt2: Now that we have a real command file mechanism, use it
+ to test correct functioning of break, watch, watche, step, next,
+ continue and stack handling.
+
+2002-09-14 14:51 rockyb
+
+ * debugger/bashdb-cmds.inc: Missed place in renaming _hi to
+ _bashdb_hi
+
+2002-09-14 12:19 rockyb
+
+ * debugger/: NEWS, TODO, bashdb, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-init.inc, bashdb-sig.inc: Variable name cleanup: more now
+ start with _bashdb
+
+2002-09-14 12:09 rockyb
+
+ * debugger/bashdb-cmds.inc: Some variable name cleanup and removal.
+
+2002-09-14 11:40 rockyb
+
+ * debugger/bashdb-cmds.inc: Correct "restart" command when running
+ via "bash -c ..."
+
+2002-09-14 07:36 rockyb
+
+ * debugger/: NEWS, bashdb-init.inc, bashdb-io.inc: Small cleanups.
+ BOGUS file renamed to *BOGUS*.
+
+2002-09-14 07:21 rockyb
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-init.inc, bashdb-main.inc: Clean up code for debugger source
+ command. Add "info source"
+
+2002-09-14 01:09 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-init.inc: Slightly cleaner
+ code.
+
+2002-09-14 00:51 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, bashdb-init.inc: Command files
+ now nest and pick up where they left off in between script
+ execution. There are still some minor cleanups and a small bug here
+ or there.
+
+2002-09-13 23:04 rockyb
+
+ * shell.c, shell.h, variables.c, debugger/bashdb-cmds.inc,
+ debugger/bashdb-fns.inc, debugger/bashdb-init.inc,
+ debugger/bashdb-io.inc: bash --debugger -c "..." now works. (Bug in
+ restarting currently though. restart now picks up full bash name
+ from BASH environment variable.
+
+ To accomplish the above, environment variable BASH_EXECUTION_STRING
+ was added which contains the contents what was passed after -c.
+
+2002-09-13 21:38 rockyb
+
+ * error.c: Fix bug when no source file and have an error.
+
+2002-09-13 21:24 rockyb
+
+ * debugger/: NEWS, bashdb-brk.inc: Fix bug where "watche x > 24"
+ was creating output to file 24
+
+2002-09-13 21:23 rockyb
+
+ * debugger/tests/watch1.right: Now, more right.
+
+2002-09-13 15:34 rockyb
+
+ * configure.in, doc/bashdb.texi: Getting ready for 0.24 release.
+
+2002-09-13 15:24 rockyb
+
+ * tests/: func.right, trap.right: Updated for new function.
+
+2002-09-13 15:24 rockyb
+
+ * debugger/tests/: brkpt1.right, list.right: Update for merged
+ commands.
+
+2002-09-13 15:09 rockyb
+
+ * debugger/NEWS: Add: Function names now supported by changing the
+ semantics of declare -F.
+
+2002-09-13 15:09 rockyb
+
+ * builtins/declare.def, doc/bashref.texi: Change semantics of
+ declare -F: now adds source file and line number.
+
+2002-09-13 15:06 rockyb
+
+ * execute_cmd.c, debugger/NEWS, doc/bashdb.texi,
+ tests/dbg-support.right, tests/dbg-support.tests: Function names
+ now supported. As a result, can now set breakpoints on them.
+ However in non-interactive mode the line number is wrong. It is the
+ caller line.
+
+2002-09-13 15:03 rockyb
+
+ * debugger/: TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ tests/list.right: Function names now supported. As a result, can
+ now set breakpoints on them. However in non-interactive mode the
+ line number is wrong. It is the caller line.
+
+ As a result of the above, now extended these commands to include
+ linespecs: continue, break, list.
+
+2002-09-13 11:12 rockyb
+
+ * debugger/tests/dbg-test1.sh: Remove CVS id line which messes up
+ regression testing.
+
+2002-09-12 18:35 rockyb
+
+ * debugger/tests/: list.cmd, list.right: More tests, better doc on
+ tests.
+
+2002-09-12 18:21 rockyb
+
+ * builtins/evalstring.c: Just doc/grammar changes.
+
+2002-09-12 18:19 rockyb
+
+ * MANIFEST: Add new file: dbg-test1.sub
+
+2002-09-12 18:18 rockyb
+
+ * debugger/: NEWS, bashdb-cmds.inc, bashdb-io.inc: Add list
+ file:line. Rename internal routines from print to list since that's
+ what the command is called.
+
+2002-09-12 18:17 rockyb
+
+ * debugger/tests/dbg-test1.sub: Now have sourced file in debugger
+ test.
+
+2002-09-12 18:16 rockyb
+
+ * debugger/tests/: brkpt1.right, dbg-test1.sh, list.cmd,
+ list.right: Add check of list file:line.
+
+2002-09-12 18:10 rockyb
+
+ * tests/dbg-support.sub: Minor.
+
+2002-09-12 16:17 rockyb
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc: Change names of
+ variables so as not to conflict with user variables. Thus more of
+ them are prefaced with "_bashdb_." May have introduced a bug in the
+ renaming though...
+
+2002-09-12 16:16 rockyb
+
+ * execute_cmd.c: List lines in "for var in" before each time it is
+ executed rather than just once. Line number setting also tries to
+ do the right thing so that error messages on the line are reported
+ correctly too.
+
+2002-09-12 16:10 rockyb
+
+ * tests/dbg-support.right: Make sure "for word in ..." gives line
+ number of "for" every time the for loop is executed, not just the
+ *first* time.
+
+2002-09-12 16:09 rockyb
+
+ * tests/: errors.right, errors.tests: Add checks on errors in "for
+ word in ..." loops. Should have line number of "for"
+
+2002-09-12 06:50 rockyb
+
+ * tests/: dbg-support.right, dbg-support.tests: Check that we list
+ a "for" line number.
+
+2002-09-12 06:44 rockyb
+
+ * command.h, execute_cmd.c, make_cmd.c, make_cmd.h, parse.y,
+ debugger/NEWS, debugger/TODO: Now list/stop line of "for" or
+ "select".
+
+2002-09-12 06:41 rockyb
+
+ * doc/bashdb.texi: Minor.
+
+2002-09-12 06:40 rockyb
+
+ * MANIFEST: Remove brkpt tests - usable ones under debugger/tests
+
+2002-09-11 22:36 rockyb
+
+ * debugger/TODO: Note more line number problems.
+
+2002-09-11 22:36 rockyb
+
+ * debugger/bashdb-sig.inc: Add cmd-loop loop in exit handler so we
+ in fact don't exit!
+
+2002-09-11 22:13 rockyb
+
+ * debugger/bashdb-fns.inc: Don't go into debugger command loop when
+ called from the debugger: (the caller is _bashdb_).
+
+2002-09-11 19:32 rockyb
+
+ * htdocs/index.html: Now list download by date descending.
+
+2002-09-11 18:40 rockyb
+
+ * doc/bashdb.texi: Small grammar change.
+
+2002-09-11 18:33 rockyb
+
+ * htdocs/index.html: Add link to documentation.
+
+2002-09-11 17:24 rockyb
+
+ * tests/: brkpt.right, brkpt.tests, brkpt1.test, brkpt2.test,
+ brkpt3.test, brkpt4.test, brkpt5.test, run-brkpt: Some of these are
+ now in debugger/tests
+
+2002-09-11 17:12 rockyb
+
+ * MANIFEST, configure.in: Getting ready for release 0.23
+
+2002-09-11 08:43 rockyb
+
+ * doc/bashdb.texi: Document recent changes to debugger: W suffix
+ on breakpoint/watchpoint numbers, break file:line Condition
+ 9999.
+
+2002-09-11 07:39 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-fns.inc, bashdb-init.inc,
+ tests/brkpt1.cmd, tests/brkpt1.right, tests/watch1.right: Add break
+ file:line syntax. Add counts on watchpoints and display of this on
+ listing. Display breakpoint number when adding. i
+
+2002-09-11 07:38 rockyb
+
+ * debugger/NEWS: Version 0.23 changes (so far)
+
+2002-09-11 00:36 rockyb
+
+ * debugger/bashdb-cmds.inc: Make safe for tampering with IFS.
+
+2002-09-10 13:29 rockyb
+
+ * debugger/tests/: list.cmd, list.right: Add tests of set/show
+ listsize.
+
+2002-09-10 13:25 rockyb
+
+ * debugger/bashdb-cmds.inc: Fix bug in comment without space after
+ #, e.g. #foo.
+
+2002-09-10 13:13 rockyb
+
+ * debugger/bashdb-cmds.inc: Improve comment pattern so "#foo" works
+ as does "# foo."
+
+2002-09-10 12:53 rockyb
+
+ * debugger/tests/Makefile.am: Add watch1 test.
+
+2002-09-10 12:49 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc: Bugs fixed in getting
+ watch command regression tests hammered out; eval now checks for
+ tty, listing watchpoints quotes expressions.
+
+2002-09-10 12:40 rockyb
+
+ * debugger/tests/: run-watch1, watch1.cmd, watch1.right,
+ watch1.tests: Add first watchpoint tests (enough that we can handle
+ with incomplete command files).
+
+2002-09-10 11:47 rockyb
+
+ * debugger/TODO: Cross a couple of things off the list.
+
+2002-09-10 11:39 rockyb
+
+ * Makefile.in: Make check now runs check in debugger as well.
+
+2002-09-10 11:02 rockyb
+
+ * debugger/bashdb-brk.inc: Test to see that line breaks are inside
+ lines Remove bug in not setting break condition correctly. Message
+ if no breakpoints have been set.
+
+2002-09-10 11:00 rockyb
+
+ * debugger/bashdb-cmds.inc: More crud in comments.
+
+2002-09-10 10:59 rockyb
+
+ * debugger/bashdb-cmds.inc: Removed some crud.
+
+2002-09-10 10:58 rockyb
+
+ * debugger/bashdb-cmds.inc: Rename to _bashdb_cmd_break to be
+ consistent in naming.
+
+2002-09-10 10:56 rockyb
+
+ * debugger/tests/: Makefile.am, brkpt1.cmd, brkpt1.right,
+ brkpt1.tests, run-brkpt1: Add breakpoint tests - or those that we
+ can test out right now...
+
+2002-09-10 10:55 rockyb
+
+ * debugger/tests/list.tests: More generic format.
+
+2002-09-10 09:47 rockyb
+
+ * tests/: dbg-list.right, dbg-list.tests, list.cmd, run-dbg-list:
+ Now located under debugger/tests
+
+2002-09-10 09:08 rockyb
+
+ * debugger/: Makefile.am, configure.in: Add support to create/run
+ regression tests in tests directory.
+
+2002-09-10 09:07 rockyb
+
+ * debugger/tests/.cvsignore: A fact of life.
+
+2002-09-10 09:06 rockyb
+
+ * debugger/tests/: Makefile.am, dbg-test1.sh, list.cmd, list.right,
+ list.tests, run-all, run-list, version: Debugger tests are now
+ separated from bash tests, so we can test that separately. And we
+ now use automake's code too!
+
+2002-09-10 00:06 rockyb
+
+ * doc/bashdb.texi: Remove some more gdb things with respect to I/O
+ redirection that just aren't here.
+
+2002-09-09 23:12 rockyb
+
+ * doc/bashdb.texi: More on the differences between x, eval and
+ print. Clean up some ugly grammar.
+
+2002-09-09 22:50 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc: Enable/disable of
+ watchpoints done. delete, enable and disable will allow suffix "w"
+ for watchpoint.
+
+2002-09-09 20:55 rockyb
+
+ * debugger/bashdb-help.inc: Add help for set command. Minor text
+ changes.
+
+2002-09-09 19:45 rockyb
+
+ * debugger/NEWS: Add case statement work.
+
+2002-09-09 19:41 rockyb
+
+ * .cvsignore: This too is (now) derived.
+
+2002-09-09 19:41 rockyb
+
+ * parse.y, tests/dbg-support.right, tests/dbg-support.tests: Wasn't
+ handling nested cases.
+
+2002-09-09 19:09 rockyb
+
+ * debugger/TODO: Update as appropriate.
+
+2002-09-09 19:02 rockyb
+
+ * debugger/TODO: Update as appropriate.
+
+2002-09-09 19:01 rockyb
+
+ * tests/: dbg-list.right, dbg-list.tests: Tests debugger list
+ command.
+
+2002-09-09 19:00 rockyb
+
+ * tests/: list.cmd, run-dbg-list: Test debugger list command.
+
+2002-09-09 18:59 rockyb
+
+ * command.h, execute_cmd.c, make_cmd.c, make_cmd.h, parse.y,
+ tests/dbg-support.right, tests/dbg-support.tests: Add line number
+ for beginning of case/select; debug now lists those lines.
+
+2002-09-09 18:56 rockyb
+
+ * tests/: brkpt.right, brkpt1.test, brkpt3.test, brkpt4.test,
+ brkpt5.test: Modify for current situation. These need to be redone
+ since they're wrong anyway. Split out status dbg tests?
+
+2002-09-09 17:16 rockyb
+
+ * Makefile.in: Add rule to make derived aclocal.m4.
+
+ Should get rid of Makefile.in and go with Makefile.am. But this
+ diverges bash even more.
+
+2002-09-09 14:26 rockyb
+
+ * MANIFEST: Add new file bashlocal.m4
+
+2002-09-09 14:25 rockyb
+
+ * bashlocal.m4, configure.in, cvscompile.sh: Add --lispdir to
+ configure and pass this along to debugger. Derived file aclocal.m4
+ no longer in repository. BASH-specific macros moved to bashlocal.m4
+
+2002-09-09 12:58 rockyb
+
+ * cvscompile.sh: Also need to run aclocal.
+
+2002-09-09 12:50 rockyb
+
+ * cvscompile.sh: Add missing debugger autoconf.
+
+2002-09-09 12:39 rockyb
+
+ * MANIFEST, cvscompile.sh, debugger/Makefile.am, debugger/TODO,
+ debugger/configure.in: Use Automake AM_LISPDIR rather than trying
+ to roll this code on my own (and failing). Thanks to Masatake
+ YAMATO!
+
+2002-09-09 12:37 rockyb
+
+ * debugger/NEWS: Add 0.22 features.
+
+2002-09-09 12:27 rockyb
+
+ * doc/bashdb.texi: Document watche. Put more command names in info
+ nodes. Move doc order around a little.
+
+2002-09-09 12:22 rockyb
+
+ * htdocs/index.html: Project page now points to Sourceforge
+ Summary, not Admin. Thanks to Masatake YAMATO.
+
+2002-09-08 18:57 rockyb
+
+ * debugger/bashdb-set.inc: Set/show commands
+
+2002-09-07 14:43 rockyb
+
+ * doc/bashdb.texi: Doc frame command. Small corrections to editing
+ in emacs.
+
+2002-09-07 14:41 rockyb
+
+ * debugger/bashdb-cmds.inc: Add frame command. Version command is
+ now a separate command.
+
+2002-09-07 14:35 rockyb
+
+ * debugger/bashdb-stack.inc: Get frame with args command hammered
+ out properly.
+
+2002-09-07 09:36 rockyb
+
+ * debugger/bashdb-io.inc: Some error correction and error message
+ on list command.
+
+2002-09-07 09:35 rockyb
+
+ * debugger/bashdb-cmds.inc: Ooops - forgot to allow set/show as
+ valid commands here. Move CVS Id to end.
+
+2002-09-07 09:09 rockyb
+
+ * MANIFEST, configure.in, debugger/Makefile.am,
+ debugger/bashdb-cmds.inc, debugger/bashdb-fns.inc,
+ debugger/bashdb-help.inc, debugger/bashdb-init.inc,
+ debugger/bashdb-io.inc, debugger/bashdb-main.inc, doc/bashdb.texi:
+ Start set/show commands. List now takes up where it left off.
+ Move some CVS id lines to the end to facilitate debugging Some
+ minor improvements.
+
+2002-09-06 03:06 rockyb
+
+ * debugger/: bashdb-brk.inc, bashdb-help.inc, bashdb-main.inc:
+ Minor formating changes or typos.
+
+2002-09-06 01:59 rockyb
+
+ * configure.in: Release change
+
+2002-09-06 01:56 rockyb
+
+ * debugger/Makefile.am: Include new guy bashdb-sig.inc.
+
+2002-09-06 00:52 rockyb
+
+ * doc/bashdb.texi: Today's update. All sections are at least
+ minimally done, so Manual minimally finished.
+
+2002-09-05 22:39 rockyb
+
+ * MANIFEST, debugger/bashdb-cmds.inc, debugger/bashdb-main.inc,
+ debugger/bashdb-sig.inc, tests/brkpt.right: Add signal handlers for
+ interrupt and exit. Now we catch when the program stopped and
+ report that.
+
+2002-09-05 22:37 rockyb
+
+ * debugger/TODO: Update as appropriate.
+
+2002-09-05 10:54 rockyb
+
+ * debugger/bashdb-main.inc: Slightly better?
+
+2002-09-05 10:53 rockyb
+
+ * debugger/bashdb-main.inc: Test to see if we are using a
+ debugger-enabled bash, and give up if not.
+
+2002-09-05 09:54 rockyb
+
+ * doc/bashdb.texi: Closer...
+
+2002-09-05 08:56 rockyb
+
+ * debugger/bashdb-brk.inc: Add null line + if in break command.
+
+2002-09-05 08:55 rockyb
+
+ * tests/: brkpt.right, brkpt2.test: Add test for null line + if
+ "break if" command
+
+2002-09-05 00:47 rockyb
+
+ * MANIFEST: Add in debugger breakpoint regression test.
+
+2002-09-05 00:47 rockyb
+
+ * tests/brkpt.tests: Put debugger bash in explicitly.
+
+2002-09-05 00:27 rockyb
+
+ * tests/run-all: To make work on Solaris's (and probably other's)
+ /bin/sh.
+
+2002-09-04 23:31 rockyb
+
+ * htdocs/index.html: Slight mods. Still plain as sin.
+
+2002-09-04 23:25 rockyb
+
+ * htdocs/index.html: Run through ispell.
+
+2002-09-04 23:22 rockyb
+
+ * htdocs/index.html: Correct group id.
+
+2002-09-04 23:10 rockyb
+
+ * htdocs/index.html: Lousy Web page.
+
+2002-09-04 22:24 rockyb
+
+ * debugger/TODO: Update.
+
+2002-09-04 22:12 rockyb
+
+ * configure.in: Rename release name.
+
+2002-09-04 22:11 rockyb
+
+ * tests/: bashdb-bp.tests, brkpt.right, brkpt.tests, brkpt1.test,
+ brkpt2.test, brkpt3.test, brkpt4.test, brkpt5.test, run-brkpt:
+ Regression tests for breakpoint. Actually the "right" file isn't
+ right due to a bug in debugger comand-file processing. However it
+ is largely right and this keeps us from breaking things even more.
+
+2002-09-04 22:09 rockyb
+
+ * tests/: run-dbg-is-fn, run-dbg-support: Just #!../bash lines and
+ perhaps clue Emacs in that these are scripts.
+
+2002-09-04 22:08 rockyb
+
+ * debugger/: bashdb, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-fns.inc, bashdb-help.inc, bashdb-init.inc, bashdb-io.inc:
+ Redo the way breakpoints are handled. Is more like gdb than
+ perltdb.
+
+ Now have enable/disable and breakpoint conditions.
+
+ Some other minor changes. Like testing to see if we have an
+ attached tty.
+
+2002-09-03 13:49 rockyb
+
+ * MANIFEST: We install as bash.info, not bashref.
+
+2002-09-03 13:47 rockyb
+
+ * doc/bashdb.texi: Minor corrections. Mostly to options-processing
+ area.
+
+2002-09-03 13:22 rockyb
+
+ * debugger/bashdb: Change option -s to -q as it is in gdb.
+
+2002-09-03 13:09 rockyb
+
+ * doc/.cvsignore: Forgot yet another...
+
+2002-09-03 13:08 rockyb
+
+ * doc/.cvsignore: Boy, doc's have lots of temporary files!
+
+2002-09-03 13:00 rockyb
+
+ * cvscompile.sh: Script for kicking everything off from CVS
+ initially.
+
+2002-09-03 12:47 rockyb
+
+ * debugger/: bashdb, bashdb-init.inc: Add more options - x: command
+ file run, n: no init file run, -V show version, and -s silient. All
+ compatible with GDB.
+
+2002-09-03 12:36 rockyb
+
+ * debugger/bashdb-help.inc: Minor change to refer to doc.
+
+2002-09-03 12:35 rockyb
+
+ * doc/fdl.texi: Perhaps should not be in CVS since I didn't write.
+ But it is part of distribution. Remove later if can figure out a
+ way to get it from somewhere else.
+
+2002-09-03 12:34 rockyb
+
+ * doc/gpl.texi: Perhaps should not be in CVS since I didn't write.
+ However it is part of distribution. Remove later if can figure out
+ a better way.
+
+2002-09-03 12:30 rockyb
+
+ * debugger/Makefile.am: Add newly-created file bashdb-io.inc
+
+2002-09-03 12:28 rockyb
+
+ * MANIFEST: Add missing files to make bashdb.texi documentation and
+ build debugger.
+
+2002-09-03 12:25 rockyb
+
+ * doc/Makefile.in: Incorrectly spelled directory in TEXINPUTS. Now
+ should build bashdb.texi correctly.
+
+2002-09-03 07:25 rocky
+
+ * .cvsignore: Ignore distribution file.
+
+2002-09-03 07:24 rocky
+
+ * Makefile.in: Remove distribution tar.gz file. Also tilde files
+ (from CVS checkouts).
+
+2002-09-03 07:22 rocky
+
+ * doc/.cvsignore: Many derived files here.
+
+2002-09-03 07:18 rocky
+
+ * MANIFEST: Add missing files for making a distribution.
+
+2002-09-03 07:00 rocky
+
+ * tests/errors.right: Previous version was completely bogus.
+
+2002-09-02 23:22 rocky
+
+ * doc/bashdb.texi: Changes for today: sections reorganized, gdb
+ stuff chopped out. Now has a command index. And text modified for
+ the BASH debugger.
+
+ About 2/3 of the way correct.
+
+2002-09-02 23:19 rocky
+
+ * doc/Makefile.in: Change to allow automatic build of bashdb doc.
+
+2002-09-02 23:18 rocky
+
+ * support/texi2dvi: Perhaps shouldn't be in CVS, but do so for now.
+
+2002-09-02 23:18 rocky
+
+ * support/man2html: Perhaps shouldn't be in CVS - but do so for
+ now...x
+
+2002-09-02 23:17 rocky
+
+ * support/Makefile.in: Add missing CC_FOR_BUILD
+
+2002-09-02 22:37 rocky
+
+ * debugger/: TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-init.inc, bashdb-io.inc, bashdb-main.inc,
+ bashdb-stack.inc: Major cleanup/expansion and a
+ bug/misunderstanding removed. Now reads in files once. Unset
+ breakpoint code no longer inlined. "info files" now works Stack
+ trace bug when via "info stack" fixed. bashdb-io.inc created.
+
+2002-09-02 15:29 rocky
+
+ * debugger/: bashdb, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-fns.inc, bashdb-help.inc, bashdb-init.inc: Add info command.
+ In the process, we now allow getting tty and args.
+
+2002-09-02 00:36 rocky
+
+ * support/: mkdist, texi2html: Not sure if this should be here. For
+ now okay.
+
+2002-09-02 00:36 rocky
+
+ * MANIFEST: Add more good stuff like the bashdb reference.
+
+2002-09-02 00:35 rocky
+
+ * debugger/TODO: Revise as appropriate.
+
+2002-09-02 00:32 rocky
+
+ * doc/bashdb.texi: [no log message]
+
+2002-09-02 00:29 rocky
+
+ * doc/bashdb.texi: Grossly inaccurate but there's stuff in here
+ that is in fact correct. More later...
+
+2002-09-02 00:28 rocky
+
+ * debugger/bashdb-help.inc: Update to reflect current situation.
+
+2002-09-02 00:16 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-help.inc, bashdb-stack.inc:
+ Add bt backtrace as an alias for where, or T. Add parameter to
+ specify how many frames to list on bt.
+
+2002-09-01 19:57 rocky
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-stack.inc:
+ Mostly formatting. Change basic indent from 4 to 2. Stack commands
+ were duplicated in bashdb-cmds.inc, and a file identifier incorrect
+ in bashdb-brk.inc
+
+2002-09-01 11:05 rocky
+
+ * debugger/: bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-main.inc: Minor: correct function comments
+ at top of file.
+
+2002-09-01 11:05 rocky
+
+ * debugger/Makefile.am: Break into more smaller files.
+
+2002-09-01 11:04 rocky
+
+ * debugger/bashdb-stack.inc: Break away from bashdb-cmds.inc
+
+2002-09-01 10:41 rocky
+
+ * debugger/bashdb-brk.inc: Things with breakpoints are now in a
+ separate file.
+
+2002-09-01 10:40 rocky
+
+ * debugger/bashdb-help.inc: Things with breakpoints and watchpoints
+ (and later actions) are now their own separate file
+
+2002-09-01 10:39 rocky
+
+ * debugger/bashdb-help.inc: Help is now it's own separate file.
+
+2002-09-01 05:46 rocky
+
+ * MANIFEST: Add debugger files
+
+2002-09-01 05:32 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc: Change pe to x. On
+ watch, set initial value (and display it). Allow dump of variable.
+ Add internal function _is_var.
+
+2002-09-01 04:08 rocky
+
+ * debugger/bashdb-fns.inc: Separate watch variables from watch
+ expressions
+
+2002-09-01 04:07 rocky
+
+ * debugger/bashdb-init.inc: Add array to note if watchpoint is
+ arithmetic or not.
+
+2002-09-01 04:06 rocky
+
+ * debugger/bashdb-cmds.inc: Separate out watch variable and watch
+ expressions.
+
+2002-09-01 02:47 rocky
+
+ * debugger/bashdb-init.inc: Set default next/step default value.
+
+2002-08-31 23:34 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-init.inc: Make more like gdb.
+ Implement aliases: run, shell. Add Init file startup ~.bashdbinit.
+ Save args on print and pe.
+
+2002-08-30 22:33 rocky
+
+ * tests/: dbg-support.right, dbg-support.tests: Add tests to make
+ sure command substitution traces properly and produces the correct
+ call stack.
+
+2002-08-30 22:31 rocky
+
+ * tests/: errors.right, errors.sub, errors.tests: Add tests that
+ make sure sourced file names appear.
+
+2002-08-30 20:44 rocky
+
+ * error.c: Now correctly reports the file location in the presence
+ of sourced files.
+
+2002-08-30 20:44 rocky
+
+ * debugger/CHANGES: Note watchpoints, and line number changes.
+
+2002-08-30 16:17 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc: Small cleanups.
+ Remove function break code which doesn't work anyway.
+
+2002-08-30 12:46 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: Add
+ watchpoints. Help and commands now allow unique prefix, e.g. del
+ for delete.
+
+2002-08-30 12:20 rocky
+
+ * debugger/AUTHORS: Again.
+
+2002-08-30 12:18 rocky
+
+ * debugger/AUTHORS: More precies.
+
+2002-08-30 12:18 rocky
+
+ * subst.c: Reset line number if interactive.
+
+2002-08-30 12:17 rocky
+
+ * trap.c: Respect function tracing if "set -o fntrace is in
+ effect."
+
+2002-08-30 00:55 rocky
+
+ * debugger/TODO: Add watchpoints as requested by Bert Caridad.
+
+2002-08-28 23:27 rocky
+
+ * builtins/fc.def: Added new extra parameter (renumber_line) on
+ parse_and_execute.
+
+2002-08-27 20:56 rocky
+
+ * debugger/bashdb-cmds.inc: Fixed bug Inadvertently added by change
+ \? to ?. (Is now '?') to help emacs script editing.
+
+2002-08-27 20:52 rocky
+
+ * debugger/bashdb-cmds.inc: Doc continue enhancement.
+
+2002-08-27 20:51 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc: clearing breakpoints
+ now works via a workaround.
+
+2002-08-27 20:48 rocky
+
+ * debugger/TODO: Update to reflect current situation.
+
+2002-08-26 23:53 rocky
+
+ * debugger/TODO: Did "up" and "down" - remove from list.
+
+2002-08-26 23:52 rocky
+
+ * debugger/bashdb.el: Add back in "up" and "down" which we have
+ (but perldb doesn't).
+
+2002-08-26 23:51 rocky
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-init.inc: "Up [count} and down {count] working. Stack trace
+ is now more like gdb than perl. Probably will move more in that
+ direction, too.
+
+ Note: There may be some funniness in FUNCNAME BASH_SOURCE and
+ BASH_LINENO.
+
+2002-08-26 09:22 rocky
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-init.inc: S !pat now works. Some alphabetization of commands
+ and more subroutings in bashdb-cmds start _bashdb_cmd_. init Has
+ where we are in stack for getting ready to put in up and down.
+
+2002-08-26 09:20 rocky
+
+ * debugger/TODO: Update.
+
+2002-08-26 09:20 rocky
+
+ * debugger/NEWS: More features - note that we're useful even if you
+ don't use the debugger.
+
+2002-08-26 08:06 rocky
+
+ * debugger/bashdb-cmds.inc: This time, for sure!
+
+2002-08-26 08:05 rocky
+
+ * debugger/bashdb-cmds.inc: - now lists up to _curline Bug in
+ restart for bash --debugger
+
+2002-08-26 06:55 rocky
+
+ * debugger/bashdb: Minor changes.
+
+2002-08-26 05:45 rocky
+
+ * builtins/evalstring.c, debugger/CHANGES, debugger/TODO,
+ tests/errors.right: Fix off-by-one line number error in command
+ subtitutions $(), `` and {}.
+
+2002-08-25 23:10 rocky
+
+ * debugger/bashdb-cmds.inc: Help for individual commands.
+
+2002-08-25 23:09 rocky
+
+ * debugger/TODO: Added emacs lisp install. help on commands and
+ fixed substutution line numbers.
+
+2002-08-25 23:08 rocky
+
+ * debugger/: .cvsignore, Makefile.am, configure.in: batch-compile
+ and install emacs lisp files. (First cut: no doubt there's room for
+ improvement.)
+
+2002-08-25 20:27 rocky
+
+ * debugger/bashdb-cmds.inc: A couple more.
+
+2002-08-25 20:17 rocky
+
+ * debugger/bashdb-cmds.inc: Add long-form of commands.
+
+2002-08-25 20:17 rocky
+
+ * debugger/bashdb: Replace a [ with [[
+
+2002-08-25 17:50 rocky
+
+ * debugger/CHANGES: Note line number change in command
+ substitution.
+
+2002-08-25 17:42 rocky
+
+ * bashline.c, jobs.c, parse.y, shell.c, subst.c, trap.c,
+ variables.c, builtins/common.h, builtins/eval.def,
+ builtins/evalfile.c, builtins/evalstring.c: Line number fix on
+ sourced files and command substitution. Added additional parameter
+ to parse_and_execute to indicate whether or not to reset the line
+ number.
+
+2002-08-25 17:23 rocky
+
+ * tests/dbg-support.right: Really this is the same as version 1.3.
+ Changes in output were really bugs! Sourced file needs line number
+ resetting.
+
+2002-08-25 16:12 rocky
+
+ * tests/dbg-support.tests: A couple more command substitution tests
+ and comments.
+
+2002-08-25 13:56 rocky
+
+ * tests/: dbg-support.right, dbg-support.tests, errors.right:
+ Update for line number change in running subshells.
+
+2002-08-25 13:13 rocky
+
+ * builtins/evalstring.c: Don't reset line number in running
+ subshells. This makes it hard for a debugger to track down where
+ you were.
+
+ Would like to understand the benefit of this though.
+
+2002-08-25 12:14 rocky
+
+ * doc/.cvsignore: add another derived file.
+
+2002-08-25 12:13 rocky
+
+ * debugger/TODO: Another bug with subshells found.
+
+2002-08-25 09:58 rocky
+
+ * Makefile.in: Remake pathnames.h if it is missing
+
+2002-08-25 09:58 rocky
+
+ * debugger/: TODO, bashdb-cmds.inc: Fix restart in bash --debugger
+
+2002-08-25 02:18 rocky
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-init.inc,
+ bashdb-main.inc: Minor variable name corrections and changes.
+ Mostly to do with version command. Typo in bashdb.
+
+2002-08-25 02:04 rocky
+
+ * configure.in, debugger/AUTHORS, debugger/Makefile.am,
+ debugger/PERMISSION, debugger/TODO, debugger/bashdb,
+ debugger/bashdb-cmds.inc, debugger/bashdb-fns.inc,
+ debugger/bashdb-init.inc, debugger/bashdb-main.inc: Last minute
+ cleanups before initial Savannah CVS import.
+
+2002-08-24 18:13 rocky
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc: Mostly small
+ extensions to make this match perl5db: - Add Subroutine list (S)
+ - Add list functions (l func) - Add variable dump (V) - Note
+ where we haven't finished implementing parameters - Fix help
+
+ bashdb: rename functions to more system-like names (so won't appear
+ in function list)
+
+2002-08-24 18:08 rocky
+
+ * debugger/: TODO, NEWS: Update as appropriate.
+
+2002-08-24 16:57 rocky
+
+ * tests/: dbg-fns, dbg-fns.dat, dbg-is-fn.right, dbg-is-fn.tests,
+ dbg-support.right, run-dbg-is-fn: New tests: dbg-is-fn. Correct
+ output on dbg-support.right and set up for another new test
+
+2002-08-24 16:51 rocky
+
+ * tests/: dbg-support.right, dbg-support.tests, run-dbg-support:
+ CVS cleanup: add CVS Id line. Correct ooutput and allow tests to
+ be executable as is.
+
+2002-08-24 00:58 rocky
+
+ * debugger/TODO: Fixed "continue"
+
+2002-08-24 00:55 rocky
+
+ * debugger/: bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc:
+ Breakpoints now work! setting, deleting, clearing all, listing.
+
+2002-08-23 14:15 rocky
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc: CVS cleanup:
+ add CVS lines
+
+2002-08-23 14:13 rocky
+
+ * debugger/bashdb-fns.inc: Command "Continue" ('c") now runs
+ silently.
+
+2002-08-23 14:11 rocky
+
+ * .cvsignore: More of the same.
+
+2002-08-23 12:16 rocky
+
+ * tests/: dbg-support.right, dbg-support.sub, dbg-support.tests,
+ run-dbg-support: Debugging extensions to bash test.
+
+2002-08-23 08:39 rocky
+
+ * tests/.cvsignore: The usual.
+
+2002-08-23 08:35 rocky
+
+ * .cvsignore, builtins/.cvsignore: CVS cleanup.
+
+2002-08-23 08:31 rocky
+
+ * lib/: tilde/.cvsignore, sh/.cvsignore: The usual.
+
+2002-08-23 08:30 rocky
+
+ * lib/termcap/.cvsignore: This usual.
+
+2002-08-23 08:27 rocky
+
+ * .cvsignore, lib/readline/.cvsignore, lib/readline/doc/Makefile,
+ support/texi2dvi, support/texi2html: CVS cleanup.
+
+2002-08-23 08:22 rocky
+
+ * shell.c: Move execution of debugger init after setting up
+ argument list $0 and $*.
+
+2002-08-23 07:57 rocky
+
+ * debugger/: TODO, bashdb, bashdb-fns.inc, bashdb-init.inc: Get
+ dual execution of "bashdb" and "bash --debugger" with respect to
+ command-line arguments. In bashdb however, $0 is bashdb not the
+ program.
+
+2002-08-23 07:56 rocky
+
+ * debugger/bashdb.el: Remove looking for "--emacs" option in
+ calling bashdb. This is used in perldb but I don't know if we need
+ it here. It might get added later when we know what this is about
+ and decide it's necessary.
+
+2002-08-23 00:19 rocky
+
+ * examples/loadables/.cvsignore,
+ examples/loadables/perl/.cvsignore, lib/.cvsignore,
+ lib/glob/.cvsignore, lib/malloc/.cvsignore: The usual.
+
+2002-08-23 00:18 rocky
+
+ * doc/.cvsignore: The usual
+
+2002-08-23 00:17 rocky
+
+ * .cvsignore, array.h, command.h, configure.in, flags.h,
+ pathnames.h.in, shell.c, variables.h, builtins/evalfile.c,
+ builtins/source.def, doc/bashref.texi: "bash --debugger" now kicks
+ things off.
+
+2002-08-23 00:13 rocky
+
+ * .cvsignore, builtins/.cvsignore, support/.cvsignore,
+ examples/.cvsignore: The usual.
+
+2002-08-23 00:08 rocky
+
+ * debugger/: bashdb, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-init.inc, bashdb-main.inc, bashdb.el: Changes so that we can
+ support "bash --debugger"
+
+2002-08-22 23:29 rocky
+
+ * debugger/: CHANGES, TODO: Update to reflect current state of
+ things.
+
+2002-08-22 08:13 rocky
+
+ * debugger/bashdb: _cleanup -> _bashdb_cleanup
+
+2002-08-22 08:03 rocky
+
+ * debugger/bashdb: Bug: not handling -T correctly. Also add emacs
+ mode.
+
+2002-08-22 07:58 rocky
+
+ * debugger/: Makefile.am, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-init.inc, bashdb-main.inc: Split bashdb-fns into multiple
+ *.inc files
+
+2002-08-22 07:56 rocky
+
+ * debugger/.cvsignore: Yet more of the usual ignored files...
+
+2002-08-22 07:54 rocky
+
+ * debugger/.cvsignore: CVS: Useful file.
+
+2002-08-21 19:53 rocky
+
+ * debugger/: CHANGES, bashdb, bashdb-main.inc: Now source the file
+ to be debugged rather than use that hacky temp file. x
+
+2002-08-20 13:48 rocky
+
+ * Makefile.in: Include debugger in installing
+
+2002-08-20 12:56 rocky
+
+ * tests/array.right: add BASH_LINENO
+
+2002-08-20 12:17 rocky
+
+ * tests/: array.right, run-all, shopt.right: Revise for new
+ options. run-all now allows running a specified set of tests
+
+2002-08-20 12:15 rocky
+
+ * builtins/set.def: Add fntrace or -d option
+
+2002-08-20 12:14 rocky
+
+ * array.c, execute_cmd.c, flags.c, make_cmd.c, shell.c,
+ variables.c, builtins/evalfile.c: Add BASH_LINENO, BASH_SOURCE_FILE
+ arrays Turn FUNCNAME into an ARRAY. Add fntrace or -d set option
+
+2002-08-20 12:10 rocky
+
+ * debugger/: bashdb, bashdb-main.inc: Bogosity in assuming
+ single-file script removed. Now tracks source file correctly (in
+ conjunction with changes in bash)
+
+2002-08-20 12:08 rocky
+
+ * debugger/bashdb.el: [no log message]
+
+2002-08-20 12:07 rocky
+
+ * debugger/bashdb.el: Add GPL
+
+2002-08-20 12:05 rocky
+
+ * debugger/README: Add CVS id line
+
+2002-08-20 12:05 rocky
+
+ * debugger/README: No longer a modification but a rewrite. Note
+ that bashdb now requires my patches.
+
+2002-08-20 12:04 rocky
+
+ * debugger/: AUTHORS, CHANGES, COPYING, ChangeLog, INSTALL,
+ Makefile.am, NEWS, TODO, configure.in: Automake'd and autoconf'd
+
+2002-08-20 11:34 rocky
+
+ * debugger/bashdb-main.inc: Add stack trace. Some typos corrected.
+
+2002-08-20 11:31 rocky
+
+ * debugger/bashdb-main.inc: Add GPL
+
+2002-08-20 11:16 rocky
+
+ * AUTHORS, CHANGES, COMPAT, COPYING, INSTALL, MANIFEST,
+ Makefile.in, NEWS, NOTES, POSIX, RBASH, README, Y2K, alias.c,
+ alias.h, array.c, array.h, arrayfunc.c, arrayfunc.h, bashansi.h,
+ bashhist.c, bashhist.h, bashintl.h, bashjmp.h, bashline.c,
+ bashline.h, bashtypes.h, bracecomp.c, braces.c, builtins.h,
+ command.h, config-bot.h, config-top.h, config.h.in, configure.in,
+ conftypes.h, copy_cmd.c, dispose_cmd.c, dispose_cmd.h, error.c,
+ error.h, eval.c, execute_cmd.c, execute_cmd.h, expr.c, externs.h,
+ findcmd.c, findcmd.h, flags.c, flags.h, general.c, general.h,
+ hashcmd.c, hashcmd.h, hashlib.c, hashlib.h, input.c, input.h,
+ jobs.c, jobs.h, list.c, locale.c, mailcheck.c, mailcheck.h,
+ make_cmd.c, make_cmd.h, mksyntax.c, nojobs.c, parse.y, parser.h,
+ patchlevel.h, pathexp.c, pathexp.h, pcomplete.c, pcomplete.h,
+ pcomplib.c, print_cmd.c, quit.h, redir.c, redir.h, shell.c,
+ shell.h, sig.c, sig.h, siglist.c, siglist.h, stringlib.c, subst.c,
+ subst.h, syntax.h, test.c, test.h, trap.c, trap.h, unwind_prot.c,
+ unwind_prot.h, variables.c, variables.h, version.c, xmalloc.c,
+ xmalloc.h, CWRU/PLATFORMS, CWRU/README, CWRU/changelog,
+ CWRU/mh-folder-comp, CWRU/sh-redir-hack, CWRU/misc/bison,
+ CWRU/misc/errlist.c, CWRU/misc/hpux10-dlfcn.h,
+ CWRU/misc/open-files.c, CWRU/misc/sigs.c, CWRU/misc/sigstat.c,
+ builtins/Makefile.in, builtins/alias.def, builtins/bashgetopt.c,
+ builtins/bashgetopt.h, builtins/bind.def, builtins/break.def,
+ builtins/builtin.def, builtins/cd.def, builtins/colon.def,
+ builtins/command.def, builtins/common.c, builtins/common.h,
+ builtins/complete.def, builtins/declare.def, builtins/echo.def,
+ builtins/enable.def, builtins/eval.def, builtins/evalfile.c,
+ builtins/evalstring.c, builtins/exec.def, builtins/exit.def,
+ builtins/fc.def, builtins/fg_bg.def, builtins/getopt.c,
+ builtins/getopt.h, builtins/getopts.def, builtins/hash.def,
+ builtins/help.def, builtins/history.def, builtins/inlib.def,
+ builtins/jobs.def, builtins/kill.def, builtins/let.def,
+ builtins/mkbuiltins.c, builtins/printf.def, builtins/psize.c,
+ builtins/psize.sh, builtins/pushd.def, builtins/read.def,
+ builtins/reserved.def, builtins/return.def, builtins/set.def,
+ builtins/setattr.def, builtins/shift.def, builtins/shopt.def,
+ builtins/source.def, builtins/suspend.def, builtins/test.def,
+ builtins/times.def, builtins/trap.def, builtins/type.def,
+ builtins/ulimit.def, builtins/umask.def, builtins/wait.def,
+ cross-build/beos-sig.h, cross-build/cygwin32.cache,
+ cross-build/opennt.cache, cross-build/win32sig.h,
+ cross-build/x86-beos.cache, doc/FAQ, doc/INTRO, doc/Makefile.in,
+ doc/README, doc/article.ms, doc/bash.1, doc/bashbug.1,
+ doc/bashref.texi, doc/builtins.1, doc/htmlpost.sh, doc/rbash.1,
+ doc/texinfo.tex, examples/bashdb/PERMISSION,
+ examples/bashdb/bashdb, examples/bashdb/bashdb.el,
+ examples/complete/complete-examples,
+ examples/complete/complete.freebsd,
+ examples/complete/complete.gnu-longopt,
+ examples/complete/complete.ianmac,
+ examples/complete/complete2.ianmac, examples/functions/array-stuff,
+ examples/functions/array-to-string, examples/functions/autoload,
+ examples/functions/autoload.v2, examples/functions/autoload.v3,
+ examples/functions/basename, examples/functions/basename2,
+ examples/functions/coproc.bash, examples/functions/coshell.README,
+ examples/functions/coshell.bash, examples/functions/csh-compat,
+ examples/functions/dirfuncs, examples/functions/dirname,
+ examples/functions/emptydir, examples/functions/exitstat,
+ examples/functions/external, examples/functions/fact,
+ examples/functions/fstty, examples/functions/func,
+ examples/functions/gethtml, examples/functions/getoptx.bash,
+ examples/functions/inetaddr, examples/functions/inpath,
+ examples/functions/isnum.bash, examples/functions/isnum2,
+ examples/functions/isvalidip, examples/functions/jdate.bash,
+ examples/functions/jj.bash, examples/functions/keep,
+ examples/functions/ksh-cd, examples/functions/ksh-compat-test,
+ examples/functions/kshenv, examples/functions/login,
+ examples/functions/lowercase, examples/functions/manpage,
+ examples/functions/mhfold, examples/functions/notify.bash,
+ examples/functions/pathfuncs, examples/functions/recurse,
+ examples/functions/repeat2, examples/functions/repeat3,
+ examples/functions/seq, examples/functions/seq2,
+ examples/functions/shcat, examples/functions/shcat2,
+ examples/functions/sort-pos-params, examples/functions/substr,
+ examples/functions/substr2, examples/functions/term,
+ examples/functions/whatis, examples/functions/whence,
+ examples/functions/which, examples/functions/xalias.bash,
+ examples/functions/xfind.bash, examples/loadables/Makefile.in,
+ examples/loadables/README, examples/loadables/basename.c,
+ examples/loadables/cat.c, examples/loadables/cut.c,
+ examples/loadables/dirname.c, examples/loadables/finfo.c,
+ examples/loadables/getconf.c, examples/loadables/getconf.h,
+ examples/loadables/head.c, examples/loadables/hello.c,
+ examples/loadables/id.c, examples/loadables/ln.c,
+ examples/loadables/logname.c, examples/loadables/mkdir.c,
+ examples/loadables/necho.c, examples/loadables/pathchk.c,
+ examples/loadables/print.c, examples/loadables/printenv.c,
+ examples/loadables/push.c, examples/loadables/realpath.c,
+ examples/loadables/rmdir.c, examples/loadables/sleep.c,
+ examples/loadables/sync.c, examples/loadables/tee.c,
+ examples/loadables/template.c, examples/loadables/truefalse.c,
+ examples/loadables/tty.c, examples/loadables/uname.c,
+ examples/loadables/unlink.c, examples/loadables/whoami.c,
+ examples/loadables/perl/Makefile.in,
+ examples/loadables/perl/README, examples/loadables/perl/bperl.c,
+ examples/loadables/perl/iperl.c, examples/misc/aliasconv.bash,
+ examples/misc/aliasconv.sh, examples/misc/cshtobash,
+ examples/misc/suncmd.termcap, examples/obashdb/PERMISSION,
+ examples/obashdb/README, examples/obashdb/bashdb,
+ examples/obashdb/bashdb.fns, examples/obashdb/bashdb.pre,
+ examples/scripts/adventure.sh, examples/scripts/bcsh.sh,
+ examples/scripts/cat.sh, examples/scripts/center,
+ examples/scripts/dd-ex.sh, examples/scripts/fixfiles.bash,
+ examples/scripts/hanoi.bash, examples/scripts/inpath,
+ examples/scripts/krand.bash, examples/scripts/line-input.bash,
+ examples/scripts/nohup.bash, examples/scripts/precedence,
+ examples/scripts/randomcard.bash, examples/scripts/scrollbar,
+ examples/scripts/scrollbar2, examples/scripts/self-repro,
+ examples/scripts/showperm.bash, examples/scripts/shprompt,
+ examples/scripts/spin.bash, examples/scripts/timeout,
+ examples/scripts/vtree2, examples/scripts/vtree3,
+ examples/scripts/vtree3a, examples/scripts/websrv.sh,
+ examples/scripts/xterm_title, examples/scripts/zprintf,
+ examples/scripts.noah/PERMISSION, examples/scripts.noah/README,
+ examples/scripts.noah/aref.bash,
+ examples/scripts.noah/bash.sub.bash,
+ examples/scripts.noah/bash_version.bash,
+ examples/scripts.noah/meta.bash, examples/scripts.noah/mktmp.bash,
+ examples/scripts.noah/number.bash,
+ examples/scripts.noah/prompt.bash,
+ examples/scripts.noah/remap_keys.bash,
+ examples/scripts.noah/require.bash,
+ examples/scripts.noah/send_mail.bash,
+ examples/scripts.noah/shcat.bash,
+ examples/scripts.noah/source.bash,
+ examples/scripts.noah/string.bash, examples/scripts.noah/stty.bash,
+ examples/scripts.noah/y_or_n_p.bash,
+ examples/scripts.v2/PERMISSION, examples/scripts.v2/README,
+ examples/scripts.v2/arc2tarz, examples/scripts.v2/bashrand,
+ examples/scripts.v2/cal2day.bash, examples/scripts.v2/cdhist.bash,
+ examples/scripts.v2/corename, examples/scripts.v2/fman,
+ examples/scripts.v2/frcp, examples/scripts.v2/lowercase,
+ examples/scripts.v2/ncp, examples/scripts.v2/newext,
+ examples/scripts.v2/nmv, examples/scripts.v2/pages,
+ examples/scripts.v2/pf, examples/scripts.v2/pmtop,
+ examples/scripts.v2/ren, examples/scripts.v2/rename,
+ examples/scripts.v2/repeat, examples/scripts.v2/shprof,
+ examples/scripts.v2/untar, examples/scripts.v2/uudec,
+ examples/scripts.v2/uuenc, examples/scripts.v2/vtree,
+ examples/scripts.v2/where, examples/startup-files/Bash_aliases,
+ examples/startup-files/Bash_profile,
+ examples/startup-files/Bashrc.bfox, examples/startup-files/README,
+ examples/startup-files/bash-profile, examples/startup-files/bashrc,
+ examples/startup-files/apple/README,
+ examples/startup-files/apple/aliases,
+ examples/startup-files/apple/bash.defaults,
+ examples/startup-files/apple/environment,
+ examples/startup-files/apple/login,
+ examples/startup-files/apple/logout,
+ examples/startup-files/apple/rc, include/ansi_stdlib.h,
+ include/chartypes.h, include/filecntl.h, include/maxpath.h,
+ include/memalloc.h, include/ocache.h, include/posixdir.h,
+ include/posixjmp.h, include/posixstat.h, include/posixtime.h,
+ include/posixwait.h, include/shmbutil.h, include/shtty.h,
+ include/stdc.h, include/systimes.h, include/typemax.h,
+ include/unionwait.h, lib/glob/Makefile.in, lib/glob/collsyms.h,
+ lib/glob/glob.c, lib/glob/glob.h, lib/glob/glob_loop.c,
+ lib/glob/ndir.h, lib/glob/sm_loop.c, lib/glob/smatch.c,
+ lib/glob/strmatch.c, lib/glob/strmatch.h, lib/glob/xmbsrtowcs.c,
+ lib/glob/doc/Makefile, lib/glob/doc/glob.texi,
+ lib/malloc/Makefile.in, lib/malloc/alloca.c,
+ lib/malloc/getpagesize.h, lib/malloc/i386-alloca.s,
+ lib/malloc/imalloc.h, lib/malloc/malloc.c, lib/malloc/mstats.h,
+ lib/malloc/shmalloc.h, lib/malloc/stats.c, lib/malloc/stub.c,
+ lib/malloc/table.c, lib/malloc/table.h, lib/malloc/trace.c,
+ lib/malloc/watch.c, lib/malloc/watch.h, lib/malloc/x386-alloca.s,
+ lib/malloc/xleaktrace, lib/malloc/xmalloc.c, lib/readline/COPYING,
+ lib/readline/ChangeLog, lib/readline/Makefile.in,
+ lib/readline/README, lib/readline/STANDALONE,
+ lib/readline/ansi_stdlib.h, lib/readline/bind.c,
+ lib/readline/callback.c, lib/readline/chardefs.h,
+ lib/readline/compat.c, lib/readline/complete.c,
+ lib/readline/display.c, lib/readline/emacs_keymap.c,
+ lib/readline/funmap.c, lib/readline/histexpand.c,
+ lib/readline/histfile.c, lib/readline/histlib.h,
+ lib/readline/history.c, lib/readline/history.h,
+ lib/readline/histsearch.c, lib/readline/input.c,
+ lib/readline/isearch.c, lib/readline/keymaps.c,
+ lib/readline/keymaps.h, lib/readline/kill.c, lib/readline/macro.c,
+ lib/readline/mbutil.c, lib/readline/misc.c, lib/readline/nls.c,
+ lib/readline/parens.c, lib/readline/posixdir.h,
+ lib/readline/posixjmp.h, lib/readline/posixstat.h,
+ lib/readline/readline.c, lib/readline/readline.h,
+ lib/readline/rlconf.h, lib/readline/rldefs.h,
+ lib/readline/rlmbutil.h, lib/readline/rlprivate.h,
+ lib/readline/rlshell.h, lib/readline/rlstdc.h,
+ lib/readline/rltty.c, lib/readline/rltty.h,
+ lib/readline/rltypedefs.h, lib/readline/rlwinsize.h,
+ lib/readline/savestring.c, lib/readline/search.c,
+ lib/readline/shell.c, lib/readline/signals.c, lib/readline/tcap.h,
+ lib/readline/terminal.c, lib/readline/text.c, lib/readline/tilde.c,
+ lib/readline/tilde.h, lib/readline/undo.c, lib/readline/util.c,
+ lib/readline/vi_keymap.c, lib/readline/vi_mode.c,
+ lib/readline/xmalloc.c, lib/readline/xmalloc.h,
+ lib/readline/doc/Makefile, lib/readline/doc/hist.texinfo,
+ lib/readline/doc/hstech.texinfo, lib/readline/doc/hsuser.texinfo,
+ lib/readline/doc/manvers.texinfo, lib/readline/doc/rlman.texinfo,
+ lib/readline/doc/rltech.texinfo, lib/readline/doc/rluser.texinfo,
+ lib/readline/doc/rluserman.texinfo, lib/readline/examples/Inputrc,
+ lib/readline/examples/Makefile, lib/readline/examples/excallback.c,
+ lib/readline/examples/fileman.c, lib/readline/examples/histexamp.c,
+ lib/readline/examples/manexamp.c, lib/readline/examples/rl.c,
+ lib/readline/examples/rlcat.c, lib/readline/examples/rltest.c,
+ lib/sh/Makefile.in, lib/sh/clktck.c, lib/sh/clock.c,
+ lib/sh/fmtullong.c, lib/sh/fmtulong.c, lib/sh/fmtumax.c,
+ lib/sh/getcwd.c, lib/sh/getenv.c, lib/sh/inet_aton.c,
+ lib/sh/itos.c, lib/sh/mailstat.c, lib/sh/makepath.c,
+ lib/sh/memset.c, lib/sh/mktime.c, lib/sh/netconn.c,
+ lib/sh/netopen.c, lib/sh/oslib.c, lib/sh/pathcanon.c,
+ lib/sh/pathphys.c, lib/sh/rename.c, lib/sh/setlinebuf.c,
+ lib/sh/shquote.c, lib/sh/shtty.c, lib/sh/snprintf.c,
+ lib/sh/spell.c, lib/sh/strcasecmp.c, lib/sh/strerror.c,
+ lib/sh/strftime.c, lib/sh/strindex.c, lib/sh/stringlist.c,
+ lib/sh/stringvec.c, lib/sh/strpbrk.c, lib/sh/strtod.c,
+ lib/sh/strtoimax.c, lib/sh/strtol.c, lib/sh/strtoll.c,
+ lib/sh/strtoul.c, lib/sh/strtoull.c, lib/sh/strtoumax.c,
+ lib/sh/strtrans.c, lib/sh/times.c, lib/sh/timeval.c,
+ lib/sh/tmpfile.c, lib/sh/vprint.c, lib/sh/xstrchr.c,
+ lib/sh/zcatfd.c, lib/sh/zread.c, lib/sh/zwrite.c,
+ lib/termcap/Makefile.in, lib/termcap/ltcap.h,
+ lib/termcap/termcap.c, lib/termcap/termcap.h, lib/termcap/tparam.c,
+ lib/termcap/version.c, lib/termcap/grot/COPYING,
+ lib/termcap/grot/ChangeLog, lib/termcap/grot/INSTALL,
+ lib/termcap/grot/Makefile.in, lib/termcap/grot/NEWS,
+ lib/termcap/grot/README, lib/termcap/grot/configure,
+ lib/termcap/grot/configure.in, lib/termcap/grot/termcap.info,
+ lib/termcap/grot/termcap.info-1, lib/termcap/grot/termcap.info-2,
+ lib/termcap/grot/termcap.info-3, lib/termcap/grot/termcap.info-4,
+ lib/termcap/grot/termcap.texi, lib/termcap/grot/texinfo.tex,
+ lib/tilde/Makefile.in, lib/tilde/README, lib/tilde/shell.c,
+ lib/tilde/tilde.c, lib/tilde/tilde.h, lib/tilde/doc/Makefile,
+ lib/tilde/doc/tilde.texi, support/Makefile.in, support/SYMLINKS,
+ support/bash.xbm, support/bashbug.sh, support/bashversion.c,
+ support/config.guess, support/config.sub, support/fixlinks,
+ support/install.sh, support/man2html.c, support/missing,
+ support/mkclone, support/mkconffiles, support/mkdirs,
+ support/mksignames.c, support/mkversion.sh, support/printenv.c,
+ support/printenv.sh, support/recho.c, support/rlvers.sh,
+ support/shobj-conf, support/texi2dvi, support/texi2html,
+ support/xenix-link.sh, support/zecho.c, tests/README,
+ tests/arith-for.right, tests/arith-for.tests, tests/arith.right,
+ tests/arith.tests, tests/array-at-star, tests/array.right,
+ tests/array.tests, tests/array2.right, tests/braces-tests,
+ tests/braces.right, tests/builtins.right, tests/builtins.tests,
+ tests/builtins1.sub, tests/builtins2.sub, tests/cond.right,
+ tests/cond.tests, tests/cprint.right, tests/cprint.tests,
+ tests/dollar-at-star, tests/dollar.right, tests/dstack.right,
+ tests/dstack.tests, tests/dstack2.right, tests/dstack2.tests,
+ tests/errors.right, tests/errors.tests, tests/exec.right,
+ tests/exec1.sub, tests/exec2.sub, tests/exec3.sub, tests/exec4.sub,
+ tests/exec5.sub, tests/exec6.sub, tests/execscript,
+ tests/exp-tests, tests/exp.right, tests/extglob.right,
+ tests/extglob.tests, tests/extglob2.right, tests/extglob2.tests,
+ tests/func.right, tests/func.tests, tests/func1.sub,
+ tests/func2.sub, tests/func3.sub, tests/getopts.right,
+ tests/getopts.tests, tests/getopts1.sub, tests/getopts2.sub,
+ tests/getopts3.sub, tests/getopts4.sub, tests/getopts5.sub,
+ tests/getopts6.sub, tests/getopts7.sub, tests/glob-test,
+ tests/glob.right, tests/glob1.sub, tests/heredoc.right,
+ tests/heredoc.tests, tests/herestr.right, tests/herestr.tests,
+ tests/histexp.right, tests/histexp.tests, tests/history.list,
+ tests/history.right, tests/history.tests, tests/ifs.right,
+ tests/ifs.tests, tests/input-line.sh, tests/input-line.sub,
+ tests/input.right, tests/invert.right, tests/invert.tests,
+ tests/jobs.right, tests/jobs.tests, tests/jobs1.sub,
+ tests/jobs2.sub, tests/jobs3.sub, tests/more-exp.right,
+ tests/more-exp.tests, tests/new-exp.right, tests/new-exp.tests,
+ tests/new-exp1.sub, tests/new-exp2.sub, tests/new-exp3.sub,
+ tests/nquote.right, tests/nquote.tests, tests/nquote1.right,
+ tests/nquote1.tests, tests/nquote2.right, tests/nquote2.tests,
+ tests/nquote3.right, tests/nquote3.tests, tests/posix2.right,
+ tests/posix2.tests, tests/posixpat.right, tests/posixpat.tests,
+ tests/prec.right, tests/precedence, tests/printf.right,
+ tests/printf.tests, tests/quote.right, tests/quote.tests,
+ tests/read.right, tests/read.tests, tests/read1.sub,
+ tests/read2.sub, tests/read3.sub, tests/read4.sub,
+ tests/redir.right, tests/redir.tests, tests/redir1.sub,
+ tests/redir2.sub, tests/redir3.in1, tests/redir3.in2,
+ tests/redir3.sub, tests/redir4.in1, tests/redir4.sub,
+ tests/redir5.sub, tests/rhs-exp.right, tests/rhs-exp.tests,
+ tests/rsh.right, tests/rsh.tests, tests/run-all, tests/run-arith,
+ tests/run-arith-for, tests/run-array, tests/run-array2,
+ tests/run-braces, tests/run-builtins, tests/run-cond,
+ tests/run-cprint, tests/run-dirstack, tests/run-dollars,
+ tests/run-errors, tests/run-execscript, tests/run-exp-tests,
+ tests/run-extglob, tests/run-extglob2, tests/run-func,
+ tests/run-getopts, tests/run-glob-test, tests/run-heredoc,
+ tests/run-herestr, tests/run-histexpand, tests/run-history,
+ tests/run-ifs, tests/run-input-test, tests/run-invert,
+ tests/run-jobs, tests/run-minimal, tests/run-more-exp,
+ tests/run-new-exp, tests/run-nquote, tests/run-nquote1,
+ tests/run-nquote2, tests/run-nquote3, tests/run-posix2,
+ tests/run-posixpat, tests/run-precedence, tests/run-printf,
+ tests/run-quote, tests/run-read, tests/run-redir,
+ tests/run-rhs-exp, tests/run-rsh, tests/run-set-e, tests/run-shopt,
+ tests/run-strip, tests/run-test, tests/run-tilde, tests/run-trap,
+ tests/run-type, tests/run-varenv, tests/set-e-test,
+ tests/set-e.right, tests/shopt.right, tests/shopt.tests,
+ tests/source1.sub, tests/source2.sub, tests/source3.sub,
+ tests/source4.sub, tests/source5.sub, tests/strip.right,
+ tests/strip.tests, tests/test.right, tests/test.tests,
+ tests/tilde-tests, tests/tilde.right, tests/trap.right,
+ tests/trap.tests, tests/trap1.sub, tests/trap2.sub,
+ tests/trap2a.sub, tests/type.right, tests/type.tests,
+ tests/varenv.right, tests/varenv.sh, tests/varenv1.sub,
+ tests/varenv2.sub, tests/version, tests/version.mini,
+ tests/misc/dev-tcp.tests, tests/misc/perf-script,
+ tests/misc/perftest, tests/misc/read-nchars.tests,
+ tests/misc/redir-t2.sh, tests/misc/run-r2.sh,
+ tests/misc/sigint-1.sh, tests/misc/sigint-2.sh,
+ tests/misc/sigint-3.sh, tests/misc/sigint-4.sh,
+ tests/misc/test-minus-e.1, tests/misc/test-minus-e.2,
+ tests/misc/wait-bg.tests: Initial revision
+
+2002-08-20 11:16 rocky
+
+ * AUTHORS, CHANGES, COMPAT, COPYING, INSTALL, MANIFEST,
+ Makefile.in, NEWS, NOTES, POSIX, RBASH, README, Y2K, alias.c,
+ alias.h, array.c, array.h, arrayfunc.c, arrayfunc.h, bashansi.h,
+ bashhist.c, bashhist.h, bashintl.h, bashjmp.h, bashline.c,
+ bashline.h, bashtypes.h, bracecomp.c, braces.c, builtins.h,
+ command.h, config-bot.h, config-top.h, config.h.in, configure.in,
+ conftypes.h, copy_cmd.c, dispose_cmd.c, dispose_cmd.h, error.c,
+ error.h, eval.c, execute_cmd.c, execute_cmd.h, expr.c, externs.h,
+ findcmd.c, findcmd.h, flags.c, flags.h, general.c, general.h,
+ hashcmd.c, hashcmd.h, hashlib.c, hashlib.h, input.c, input.h,
+ jobs.c, jobs.h, list.c, locale.c, mailcheck.c, mailcheck.h,
+ make_cmd.c, make_cmd.h, mksyntax.c, nojobs.c, parse.y, parser.h,
+ patchlevel.h, pathexp.c, pathexp.h, pcomplete.c, pcomplete.h,
+ pcomplib.c, print_cmd.c, quit.h, redir.c, redir.h, shell.c,
+ shell.h, sig.c, sig.h, siglist.c, siglist.h, stringlib.c, subst.c,
+ subst.h, syntax.h, test.c, test.h, trap.c, trap.h, unwind_prot.c,
+ unwind_prot.h, variables.c, variables.h, version.c, xmalloc.c,
+ xmalloc.h, CWRU/PLATFORMS, CWRU/README, CWRU/changelog,
+ CWRU/mh-folder-comp, CWRU/sh-redir-hack, CWRU/misc/bison,
+ CWRU/misc/errlist.c, CWRU/misc/hpux10-dlfcn.h,
+ CWRU/misc/open-files.c, CWRU/misc/sigs.c, CWRU/misc/sigstat.c,
+ builtins/Makefile.in, builtins/alias.def, builtins/bashgetopt.c,
+ builtins/bashgetopt.h, builtins/bind.def, builtins/break.def,
+ builtins/builtin.def, builtins/cd.def, builtins/colon.def,
+ builtins/command.def, builtins/common.c, builtins/common.h,
+ builtins/complete.def, builtins/declare.def, builtins/echo.def,
+ builtins/enable.def, builtins/eval.def, builtins/evalfile.c,
+ builtins/evalstring.c, builtins/exec.def, builtins/exit.def,
+ builtins/fc.def, builtins/fg_bg.def, builtins/getopt.c,
+ builtins/getopt.h, builtins/getopts.def, builtins/hash.def,
+ builtins/help.def, builtins/history.def, builtins/inlib.def,
+ builtins/jobs.def, builtins/kill.def, builtins/let.def,
+ builtins/mkbuiltins.c, builtins/printf.def, builtins/psize.c,
+ builtins/psize.sh, builtins/pushd.def, builtins/read.def,
+ builtins/reserved.def, builtins/return.def, builtins/set.def,
+ builtins/setattr.def, builtins/shift.def, builtins/shopt.def,
+ builtins/source.def, builtins/suspend.def, builtins/test.def,
+ builtins/times.def, builtins/trap.def, builtins/type.def,
+ builtins/ulimit.def, builtins/umask.def, builtins/wait.def,
+ cross-build/beos-sig.h, cross-build/cygwin32.cache,
+ cross-build/opennt.cache, cross-build/win32sig.h,
+ cross-build/x86-beos.cache, doc/FAQ, doc/INTRO, doc/Makefile.in,
+ doc/README, doc/article.ms, doc/bash.1, doc/bashbug.1,
+ doc/bashref.texi, doc/builtins.1, doc/htmlpost.sh, doc/rbash.1,
+ doc/texinfo.tex, examples/bashdb/PERMISSION,
+ examples/bashdb/bashdb, examples/bashdb/bashdb.el,
+ examples/complete/complete-examples,
+ examples/complete/complete.freebsd,
+ examples/complete/complete.gnu-longopt,
+ examples/complete/complete.ianmac,
+ examples/complete/complete2.ianmac, examples/functions/array-stuff,
+ examples/functions/array-to-string, examples/functions/autoload,
+ examples/functions/autoload.v2, examples/functions/autoload.v3,
+ examples/functions/basename, examples/functions/basename2,
+ examples/functions/coproc.bash, examples/functions/coshell.README,
+ examples/functions/coshell.bash, examples/functions/csh-compat,
+ examples/functions/dirfuncs, examples/functions/dirname,
+ examples/functions/emptydir, examples/functions/exitstat,
+ examples/functions/external, examples/functions/fact,
+ examples/functions/fstty, examples/functions/func,
+ examples/functions/gethtml, examples/functions/getoptx.bash,
+ examples/functions/inetaddr, examples/functions/inpath,
+ examples/functions/isnum.bash, examples/functions/isnum2,
+ examples/functions/isvalidip, examples/functions/jdate.bash,
+ examples/functions/jj.bash, examples/functions/keep,
+ examples/functions/ksh-cd, examples/functions/ksh-compat-test,
+ examples/functions/kshenv, examples/functions/login,
+ examples/functions/lowercase, examples/functions/manpage,
+ examples/functions/mhfold, examples/functions/notify.bash,
+ examples/functions/pathfuncs, examples/functions/recurse,
+ examples/functions/repeat2, examples/functions/repeat3,
+ examples/functions/seq, examples/functions/seq2,
+ examples/functions/shcat, examples/functions/shcat2,
+ examples/functions/sort-pos-params, examples/functions/substr,
+ examples/functions/substr2, examples/functions/term,
+ examples/functions/whatis, examples/functions/whence,
+ examples/functions/which, examples/functions/xalias.bash,
+ examples/functions/xfind.bash, examples/loadables/Makefile.in,
+ examples/loadables/README, examples/loadables/basename.c,
+ examples/loadables/cat.c, examples/loadables/cut.c,
+ examples/loadables/dirname.c, examples/loadables/finfo.c,
+ examples/loadables/getconf.c, examples/loadables/getconf.h,
+ examples/loadables/head.c, examples/loadables/hello.c,
+ examples/loadables/id.c, examples/loadables/ln.c,
+ examples/loadables/logname.c, examples/loadables/mkdir.c,
+ examples/loadables/necho.c, examples/loadables/pathchk.c,
+ examples/loadables/print.c, examples/loadables/printenv.c,
+ examples/loadables/push.c, examples/loadables/realpath.c,
+ examples/loadables/rmdir.c, examples/loadables/sleep.c,
+ examples/loadables/sync.c, examples/loadables/tee.c,
+ examples/loadables/template.c, examples/loadables/truefalse.c,
+ examples/loadables/tty.c, examples/loadables/uname.c,
+ examples/loadables/unlink.c, examples/loadables/whoami.c,
+ examples/loadables/perl/Makefile.in,
+ examples/loadables/perl/README, examples/loadables/perl/bperl.c,
+ examples/loadables/perl/iperl.c, examples/misc/aliasconv.bash,
+ examples/misc/aliasconv.sh, examples/misc/cshtobash,
+ examples/misc/suncmd.termcap, examples/obashdb/PERMISSION,
+ examples/obashdb/README, examples/obashdb/bashdb,
+ examples/obashdb/bashdb.fns, examples/obashdb/bashdb.pre,
+ examples/scripts/adventure.sh, examples/scripts/bcsh.sh,
+ examples/scripts/cat.sh, examples/scripts/center,
+ examples/scripts/dd-ex.sh, examples/scripts/fixfiles.bash,
+ examples/scripts/hanoi.bash, examples/scripts/inpath,
+ examples/scripts/krand.bash, examples/scripts/line-input.bash,
+ examples/scripts/nohup.bash, examples/scripts/precedence,
+ examples/scripts/randomcard.bash, examples/scripts/scrollbar,
+ examples/scripts/scrollbar2, examples/scripts/self-repro,
+ examples/scripts/showperm.bash, examples/scripts/shprompt,
+ examples/scripts/spin.bash, examples/scripts/timeout,
+ examples/scripts/vtree2, examples/scripts/vtree3,
+ examples/scripts/vtree3a, examples/scripts/websrv.sh,
+ examples/scripts/xterm_title, examples/scripts/zprintf,
+ examples/scripts.noah/PERMISSION, examples/scripts.noah/README,
+ examples/scripts.noah/aref.bash,
+ examples/scripts.noah/bash.sub.bash,
+ examples/scripts.noah/bash_version.bash,
+ examples/scripts.noah/meta.bash, examples/scripts.noah/mktmp.bash,
+ examples/scripts.noah/number.bash,
+ examples/scripts.noah/prompt.bash,
+ examples/scripts.noah/remap_keys.bash,
+ examples/scripts.noah/require.bash,
+ examples/scripts.noah/send_mail.bash,
+ examples/scripts.noah/shcat.bash,
+ examples/scripts.noah/source.bash,
+ examples/scripts.noah/string.bash, examples/scripts.noah/stty.bash,
+ examples/scripts.noah/y_or_n_p.bash,
+ examples/scripts.v2/PERMISSION, examples/scripts.v2/README,
+ examples/scripts.v2/arc2tarz, examples/scripts.v2/bashrand,
+ examples/scripts.v2/cal2day.bash, examples/scripts.v2/cdhist.bash,
+ examples/scripts.v2/corename, examples/scripts.v2/fman,
+ examples/scripts.v2/frcp, examples/scripts.v2/lowercase,
+ examples/scripts.v2/ncp, examples/scripts.v2/newext,
+ examples/scripts.v2/nmv, examples/scripts.v2/pages,
+ examples/scripts.v2/pf, examples/scripts.v2/pmtop,
+ examples/scripts.v2/ren, examples/scripts.v2/rename,
+ examples/scripts.v2/repeat, examples/scripts.v2/shprof,
+ examples/scripts.v2/untar, examples/scripts.v2/uudec,
+ examples/scripts.v2/uuenc, examples/scripts.v2/vtree,
+ examples/scripts.v2/where, examples/startup-files/Bash_aliases,
+ examples/startup-files/Bash_profile,
+ examples/startup-files/Bashrc.bfox, examples/startup-files/README,
+ examples/startup-files/bash-profile, examples/startup-files/bashrc,
+ examples/startup-files/apple/README,
+ examples/startup-files/apple/aliases,
+ examples/startup-files/apple/bash.defaults,
+ examples/startup-files/apple/environment,
+ examples/startup-files/apple/login,
+ examples/startup-files/apple/logout,
+ examples/startup-files/apple/rc, include/ansi_stdlib.h,
+ include/chartypes.h, include/filecntl.h, include/maxpath.h,
+ include/memalloc.h, include/ocache.h, include/posixdir.h,
+ include/posixjmp.h, include/posixstat.h, include/posixtime.h,
+ include/posixwait.h, include/shmbutil.h, include/shtty.h,
+ include/stdc.h, include/systimes.h, include/typemax.h,
+ include/unionwait.h, lib/glob/Makefile.in, lib/glob/collsyms.h,
+ lib/glob/glob.c, lib/glob/glob.h, lib/glob/glob_loop.c,
+ lib/glob/ndir.h, lib/glob/sm_loop.c, lib/glob/smatch.c,
+ lib/glob/strmatch.c, lib/glob/strmatch.h, lib/glob/xmbsrtowcs.c,
+ lib/glob/doc/Makefile, lib/glob/doc/glob.texi,
+ lib/malloc/Makefile.in, lib/malloc/alloca.c,
+ lib/malloc/getpagesize.h, lib/malloc/i386-alloca.s,
+ lib/malloc/imalloc.h, lib/malloc/malloc.c, lib/malloc/mstats.h,
+ lib/malloc/shmalloc.h, lib/malloc/stats.c, lib/malloc/stub.c,
+ lib/malloc/table.c, lib/malloc/table.h, lib/malloc/trace.c,
+ lib/malloc/watch.c, lib/malloc/watch.h, lib/malloc/x386-alloca.s,
+ lib/malloc/xleaktrace, lib/malloc/xmalloc.c, lib/readline/COPYING,
+ lib/readline/ChangeLog, lib/readline/Makefile.in,
+ lib/readline/README, lib/readline/STANDALONE,
+ lib/readline/ansi_stdlib.h, lib/readline/bind.c,
+ lib/readline/callback.c, lib/readline/chardefs.h,
+ lib/readline/compat.c, lib/readline/complete.c,
+ lib/readline/display.c, lib/readline/emacs_keymap.c,
+ lib/readline/funmap.c, lib/readline/histexpand.c,
+ lib/readline/histfile.c, lib/readline/histlib.h,
+ lib/readline/history.c, lib/readline/history.h,
+ lib/readline/histsearch.c, lib/readline/input.c,
+ lib/readline/isearch.c, lib/readline/keymaps.c,
+ lib/readline/keymaps.h, lib/readline/kill.c, lib/readline/macro.c,
+ lib/readline/mbutil.c, lib/readline/misc.c, lib/readline/nls.c,
+ lib/readline/parens.c, lib/readline/posixdir.h,
+ lib/readline/posixjmp.h, lib/readline/posixstat.h,
+ lib/readline/readline.c, lib/readline/readline.h,
+ lib/readline/rlconf.h, lib/readline/rldefs.h,
+ lib/readline/rlmbutil.h, lib/readline/rlprivate.h,
+ lib/readline/rlshell.h, lib/readline/rlstdc.h,
+ lib/readline/rltty.c, lib/readline/rltty.h,
+ lib/readline/rltypedefs.h, lib/readline/rlwinsize.h,
+ lib/readline/savestring.c, lib/readline/search.c,
+ lib/readline/shell.c, lib/readline/signals.c, lib/readline/tcap.h,
+ lib/readline/terminal.c, lib/readline/text.c, lib/readline/tilde.c,
+ lib/readline/tilde.h, lib/readline/undo.c, lib/readline/util.c,
+ lib/readline/vi_keymap.c, lib/readline/vi_mode.c,
+ lib/readline/xmalloc.c, lib/readline/xmalloc.h,
+ lib/readline/doc/Makefile, lib/readline/doc/hist.texinfo,
+ lib/readline/doc/hstech.texinfo, lib/readline/doc/hsuser.texinfo,
+ lib/readline/doc/manvers.texinfo, lib/readline/doc/rlman.texinfo,
+ lib/readline/doc/rltech.texinfo, lib/readline/doc/rluser.texinfo,
+ lib/readline/doc/rluserman.texinfo, lib/readline/examples/Inputrc,
+ lib/readline/examples/Makefile, lib/readline/examples/excallback.c,
+ lib/readline/examples/fileman.c, lib/readline/examples/histexamp.c,
+ lib/readline/examples/manexamp.c, lib/readline/examples/rl.c,
+ lib/readline/examples/rlcat.c, lib/readline/examples/rltest.c,
+ lib/sh/Makefile.in, lib/sh/clktck.c, lib/sh/clock.c,
+ lib/sh/fmtullong.c, lib/sh/fmtulong.c, lib/sh/fmtumax.c,
+ lib/sh/getcwd.c, lib/sh/getenv.c, lib/sh/inet_aton.c,
+ lib/sh/itos.c, lib/sh/mailstat.c, lib/sh/makepath.c,
+ lib/sh/memset.c, lib/sh/mktime.c, lib/sh/netconn.c,
+ lib/sh/netopen.c, lib/sh/oslib.c, lib/sh/pathcanon.c,
+ lib/sh/pathphys.c, lib/sh/rename.c, lib/sh/setlinebuf.c,
+ lib/sh/shquote.c, lib/sh/shtty.c, lib/sh/snprintf.c,
+ lib/sh/spell.c, lib/sh/strcasecmp.c, lib/sh/strerror.c,
+ lib/sh/strftime.c, lib/sh/strindex.c, lib/sh/stringlist.c,
+ lib/sh/stringvec.c, lib/sh/strpbrk.c, lib/sh/strtod.c,
+ lib/sh/strtoimax.c, lib/sh/strtol.c, lib/sh/strtoll.c,
+ lib/sh/strtoul.c, lib/sh/strtoull.c, lib/sh/strtoumax.c,
+ lib/sh/strtrans.c, lib/sh/times.c, lib/sh/timeval.c,
+ lib/sh/tmpfile.c, lib/sh/vprint.c, lib/sh/xstrchr.c,
+ lib/sh/zcatfd.c, lib/sh/zread.c, lib/sh/zwrite.c,
+ lib/termcap/Makefile.in, lib/termcap/ltcap.h,
+ lib/termcap/termcap.c, lib/termcap/termcap.h, lib/termcap/tparam.c,
+ lib/termcap/version.c, lib/termcap/grot/COPYING,
+ lib/termcap/grot/ChangeLog, lib/termcap/grot/INSTALL,
+ lib/termcap/grot/Makefile.in, lib/termcap/grot/NEWS,
+ lib/termcap/grot/README, lib/termcap/grot/configure,
+ lib/termcap/grot/configure.in, lib/termcap/grot/termcap.info,
+ lib/termcap/grot/termcap.info-1, lib/termcap/grot/termcap.info-2,
+ lib/termcap/grot/termcap.info-3, lib/termcap/grot/termcap.info-4,
+ lib/termcap/grot/termcap.texi, lib/termcap/grot/texinfo.tex,
+ lib/tilde/Makefile.in, lib/tilde/README, lib/tilde/shell.c,
+ lib/tilde/tilde.c, lib/tilde/tilde.h, lib/tilde/doc/Makefile,
+ lib/tilde/doc/tilde.texi, support/Makefile.in, support/SYMLINKS,
+ support/bash.xbm, support/bashbug.sh, support/bashversion.c,
+ support/config.guess, support/config.sub, support/fixlinks,
+ support/install.sh, support/man2html.c, support/missing,
+ support/mkclone, support/mkconffiles, support/mkdirs,
+ support/mksignames.c, support/mkversion.sh, support/printenv.c,
+ support/printenv.sh, support/recho.c, support/rlvers.sh,
+ support/shobj-conf, support/texi2dvi, support/texi2html,
+ support/xenix-link.sh, support/zecho.c, tests/README,
+ tests/arith-for.right, tests/arith-for.tests, tests/arith.right,
+ tests/arith.tests, tests/array-at-star, tests/array.right,
+ tests/array.tests, tests/array2.right, tests/braces-tests,
+ tests/braces.right, tests/builtins.right, tests/builtins.tests,
+ tests/builtins1.sub, tests/builtins2.sub, tests/cond.right,
+ tests/cond.tests, tests/cprint.right, tests/cprint.tests,
+ tests/dollar-at-star, tests/dollar.right, tests/dstack.right,
+ tests/dstack.tests, tests/dstack2.right, tests/dstack2.tests,
+ tests/errors.right, tests/errors.tests, tests/exec.right,
+ tests/exec1.sub, tests/exec2.sub, tests/exec3.sub, tests/exec4.sub,
+ tests/exec5.sub, tests/exec6.sub, tests/execscript,
+ tests/exp-tests, tests/exp.right, tests/extglob.right,
+ tests/extglob.tests, tests/extglob2.right, tests/extglob2.tests,
+ tests/func.right, tests/func.tests, tests/func1.sub,
+ tests/func2.sub, tests/func3.sub, tests/getopts.right,
+ tests/getopts.tests, tests/getopts1.sub, tests/getopts2.sub,
+ tests/getopts3.sub, tests/getopts4.sub, tests/getopts5.sub,
+ tests/getopts6.sub, tests/getopts7.sub, tests/glob-test,
+ tests/glob.right, tests/glob1.sub, tests/heredoc.right,
+ tests/heredoc.tests, tests/herestr.right, tests/herestr.tests,
+ tests/histexp.right, tests/histexp.tests, tests/history.list,
+ tests/history.right, tests/history.tests, tests/ifs.right,
+ tests/ifs.tests, tests/input-line.sh, tests/input-line.sub,
+ tests/input.right, tests/invert.right, tests/invert.tests,
+ tests/jobs.right, tests/jobs.tests, tests/jobs1.sub,
+ tests/jobs2.sub, tests/jobs3.sub, tests/more-exp.right,
+ tests/more-exp.tests, tests/new-exp.right, tests/new-exp.tests,
+ tests/new-exp1.sub, tests/new-exp2.sub, tests/new-exp3.sub,
+ tests/nquote.right, tests/nquote.tests, tests/nquote1.right,
+ tests/nquote1.tests, tests/nquote2.right, tests/nquote2.tests,
+ tests/nquote3.right, tests/nquote3.tests, tests/posix2.right,
+ tests/posix2.tests, tests/posixpat.right, tests/posixpat.tests,
+ tests/prec.right, tests/precedence, tests/printf.right,
+ tests/printf.tests, tests/quote.right, tests/quote.tests,
+ tests/read.right, tests/read.tests, tests/read1.sub,
+ tests/read2.sub, tests/read3.sub, tests/read4.sub,
+ tests/redir.right, tests/redir.tests, tests/redir1.sub,
+ tests/redir2.sub, tests/redir3.in1, tests/redir3.in2,
+ tests/redir3.sub, tests/redir4.in1, tests/redir4.sub,
+ tests/redir5.sub, tests/rhs-exp.right, tests/rhs-exp.tests,
+ tests/rsh.right, tests/rsh.tests, tests/run-all, tests/run-arith,
+ tests/run-arith-for, tests/run-array, tests/run-array2,
+ tests/run-braces, tests/run-builtins, tests/run-cond,
+ tests/run-cprint, tests/run-dirstack, tests/run-dollars,
+ tests/run-errors, tests/run-execscript, tests/run-exp-tests,
+ tests/run-extglob, tests/run-extglob2, tests/run-func,
+ tests/run-getopts, tests/run-glob-test, tests/run-heredoc,
+ tests/run-herestr, tests/run-histexpand, tests/run-history,
+ tests/run-ifs, tests/run-input-test, tests/run-invert,
+ tests/run-jobs, tests/run-minimal, tests/run-more-exp,
+ tests/run-new-exp, tests/run-nquote, tests/run-nquote1,
+ tests/run-nquote2, tests/run-nquote3, tests/run-posix2,
+ tests/run-posixpat, tests/run-precedence, tests/run-printf,
+ tests/run-quote, tests/run-read, tests/run-redir,
+ tests/run-rhs-exp, tests/run-rsh, tests/run-set-e, tests/run-shopt,
+ tests/run-strip, tests/run-test, tests/run-tilde, tests/run-trap,
+ tests/run-type, tests/run-varenv, tests/set-e-test,
+ tests/set-e.right, tests/shopt.right, tests/shopt.tests,
+ tests/source1.sub, tests/source2.sub, tests/source3.sub,
+ tests/source4.sub, tests/source5.sub, tests/strip.right,
+ tests/strip.tests, tests/test.right, tests/test.tests,
+ tests/tilde-tests, tests/tilde.right, tests/trap.right,
+ tests/trap.tests, tests/trap1.sub, tests/trap2.sub,
+ tests/trap2a.sub, tests/type.right, tests/type.tests,
+ tests/varenv.right, tests/varenv.sh, tests/varenv1.sub,
+ tests/varenv2.sub, tests/version, tests/version.mini,
+ tests/misc/dev-tcp.tests, tests/misc/perf-script,
+ tests/misc/perftest, tests/misc/read-nchars.tests,
+ tests/misc/redir-t2.sh, tests/misc/run-r2.sh,
+ tests/misc/sigint-1.sh, tests/misc/sigint-2.sh,
+ tests/misc/sigint-3.sh, tests/misc/sigint-4.sh,
+ tests/misc/test-minus-e.1, tests/misc/test-minus-e.2,
+ tests/misc/wait-bg.tests: Imported sources
+
+2000-04-03 08:54 rocky
+
+ * debugger/bashdb-main.inc: Typo. Cut over to version control id.
+
+2000-04-02 23:26 rocky
+
+ * debugger/: MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc,
+ bashdb.el: Initial revision
+
+2000-04-02 23:26 rocky
+
+ * debugger/: MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc,
+ bashdb.el: Imported sources
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/INSTALL cvs/INSTALL
--- bash-2.05b/INSTALL 2002-06-26 23:09:18.000000000 +0200
+++ cvs/INSTALL 2002-09-19 03:02:08.000000000 +0200
@@ -1,9 +1,42 @@
Basic Installation
==================
-These are installation instructions for Bash.
+These are installation instructions for Bash.
-The simplest way to compile Bash is:
+To get the most recent version of this software from CVS anonymously...
+
+ cvs -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb login
+
+when asked for a password just hit the <enter> or <return> key.
+
+ cd directory-of-place-you-want-this-to-be-put-under
+
+The command below will create a directory underneath this.
+
+ cvs -z3 -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb checkout bashdb
+
+After this you need to run either bootstrap.sh or autogen.sh to create
+some files which are used in the build process. This needs to be done
+only once. Use bootstrap.sh if you don't want to run configure; this
+might be the case in cross-compiling. autogen.sh runs bootstrap.sh and
+then runs configure.
+
+If you have already have the CVS files checked out (i.e. you did the
+above once), but now want to just receive recent updates...
+
+ cd directory-where-above-checkout-put-files
+
+Note: this is not the directory you were in but one directory down
+from that; probably something-.../bashdb.
+
+ cvs -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb login
+
+when asked for a password just hit the <enter> or <return> key.
+
+ cvs -z3 -d:pserver:anonymous@cvs.bashdb.sourceforge.net:/cvsroot/bashdb update .
+
+If you have obtained this as a source tarball, or have followed the
+instructions above, the simplest way to compile Bash is:
1. `cd' to the directory containing the source code and type
`./configure' to configure Bash for your system. If you're using
@@ -11,16 +44,21 @@
./configure' instead to prevent `csh' from trying to execute
`configure' itself.
+ To see ways to customization configuration, type
+ ./configure --help.
+
Running `configure' takes some time. While running, it prints
messages telling which features it is checking for.
2. Type `make' to compile Bash and build the `bashbug' bug reporting
script.
- 3. Optionally, type `make tests' to run the Bash test suite.
+ 3. Optionally, type `make check' to run the Bash test suite.
- 4. Type `make install' to install `bash' and `bashbug'. This will
- also install the manual pages and Info file.
+ 4. Type `make install' to install `bash', 'bashdb' and `bashbug'.
+ This will also install the manual pages and Info file. Please
+ also see debugger/INSTALL for information on installation of the
+ debugger portion.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -44,8 +82,8 @@
If you need to do unusual things to compile Bash, please try to figure
out how `configure' could check whether or not to do them, and mail
-diffs or instructions to <bash-maintainers@gnu.org> so they can be
-considered for the next release.
+diffs or instructions to <bashdb-devel@lists.sourceforge.org> so they
+can be considered for the next release.
The file `configure.in' is used to create `configure' by a program
called Autoconf. You only need `configure.in' if you want to change it
@@ -171,6 +209,10 @@
Print the version of Autoconf used to generate the `configure'
script, and exit.
+`--with-lispdir' Override the default lisp directory to use for installing
+ the Emacs bashdb scripts
+
+
`configure' also accepts some other, not widely used, boilerplate
options. `configure --help' prints the complete list.
@@ -365,3 +407,5 @@
not meant to be changed; beware of the consequences if you do. Read
the comments associated with each definition for more information about
its effect.
+
+$Id: INSTALL,v 1.3 2002/09/19 01:02:08 rockyb Exp $
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/MANIFEST cvs/MANIFEST
--- bash-2.05b/MANIFEST 2002-05-13 19:09:00.000000000 +0200
+++ cvs/MANIFEST 2003-09-01 21:57:21.000000000 +0200
@@ -8,6 +8,10 @@
CWRU/misc d
builtins d
cross-build d
+debugger d
+debugger/emacs d
+debugger/doc d
+debugger/test d
doc d
examples d
examples/bashdb d
@@ -38,6 +42,7 @@
support d
tests d
tests/misc d
+ChangeLog f
CHANGES f
COMPAT f
COPYING f
@@ -56,6 +61,7 @@
config-top.h f
config-bot.h f
config.h.in f
+bashlocal.m4 f
aclocal.m4 f
array.c f
arrayfunc.c f
@@ -140,7 +146,7 @@
redir.h f
bashtypes.h f
mailcheck.h f
-pathnames.h f
+pathnames.h.in f
xmalloc.h f
y.tab.c f
y.tab.h f
@@ -150,6 +156,7 @@
builtins/bind.def f
builtins/break.def f
builtins/builtin.def f
+builtins/caller.def f
builtins/cd.def f
builtins/colon.def f
builtins/command.def f
@@ -312,7 +319,6 @@
lib/readline/rlstdc.h f
lib/readline/rlprivate.h f
lib/readline/xmalloc.h f
-lib/readline/doc/Makefile f
lib/readline/doc/manvers.texinfo f
lib/readline/doc/rlman.texinfo f
lib/readline/doc/rltech.texinfo f
@@ -417,6 +423,182 @@
CWRU/changelog f
CWRU/sh-redir-hack f
CWRU/mh-folder-comp f
+debugger/AUTHORS f
+debugger/CHANGES f
+debugger/COPYING f
+debugger/ChangeLog f
+debugger/INSTALL f
+debugger/Makefile f
+debugger/Makefile.am f
+debugger/Makefile.in f
+debugger/NEWS f
+debugger/README f
+debugger/THANKS f
+debugger/TODO f
+debugger/aclocal.m4 f
+debugger/acinclude.m4 f
+debugger/bashdb f 755
+debugger/bashdb.in f 755
+debugger/dbg-brk.inc f
+debugger/dbg-cmds.inc f
+debugger/dbg-file.inc f
+debugger/dbg-fns.inc f
+debugger/dbg-help.inc f
+debugger/dbg-hist.inc f
+debugger/dbg-init.inc f
+debugger/dbg-io.inc f
+debugger/dbg-list.inc f
+debugger/dbg-main.inc.in f
+debugger/dbg-pre.inc.in f
+debugger/dbg-set.inc f
+debugger/dbg-set-d-vars.inc f
+debugger/dbg-sig.inc f
+debugger/dbg-sig-ret.inc f
+debugger/dbg-stack.inc f
+debugger/configure f 755
+debugger/configure.ac f
+debugger/elisp-comp f
+debugger/install-sh f 755
+debugger/missing f 755
+debugger/mkinstalldirs f 755
+debugger/doc/Makefile f
+debugger/doc/Makefile.am f
+debugger/doc/Makefile.in f
+debugger/doc/bashdb.1 f
+debugger/doc/bashdb.info f
+debugger/doc/bashdb.info-1 f
+debugger/doc/bashdb.info-2 f
+debugger/doc/bashdb.info-3 f
+debugger/doc/bashdb.info-4 f
+debugger/doc/bashdb.texi f
+debugger/doc/bashdb.html f
+debugger/doc/bashdb-man.html f
+debugger/doc/bashdb-man.pod f
+debugger/doc/fdl.texi f
+debugger/doc/gpl.texi f
+debugger/doc/mdate-sh f
+debugger/doc/version.texi f
+debugger/doc/version.texi.in f
+debugger/emacs/Makefile f
+debugger/emacs/Makefile.am f
+debugger/emacs/Makefile.in f
+debugger/emacs/gud.el f
+debugger/emacs/gud.el.diff f
+debugger/emacs/bashdb.el f
+debugger/test/Makefile f
+debugger/test/Makefile.am f
+debugger/test/Makefile.in f
+debugger/test/check_common f
+debugger/test/check_common.in f
+debugger/test/dbg-test1.sh f 755
+debugger/test/dbg-test1.sub f
+debugger/test/dbg-test2.sh f 755
+debugger/test/action.cmd f
+debugger/test/action.right f
+debugger/test/action.tests f 755
+debugger/test/brkpt1.cmd f
+debugger/test/brkpt1.right f
+debugger/test/brkpt1.tests f 755
+debugger/test/brkpt2.cmd f
+debugger/test/brkpt2.right f
+debugger/test/brkpt2.tests f 755
+debugger/test/brkpt3.cmd f
+debugger/test/brkpt3.right f
+debugger/test/brkpt3.tests f 755
+debugger/test/bugIFS f
+debugger/test/bugIFS.cmd f
+debugger/test/bugIFS.right f
+debugger/test/bugIFS.sh f 755
+debugger/test/bugIFS.tests f 755
+debugger/test/debug.cmd f
+debugger/test/debug2.cmd f
+debugger/test/debug.right f
+debugger/test/debug.sh f 755
+debugger/test/debug.tests f 755
+debugger/test/display.cmd f
+debugger/test/display.right f
+debugger/test/display.tests f 755
+debugger/test/finish.cmd f
+debugger/test/finish.right f
+debugger/test/finish.tests f 755
+debugger/test/list.cmd f
+debugger/test/list.right f
+debugger/test/list.tests f 755
+debugger/test/misc.cmd f
+debugger/test/misc.right f
+debugger/test/misc-output.right f
+debugger/test/multi.sh f 755
+debugger/test/multi1.tests f
+debugger/test/multi1.cmd f
+debugger/test/multi1.right f
+debugger/test/multi2.tests f
+debugger/test/multi2.cmd f
+debugger/test/multi2.right f
+debugger/test/multi3.tests f
+debugger/test/multi3.cmd f
+debugger/test/multi3.right f
+debugger/test/multi4.tests f
+debugger/test/multi4.cmd f
+debugger/test/multi4.right f
+debugger/test/misc-output.right f
+debugger/test/misc.tests f 755
+debugger/test/subshell.sh f 755
+debugger/test/subshell1.cmd f
+debugger/test/subshell1.right f
+debugger/test/subshell1.tests f 755
+debugger/test/subshell2.cmd f
+debugger/test/subshell2.right f
+debugger/test/subshell2.tests f 755
+debugger/test/subshell3.cmd f
+debugger/test/subshell3.right f
+debugger/test/subshell3.tests f 755
+debugger/test/subshell4.cmd f
+debugger/test/subshell4.right f
+debugger/test/subshell4.tests f 755
+debugger/test/parm.cmd f
+debugger/test/parm.right f
+debugger/test/parm.sh f 755
+debugger/test/parm.tests f 755
+debugger/test/prof1.cmd f
+debugger/test/prof2.cmd f
+debugger/test/search.cmd f
+debugger/test/search.right f
+debugger/test/search.tests f 755
+debugger/test/sig.cmd f
+debugger/test/sig.right f
+debugger/test/sig.sh f 755
+debugger/test/sig.tests f 755
+debugger/test/skip.cmd f
+debugger/test/skip.right f
+debugger/test/skip.sh f 755
+debugger/test/skip.tests f 755
+debugger/test/tbreak.cmd f
+debugger/test/tbreak.right f
+debugger/test/tbreak.tests f 755
+debugger/test/watch1.cmd f
+debugger/test/watch1.right f
+debugger/test/watch1.tests f 755
+debugger/test/watch2.cmd f
+debugger/test/watch2.right f
+debugger/test/watch2.tests f 755
+debugger/test/run-action f 755
+debugger/test/run-all f 755
+debugger/test/run-brkpt f 755
+debugger/test/run-bugIFS f 755
+debugger/test/run-debug f 755
+debugger/test/run-display f 755
+debugger/test/run-finish f 755
+debugger/test/run-list f 755
+debugger/test/run-misc f 755
+debugger/test/run-multi f 755
+debugger/test/run-parm f 755
+debugger/test/run-search f 755
+debugger/test/run-sig f 755
+debugger/test/run-skip f 755
+debugger/test/run-subshell f 755
+debugger/test/run-tbreak f 755
+debugger/test/run-watch1 f 755
+debugger/test/run-watch2 f 755
doc/FAQ f
doc/Makefile.in f
doc/bash.1 f
@@ -427,7 +609,13 @@
doc/INTRO f
doc/texinfo.tex f
doc/bashref.texi f
-doc/bashref.info f
+doc/bashref.dvi f
+doc/bashref.html f
+doc/bash.info f
+doc/version.texi f
+doc/version.texi.in f
+doc/fdl.texi f
+doc/gpl.texi f
doc/article.ms f
doc/htmlpost.sh f 755
support/Makefile.in f
@@ -441,6 +629,7 @@
support/mkclone f 755
support/mkconffiles f 755
support/mkdirs f 755
+support/mkdist f 755
support/mkversion.sh f 755
support/mksignames.c f
support/bashbug.sh f
@@ -456,8 +645,8 @@
support/shobj-conf f 755
support/rlvers.sh f 755
examples/bashdb/PERMISSION f
+examples/bashdb/README f
examples/bashdb/bashdb f
-examples/bashdb/bashdb.el f
examples/obashdb/PERMISSION f
examples/obashdb/README f
examples/obashdb/bashdb f
@@ -611,10 +800,13 @@
tests/array2.right f
tests/braces-tests f
tests/braces.right f
+tests/bashdb-bp.tests f 755
tests/builtins.tests f
tests/builtins.right f
tests/builtins1.sub f
tests/builtins2.sub f
+tests/check_common f
+tests/check_common.in f
tests/source1.sub f
tests/source2.sub f
tests/source3.sub f
@@ -622,15 +814,25 @@
tests/source5.sub f
tests/cond.tests f
tests/cond.right f
-tests/cprint.tests f
+tests/dbg-fns f
+tests/dbg-fns.dat f
+tests/dbg-is-fn.right f
+tests/dbg-is-fn.tests f 755
+tests/dbg-support.sub f
+tests/dbg-support.right f
+tests/dbg-support.tests f 755
+tests/dbg-support2.right f
+tests/dbg-support2.tests f 755
tests/cprint.right f
+tests/cprint.tests f
tests/dollar-at-star f
tests/dollar.right f
tests/dstack.tests f
tests/dstack.right f
tests/dstack2.tests f
tests/dstack2.right f
-tests/errors.tests f
+tests/errors.sub f
+tests/errors.tests f 755
tests/errors.right f
tests/execscript f
tests/exec.right f
@@ -663,7 +865,7 @@
tests/glob-test f
tests/glob1.sub f
tests/glob.right f
-tests/heredoc.tests f
+tests/heredoc.tests f 755
tests/heredoc.right f
tests/herestr.tests f
tests/herestr.right f
@@ -695,9 +897,9 @@
tests/nquote.right f
tests/nquote1.tests f
tests/nquote1.right f
-tests/nquote2.tests f
+tests/nquote2.tests f 755
tests/nquote2.right f
-tests/nquote3.tests f
+tests/nquote3.tests f 755
tests/nquote3.right f
tests/posix2.tests f
tests/posix2.right f
@@ -709,13 +911,13 @@
tests/printf.right f
tests/quote.tests f
tests/quote.right f
-tests/read.tests f
+tests/read.tests f 755
tests/read.right f
tests/read1.sub f
tests/read2.sub f
tests/read3.sub f
tests/read4.sub f
-tests/redir.tests f
+tests/redir.tests f 755
tests/redir.right f
tests/redir1.sub f
tests/redir2.sub f
@@ -725,77 +927,83 @@
tests/redir4.sub f
tests/redir4.in1 f
tests/redir5.sub f
-tests/rhs-exp.tests f
+tests/rhs-exp.tests f 755
tests/rhs-exp.right f
tests/rsh.tests f
tests/rsh.right f
-tests/run-all f
-tests/run-minimal f
-tests/run-arith-for f
-tests/run-arith f
-tests/run-array f
-tests/run-array2 f
-tests/run-braces f
-tests/run-builtins f
-tests/run-cond f
-tests/run-cprint f
-tests/run-dirstack f
-tests/run-dollars f
-tests/run-errors f
-tests/run-execscript f
-tests/run-exp-tests f
-tests/run-extglob f
-tests/run-extglob2 f
-tests/run-func f
-tests/run-getopts f
-tests/run-glob-test f
-tests/run-heredoc f
-tests/run-herestr f
-tests/run-histexpand f
-tests/run-history f
-tests/run-ifs f
-tests/run-input-test f
-tests/run-invert f
-tests/run-jobs f
-tests/run-more-exp f
-tests/run-new-exp f
-tests/run-nquote f
-tests/run-nquote1 f
-tests/run-nquote2 f
-tests/run-nquote3 f
-tests/run-posix2 f
-tests/run-posixpat f
-tests/run-precedence f
-tests/run-printf f
-tests/run-quote f
-tests/run-read f
-tests/run-redir f
-tests/run-rhs-exp f
-tests/run-rsh f
-tests/run-set-e f
-tests/run-shopt f
-tests/run-strip f
-tests/run-test f
-tests/run-tilde f
-tests/run-trap f
-tests/run-type f
-tests/run-varenv f
+tests/run-all f 755
+tests/run-minimal f 755
+tests/run-arith-for f 755
+tests/run-arith f 755
+tests/run-array f 755
+tests/run-array2 f 755
+tests/run-braces f 755
+tests/run-builtins f 755
+tests/run-cond f 755
+tests/run-cprint f 755
+tests/run-dirstack f 755
+tests/run-dbg-is-fn f 755
+tests/run-dbg-support f 755
+tests/run-dbg-support2 f 755
+tests/run-dollars f 755
+tests/run-errors f 755
+tests/run-execscript f 755
+tests/run-exp-tests f 755
+tests/run-extglob f 755
+tests/run-extglob2 f 755
+tests/run-func f 755
+tests/run-getopts f 755
+tests/run-glob-test f 755
+tests/run-heredoc f 755
+tests/run-herestr f 755
+tests/run-histexpand f 755
+tests/run-history f 755
+tests/run-ifs f 755
+tests/run-input-test f 755
+tests/run-invert f 755
+tests/run-jobs f 755
+tests/run-more-exp f 755
+tests/run-new-exp f 755
+tests/run-nquote f 755
+tests/run-nquote1 f 755
+tests/run-nquote2 f 755
+tests/run-nquote3 f 755
+tests/run-posix2 f 755
+tests/run-posixpat f 755
+tests/run-precedence f 755
+tests/run-printf f 755
+tests/run-quote f 755
+tests/run-read f 755
+tests/run-redir f 755
+tests/run-rhs-exp f 755
+tests/run-rsh f 755
+tests/run-set-e f 755
+tests/run-set-x f 755
+tests/run-shopt f 755
+tests/run-strip f 755
+tests/run-test f 755
+tests/run-tilde f 755
+tests/run-trap f 755
+tests/run-type f 755
+tests/run-varenv f 755
tests/set-e-test f
tests/set-e.right f
-tests/shopt.tests f
+tests/set-x.tests f 755
+tests/set-x.right f
+tests/shopt.tests f 755
tests/shopt.right f
-tests/strip.tests f
+tests/strip.tests f 755
tests/strip.right f
-tests/test.tests f
+tests/test.tests f 755
tests/test.right f
-tests/tilde-tests f
+tests/tilde-tests f 755
tests/tilde.right f
-tests/trap.tests f
+tests/trap.tests f 755
tests/trap.right f
tests/trap1.sub f 755
tests/trap2.sub f 755
tests/trap2a.sub f 755
-tests/type.tests f
+tests/type.tests f 755
tests/type.right f
tests/varenv.right f
tests/varenv.sh f
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/Makefile.in cvs/Makefile.in
--- bash-2.05b/Makefile.in 2002-05-31 19:44:23.000000000 +0200
+++ cvs/Makefile.in 2003-09-08 08:40:14.000000000 +0200
@@ -38,6 +38,7 @@
man3dir = $(mandir)/$(manpfx)3
htmldir = @htmldir@
+transform = @program_transform_name@
# Support an alternate destination root directory for package building
DESTDIR =
@@ -395,6 +396,7 @@
DEFSRC=$(BUILTIN_SRCDIR)
BUILTIN_ABSSRC=${topdir}/builtins
DEFDIR = $(dot)/builtins
+DEBUGGERDIR = $(dot)/debugger
BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \
$(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \
@@ -464,7 +466,7 @@
# Keep GNU Make from exporting the entire environment for small machines.
.NOEXPORT:
-.made: $(Program) bashbug
+.made: .prebuild $(Program) bashbug doc debugger
@echo "$(Program) last made for a $(Machine) running $(OS)" >.made
$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
@@ -473,6 +475,14 @@
ls -l $(Program)
size $(Program)
+.prebuild:
+ @(oldpwd=`pwd`; cd $(srcdir) &&\
+ if test "X`pwd`" != "X$(BUILD_DIR)" ; then \
+ ${CP} $$oldpwd/pathnames.h $(srcdir)/ ; \
+ ${CP} $$oldpwd/doc/version.texi $(srcdir)/doc/ ; \
+ ${CP} $$oldpwd/doc/version.texi $(srcdir)/debugger/doc/ ; \
+ fi)
+
.build: $(SOURCES) config.h Makefile version.h $(VERSPROG)
@echo
@echo " ***********************************************************"
@@ -498,6 +508,9 @@
lint:
${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made
+aclocal.m4: bashlocal.m4
+ aclocal -I @srcdir@
+
version.h: $(SOURCES) config.h Makefile
$(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \
&& mv newversion.h version.h
@@ -594,8 +607,8 @@
# For the justification of the following Makefile rules, see node
# `Automatic Remaking' in GNU Autoconf documentation.
-Makefile makefile: config.status $(srcdir)/Makefile.in
- CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+Makefile makefile pathnames.h: config.status $(srcdir)/Makefile.in
+ CONFIG_HEADERS= $(SHELL) ./config.status
Makefiles makefiles: config.status $(srcdir)/Makefile.in
@for mf in $(CREATED_MAKEFILES); do \
@@ -627,6 +640,9 @@
doc documentation: force
@(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) )
+debugger: force
+ @( cd $(DEBUGGERDIR) ; $(MAKE) $(MFLAGS) info man html )
+
info dvi ps: force
@(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) CFLAGS='$(CCFLAGS)' $@ )
@@ -646,13 +662,14 @@
@${SHELL} $(SUPPORT_SRC)mkdirs $(DESTDIR)$(infodir)
install: .made installdirs
- $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program)
- $(INSTALL_SCRIPT) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug
+ $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/`echo $(Program) | sed '$(transform)'`
+ $(INSTALL_SCRIPT) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/`echo bashbug | sed '$(transform)'`
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
-( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ -( cd $(DEBUGGERDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
install-strip:
$(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
@@ -660,17 +677,21 @@
DESTDIR=$(DESTDIR) install
uninstall: .made
- $(RM) $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/bashbug
+ for p in $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/bashbug; do \
+ $(RM) $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; \
+ done
-( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
man1dir=$(man1dir) man1ext=$(man1ext) \
man3dir=$(man3dir) man3ext=$(man3ext) \
infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
+ -( cd $(DEBUGGERDIR) ; $(MAKE) $(MFLAGS) $@ )
.PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean
basic-clean:
$(RM) $(OBJECTS) $(Program) bashbug
- $(RM) .build .made version.h
+ $(RM) .build .made version.h pathname.h
+ $(RM) *.tar.gz *~ */*~
clean: basic-clean
( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
@@ -747,16 +768,16 @@
@cp $(TESTS_SUPPORT) tests
@( cd $(srcdir)/tests && \
PATH=$$PATH:$(BUILD_DIR)/tests THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+ @( cd $(srcdir)/debugger && make check )
symlinks:
$(SHELL) $(SUPPORT_SRC)fixlinks -s $(srcdir)
dist: force
- @echo Bash distributions are created using $(srcdir)/support/mkdist.
- @echo Here is a sample of the necessary commands:
- @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${Program} $(Version)-${RELSTATUS}
- @echo tar cf $(Program)-$(Version)-${RELSTATUS}.tar ${Program}-$(Version)-${RELSTATUS}
- @echo gzip $(Program)-$(Version)-${RELSTATUS}.tar
+ $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${Program} $(Version)-${RELSTATUS}
+ tar cf $(Program)-$(Version)-${RELSTATUS}.tar ${Program}-$(Version)-${RELSTATUS}
+ gzip $(Program)-$(Version)-${RELSTATUS}.tar
+ rm -fr $(Program)-$(Version)-${RELSTATUS}
depend: depends
@@ -767,6 +788,10 @@
hashtest: hashlib.c
$(CC) -DTEST_HASHING $(CCFLAGS) -o $@ $(srcdir)/hashlib.c
+arraytest: array.c xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
+ $(CC) -c -DTEST_ARRAY $(CCFLAGS) -o arraytest.o $(srcdir)/array.c
+ $(CC) $(CCFLAGS) -o $@ $(srcdir)/arraytest.o xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a list.o
+
############################ DEPENDENCIES ###############################
# Files that depend on the definitions in config-top.h, which are not meant
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/README cvs/README
--- bash-2.05b/README 2002-04-04 18:02:55.000000000 +0200
+++ cvs/README 2002-09-17 13:57:46.000000000 +0200
@@ -1,15 +1,20 @@
Introduction
============
-This is GNU Bash, version 2.05b. Bash is the GNU Project's Bourne
-Again SHell, a complete implementation of the POSIX.2 shell spec,
-but also with interactive command line editing, job control on
-architectures that support it, csh-like features such as history
-substitution and brace expansion, and a slew of other features.
-For more information on the features of Bash that are new to this
-type of shell, see the file `doc/bashref.texi'. There is also a
-large Unix-style man page. The man page is the definitive description
-of the shell's features.
+This is GNU Bash, version 2.05b-debugger. A patched version of Bash
+2.05b to provide debugging support and better error reporting.
+
+Bash is the GNU Project's Bourne Again SHell, a complete
+implementation of the POSIX.2 shell spec, but also with interactive
+command line editing, job control on architectures that support it,
+csh-like features such as history substitution and brace expansion,
+and a slew of other features. For more information on the features of
+Bash that are new to this type of shell, see the file
+`doc/bashref.texi'. There is also a large Unix-style man page. The
+man page is the definitive description of the shell's features.
+
+For more information on the features of the Bash debugger, see
+doc/bashdb.texi.
See the file CWRU/POSIX.NOTES for a discussion of how Bash differs
from the POSIX.2 spec and a description of the Bash `posix mode'.
@@ -27,8 +32,13 @@
`doc/FAQ'.
To compile Bash, try typing `./configure', then `make'. Bash
-auto-configures the build process, so no further intervention
-should be necessary. Bash builds with `gcc' by default if it is
+auto-configures the build process, so no most intervention is not
+necessary. However one can customize where the binaries should go or
+where to install debugger lisp files. To see the list of
+customizations available, type ./configure --help.
+
+
+Bash builds with `gcc' by default if it is
available. If you want to use `cc' instead, type
CC=cc ./configure
@@ -50,8 +60,21 @@
Reporting Bugs
==============
-Bug reports for bash should be sent to:
+If the problem is in the debugger rather than bash (i.e. you don't
+have the same problem using an unpatched version of Bash, send bug
+reports to:
+
+ bug-bashdb@sourceforge.net.
+
+The discussion list `bug-devel@gnu.org' contains developer information
+and discussions of new features or behavior changes that people would
+like. This mailing list is also available as a usenet newsgroup:
+gnu.bash.bug.
+If the problem is not debugger-related (i.e. you do have the same
+problem using an unmodified version bash), send bug reports to
+
+Bug reports for bash should be sent to:
bug-bash@gnu.org
using the `bashbug' program that is built and installed at the same
@@ -88,3 +111,8 @@
Chet Ramey
chet@po.cwru.edu
+
+with modifications for the Bash Debugger by Rocky Bernstein
+rocky@panix.com
+
+$Id: README,v 1.3 2002/09/17 11:57:46 rockyb Exp $
Only in bash-2.05b: aclocal.m4
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/array.c cvs/array.c
--- bash-2.05b/array.c 2002-03-18 19:16:50.000000000 +0100
+++ cvs/array.c 2002-10-10 14:34:00.000000000 +0200
@@ -365,8 +365,10 @@
array_dispose_element(ae)
ARRAY_ELEMENT *ae;
{
- FREE(ae->value);
- free(ae);
+ if (NULL != ae) {
+ FREE(ae->value);
+ free(ae);
+ }
}
/*
@@ -650,10 +652,67 @@
}
#endif
+/*
+ Delete the beginning of array A, subtracting one from all other
+ array element indices.
+ Return the element. The caller should dispose of it.
+*/
+ARRAY_ELEMENT *
+array_unshift_element(a)
+ARRAY *a;
+{
+ register ARRAY_ELEMENT *ae, *first;
+
+ if (!a || array_empty(a))
+ return((ARRAY_ELEMENT *) NULL);
+ first=element_forw(a->head);
+ first->next->prev = first->prev;
+ first->prev->next = first->next;
+ a->num_elements--;
+ a->max_index--;
+
+ /* Renumber the element array indices. */
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
+ element_index(ae)--;
+
+ return(first);
+}
+
+/*
+ Add a new element with index to beginning of array a, adding one to
+ all other array indices. Return the number of elements after adding.
+ */
+int
+array_shift_element(a, v)
+ARRAY *a;
+char *v;
+{
+ register ARRAY_ELEMENT *new, *ae, *temp;
+ arrayind_t i=0;
+
+ if (!a)
+ return(-1);
+ new = array_create_element(0, v);
+ temp=element_forw(a->head);
+ ADD_BEFORE(temp, new);
+
+ a->num_elements++;
+ a->max_index++;
+
+ /*
+ * Renumber all the other elements in the array.
+ */
+ for (ae = element_forw(new); ae != a->head; ae = element_forw(ae)) {
+ element_index(ae) = ++i;
+ }
+ return (a->num_elements);
+}
+
+
#if defined (TEST_ARRAY)
/*
* To make a running version, compile -DTEST_ARRAY and link with:
- * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
+ * xmalloc.o syntax.o list.o lib/malloc/libmalloc.a lib/sh/libsh.a
*/
int interrupt_immediately = 0;
@@ -723,21 +782,6 @@
return (REVERSE_LIST (wl, WORD_LIST *));
}
-GENERIC_LIST *
-list_reverse (list)
-GENERIC_LIST *list;
-{
- register GENERIC_LIST *next, *prev;
-
- for (prev = 0; list; ) {
- next = list->next;
- list->next = prev;
- prev = list;
- list = next;
- }
- return prev;
-}
-
char *
pat_subst(s, t, u, i)
char *s, *t, *u;
@@ -772,7 +816,7 @@
main()
{
- ARRAY *a, *new_a, *copy_of_a;
+ ARRAY *a, *new_a, *copy_of_a, *stack;
ARRAY_ELEMENT *ae, *aew;
char *s;
@@ -784,24 +828,29 @@
array_insert(a, 12, "twelve");
array_insert(a, 42, "forty-two");
print_array(a);
+ printf("\n=> s = array_to_string(a, \" \", 0);\n");
s = array_to_string (a, " ", 0);
printf("s = %s\n", s);
+ printf("\n=> copy_of_a = array_from_string(s, \" \");\n");
copy_of_a = array_from_string(s, " ");
- printf("copy_of_a:");
print_array(copy_of_a);
array_dispose(copy_of_a);
printf("\n");
free(s);
+ printf("=> s = array_remove(a, 4);\n");
ae = array_remove(a, 4);
array_dispose_element(ae);
+ printf("=> s = array_remove(a, 1029);\n");
ae = array_remove(a, 1029);
array_dispose_element(ae);
+ printf("=> s = array_insert(a, 16, \"sixteen\"\n);\n");
array_insert(a, 16, "sixteen");
print_array(a);
+ printf("\n=> s = array_to_string(a, \" \", 0);\n");
s = array_to_string (a, " ", 0);
printf("s = %s\n", s);
+ printf("\n=> copy_of_a = array_from_string(s, \" \");\n");
copy_of_a = array_from_string(s, " ");
- printf("copy_of_a:");
print_array(copy_of_a);
array_dispose(copy_of_a);
printf("\n");
@@ -811,10 +860,11 @@
array_insert(a, 0, "zero");
array_insert(a, 134, "");
print_array(a);
+ printf("\n=> s = array_to_string(a, \":\", 0);\n");
s = array_to_string (a, ":", 0);
printf("s = %s\n", s);
+ printf("\n=> copy_of_a = array_from_string(s, \" \");\n");
copy_of_a = array_from_string(s, ":");
- printf("copy_of_a:");
print_array(copy_of_a);
array_dispose(copy_of_a);
printf("\n");
@@ -857,6 +907,23 @@
printf("\n");
array_dispose(a);
array_dispose(new_a);
+
+ stack = array_create();
+ array_shift_element(stack, "first");
+ print_array(stack);
+ printf("\n=> array_shift_element(stack, \"second\");\n");
+ array_shift_element(stack, "second");
+ print_array(stack);
+ printf("\n=> array_unshift_element(stack);\n");
+ ae = array_unshift_element(stack);
+ array_dispose_element(ae);
+ print_array(stack);
+ printf("\n=> array_unshift_element(stack);\n");
+ ae = array_unshift_element(stack);
+ array_dispose_element(ae);
+ print_array(stack);
+ printf("** should see empty nothing above.***\n");
+ array_dispose(stack);
}
#endif /* TEST_ARRAY */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/array.h cvs/array.h
--- bash-2.05b/array.h 2002-03-14 14:42:51.000000000 +0100
+++ cvs/array.h 2002-08-23 06:17:00.000000000 +0200
@@ -51,6 +51,7 @@
extern void array_walk __P((ARRAY *, sh_ae_map_func_t *));
extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int));
+extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *));
extern int array_rshift __P((ARRAY *, int, char *));
extern ARRAY *array_quote __P((ARRAY *));
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/autogen.sh cvs/autogen.sh
--- bash-2.05b/autogen.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/autogen.sh 2002-09-19 18:39:08.000000000 +0200
@@ -0,0 +1,20 @@
+#!/bin/sh
+# $Id: autogen.sh,v 1.2 2002/09/19 16:39:08 masata-y Exp $
+# Run this to generate all the initial Makefiles, etc.
+
+./bootstrap.sh $@
+
+echo " + Running 'configure $@':"
+if [ -z "$*" ]; then
+ echo " ** If you wish to pass arguments to ./configure, please"
+ echo " ** specify them on the command line."
+fi
+
+./configure "$@" && \
+ echo "Now type 'make' to compile $PKG_NAME" || exit 1
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bashhist.c cvs/bashhist.c
--- bash-2.05b/bashhist.c 2002-03-12 16:29:56.000000000 +0100
+++ cvs/bashhist.c 2003-05-24 22:13:47.000000000 +0200
@@ -206,6 +206,7 @@
history_quotes_inhibit_expansion = 1;
history_search_delimiter_chars = ";&()|<>";
history_inhibit_expansion_function = bash_history_inhibit_expansion;
+ history_comment_char = '#';
}
void
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bashline.c cvs/bashline.c
--- bash-2.05b/bashline.c 2002-05-07 21:52:42.000000000 +0200
+++ cvs/bashline.c 2002-12-07 04:51:32.000000000 +0100
@@ -747,7 +747,7 @@
/* Now, POSIX.1-2001 and SUSv3 say that the commands executed from the
temporary file should be placed into the history. We don't do that
yet. */
- r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST);
+ r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST, 0);
current_command_line_count = cclc;
@@ -1044,7 +1044,10 @@
}
else
{
+#define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && *(x) != '~' && test_for_directory (x))
+
matches = rl_completion_matches (text, command_word_completion_function);
+
/* If we are attempting command completion and nothing matches, we
do not want readline to perform filename completion for us. We
still want to be able to complete partial pathnames, so set the
@@ -1052,7 +1055,7 @@
filenames and leave directories in the match list. */
if (matches == (char **)NULL)
rl_ignore_some_completions_function = bash_ignore_filenames;
- else if (matches[1] == 0 && *matches[0] != '/')
+ else if (matches[1] == 0 && CMD_IS_DIR(matches[0]))
/* Turn off rl_filename_completion_desired so readline doesn't
append a slash if there is a directory with the same name
in the current directory, or other filename-specific things.
@@ -1061,7 +1064,7 @@
looking in the current directory anyway, so there's no
conflict. */
rl_filename_completion_desired = 0;
- else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && *matches[0] != '/')
+ else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
/* There are multiple instances of the same match (duplicate
completions haven't yet been removed). In this case, all of
the matches will be the same, and the duplicate removal code
@@ -2717,7 +2720,7 @@
ts = save_token_state ();
cmd = savestring (cmd);
- parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST);
+ parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST, 0);
current_command_line_count = old_line_count;
restore_token_state (ts);
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bashlocal.m4 cvs/bashlocal.m4
--- bash-2.05b/bashlocal.m4 1970-01-01 01:00:00.000000000 +0100
+++ cvs/bashlocal.m4 2002-09-09 20:25:01.000000000 +0200
@@ -0,0 +1,1792 @@
+dnl
+dnl Bash specific tests
+dnl
+dnl Some derived from PDKSH 5.1.3 autoconf tests
+dnl
+
+AC_DEFUN(BASH_C_LONG_LONG,
+[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
+[if test "$GCC" = yes; then
+ ac_cv_c_long_long=yes
+else
+AC_TRY_RUN([
+int
+main()
+{
+long long foo = 0;
+exit(sizeof(long long) < sizeof(long));
+}
+], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
+fi])
+if test $ac_cv_c_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
+fi
+])
+
+dnl
+dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
+dnl (< changed to <=) added.
+dnl
+AC_DEFUN(BASH_C_LONG_DOUBLE,
+[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
+[if test "$GCC" = yes; then
+ ac_cv_c_long_double=yes
+else
+AC_TRY_RUN([
+int
+main()
+{
+ /* The Stardent Vistra knows sizeof(long double), but does not
+ support it. */
+ long double foo = 0.0;
+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ /* On IRIX 5.3, the compiler converts long double to double with a warning,
+ but compiles this successfully. */
+ exit(sizeof(long double) <= sizeof(double));
+}
+], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
+fi])
+if test $ac_cv_c_long_double = yes; then
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
+fi
+])
+
+dnl
+dnl Check for <inttypes.h>. This is separated out so that it can be
+dnl AC_REQUIREd.
+dnl
+dnl BASH_HEADER_INTTYPES
+AC_DEFUN(BASH_HEADER_INTTYPES,
+[
+ AC_CHECK_HEADERS(inttypes.h)
+])
+
+dnl
+dnl check for typedef'd symbols in header files, but allow the caller to
+dnl specify the include files to be checked in addition to the default
+dnl
+dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
+AC_DEFUN(BASH_CHECK_TYPE,
+[
+AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_REQUIRE([BASH_HEADER_INTTYPES])
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(bash_cv_type_$1,
+[AC_EGREP_CPP($1, [#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+$2
+], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
+AC_MSG_RESULT($bash_cv_type_$1)
+ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
+ AC_DEFINE($4)
+ fi])
+if test $bash_cv_type_$1 = no; then
+ AC_DEFINE_UNQUOTED($1, $3)
+fi
+])
+
+dnl
+dnl BASH_CHECK_DECL(FUNC)
+dnl
+dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
+dnl AC_CHECK_DECL
+dnl
+AC_DEFUN(BASH_CHECK_DECL,
+[
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([BASH_HEADER_INTTYPES])
+AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
+[AC_TRY_LINK(
+[
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+],
+[return !$1;],
+bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
+bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_$1 = yes; then
+ AC_DEFINE_UNQUOTED($bash_tr_func, 1)
+else
+ AC_DEFINE_UNQUOTED($bash_tr_func, 0)
+fi
+])
+
+AC_DEFUN(BASH_DECL_PRINTF,
+[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
+AC_CACHE_VAL(bash_cv_printf_declared,
+[AC_TRY_RUN([
+#include <stdio.h>
+#ifdef __STDC__
+typedef int (*_bashfunc)(const char *, ...);
+#else
+typedef int (*_bashfunc)();
+#endif
+main()
+{
+_bashfunc pf;
+pf = (_bashfunc) printf;
+exit(pf == 0);
+}
+], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
+ [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
+ bash_cv_printf_declared=yes]
+)])
+AC_MSG_RESULT($bash_cv_printf_declared)
+if test $bash_cv_printf_declared = yes; then
+AC_DEFINE(PRINTF_DECLARED)
+fi
+])
+
+AC_DEFUN(BASH_DECL_SBRK,
+[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
+AC_CACHE_VAL(bash_cv_sbrk_declared,
+[AC_EGREP_HEADER(sbrk, unistd.h,
+ bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
+AC_MSG_RESULT($bash_cv_sbrk_declared)
+if test $bash_cv_sbrk_declared = yes; then
+AC_DEFINE(SBRK_DECLARED)
+fi
+])
+
+dnl
+dnl Check for sys_siglist[] or _sys_siglist[]
+dnl
+AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST,
+[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
+AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif], [ char *msg = _sys_siglist[2]; ],
+ bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
+ [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
+AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
+if test $bash_cv_decl_under_sys_siglist = yes; then
+AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
+fi
+])
+
+AC_DEFUN(BASH_UNDER_SYS_SIGLIST,
+[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
+AC_MSG_CHECKING([for _sys_siglist in system C library])
+AC_CACHE_VAL(bash_cv_under_sys_siglist,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef UNDER_SYS_SIGLIST_DECLARED
+extern char *_sys_siglist[];
+#endif
+main()
+{
+char *msg = (char *)_sys_siglist[2];
+exit(msg == 0);
+}],
+ bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
+ [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
+ bash_cv_under_sys_siglist=no])])
+AC_MSG_RESULT($bash_cv_under_sys_siglist)
+if test $bash_cv_under_sys_siglist = yes; then
+AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
+fi
+])
+
+AC_DEFUN(BASH_SYS_SIGLIST,
+[AC_REQUIRE([AC_DECL_SYS_SIGLIST])
+AC_MSG_CHECKING([for sys_siglist in system C library])
+AC_CACHE_VAL(bash_cv_sys_siglist,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef SYS_SIGLIST_DECLARED
+extern char *sys_siglist[];
+#endif
+main()
+{
+char *msg = sys_siglist[2];
+exit(msg == 0);
+}],
+ bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
+ [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
+ bash_cv_sys_siglist=no])])
+AC_MSG_RESULT($bash_cv_sys_siglist)
+if test $bash_cv_sys_siglist = yes; then
+AC_DEFINE(HAVE_SYS_SIGLIST)
+fi
+])
+
+dnl Check for the various permutations of sys_siglist and make sure we
+dnl compile in siglist.o if they're not defined
+AC_DEFUN(BASH_CHECK_SYS_SIGLIST, [
+AC_REQUIRE([BASH_SYS_SIGLIST])
+AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
+AC_REQUIRE([BASH_FUNC_STRSIGNAL])
+if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
+ SIGLIST_O=siglist.o
+else
+ SIGLIST_O=
+fi
+AC_SUBST([SIGLIST_O])
+])
+
+dnl Check for sys_errlist[] and sys_nerr, check for declaration
+AC_DEFUN(BASH_SYS_ERRLIST,
+[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
+AC_CACHE_VAL(bash_cv_sys_errlist,
+[AC_TRY_LINK([#include <errno.h>],
+[extern char *sys_errlist[];
+ extern int sys_nerr;
+ char *msg = sys_errlist[sys_nerr - 1];],
+ bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
+AC_MSG_RESULT($bash_cv_sys_errlist)
+if test $bash_cv_sys_errlist = yes; then
+AC_DEFINE(HAVE_SYS_ERRLIST)
+fi
+])
+
+dnl
+dnl Check if dup2() does not clear the close on exec flag
+dnl
+AC_DEFUN(BASH_FUNC_DUP2_CLOEXEC_CHECK,
+[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
+AC_CACHE_VAL(bash_cv_dup2_broken,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <fcntl.h>
+main()
+{
+ int fd1, fd2, fl;
+ fd1 = open("/dev/null", 2);
+ if (fcntl(fd1, 2, 1) < 0)
+ exit(1);
+ fd2 = dup2(fd1, 1);
+ if (fd2 < 0)
+ exit(2);
+ fl = fcntl(fd2, 1, 0);
+ /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
+ exit(fl != 1);
+}
+], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
+ [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
+ bash_cv_dup2_broken=no])
+])
+AC_MSG_RESULT($bash_cv_dup2_broken)
+if test $bash_cv_dup2_broken = yes; then
+AC_DEFINE(DUP2_BROKEN)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_STRSIGNAL,
+[AC_MSG_CHECKING([for the existence of strsignal])
+AC_CACHE_VAL(bash_cv_have_strsignal,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <signal.h>],
+[char *s = (char *)strsignal(2);],
+ bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
+AC_MSG_RESULT($bash_cv_have_strsignal)
+if test $bash_cv_have_strsignal = yes; then
+AC_DEFINE(HAVE_STRSIGNAL)
+fi
+])
+
+dnl Check to see if opendir will open non-directories (not a nice thing)
+AC_DEFUN(BASH_FUNC_OPENDIR_CHECK,
+[AC_REQUIRE([AC_HEADER_DIRENT])dnl
+AC_MSG_CHECKING(if opendir() opens non-directories)
+AC_CACHE_VAL(bash_cv_opendir_not_robust,
+[AC_TRY_RUN([
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+main()
+{
+DIR *dir;
+int fd, err;
+err = mkdir("/tmp/bash-aclocal", 0700);
+if (err < 0) {
+ perror("mkdir");
+ exit(1);
+}
+unlink("/tmp/bash-aclocal/not_a_directory");
+fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
+write(fd, "\n", 1);
+close(fd);
+dir = opendir("/tmp/bash-aclocal/not_a_directory");
+unlink("/tmp/bash-aclocal/not_a_directory");
+rmdir("/tmp/bash-aclocal");
+exit (dir == 0);
+}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
+ [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
+ bash_cv_opendir_not_robust=no]
+)])
+AC_MSG_RESULT($bash_cv_opendir_not_robust)
+if test $bash_cv_opendir_not_robust = yes; then
+AC_DEFINE(OPENDIR_NOT_ROBUST)
+fi
+])
+
+dnl
+AC_DEFUN(BASH_TYPE_SIGHANDLER,
+[AC_MSG_CHECKING([whether signal handlers are of type void])
+AC_CACHE_VAL(bash_cv_void_sighandler,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+void (*signal ()) ();],
+[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
+AC_MSG_RESULT($bash_cv_void_sighandler)
+if test $bash_cv_void_sighandler = yes; then
+AC_DEFINE(VOID_SIGHANDLER)
+fi
+])
+
+dnl
+dnl A signed 16-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS16_T,
+[
+if test "$ac_cv_sizeof_short" = 2; then
+ AC_CHECK_TYPE(bits16_t, short)
+elif test "$ac_cv_sizeof_char" = 2; then
+ AC_CHECK_TYPE(bits16_t, char)
+else
+ AC_CHECK_TYPE(bits16_t, short)
+fi
+])
+
+dnl
+dnl An unsigned 16-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_U_BITS16_T,
+[
+if test "$ac_cv_sizeof_short" = 2; then
+ AC_CHECK_TYPE(u_bits16_t, unsigned short)
+elif test "$ac_cv_sizeof_char" = 2; then
+ AC_CHECK_TYPE(u_bits16_t, unsigned char)
+else
+ AC_CHECK_TYPE(u_bits16_t, unsigned short)
+fi
+])
+
+dnl
+dnl A signed 32-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS32_T,
+[
+if test "$ac_cv_sizeof_int" = 4; then
+ AC_CHECK_TYPE(bits32_t, int)
+elif test "$ac_cv_sizeof_long" = 4; then
+ AC_CHECK_TYPE(bits32_t, long)
+else
+ AC_CHECK_TYPE(bits32_t, int)
+fi
+])
+
+dnl
+dnl An unsigned 32-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_U_BITS32_T,
+[
+if test "$ac_cv_sizeof_int" = 4; then
+ AC_CHECK_TYPE(u_bits32_t, unsigned int)
+elif test "$ac_cv_sizeof_long" = 4; then
+ AC_CHECK_TYPE(u_bits32_t, unsigned long)
+else
+ AC_CHECK_TYPE(u_bits32_t, unsigned int)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_PTRDIFF_T,
+[
+if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
+ AC_CHECK_TYPE(ptrdiff_t, int)
+elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
+ AC_CHECK_TYPE(ptrdiff_t, long)
+elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
+ AC_CHECK_TYPE(ptrdiff_t, [long long])
+else
+ AC_CHECK_TYPE(ptrdiff_t, int)
+fi
+])
+
+dnl
+dnl A signed 64-bit quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS64_T,
+[
+if test "$ac_cv_sizeof_char_p" = 8; then
+ AC_CHECK_TYPE(bits64_t, char *)
+elif test "$ac_cv_sizeof_double" = 8; then
+ AC_CHECK_TYPE(bits64_t, double)
+elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
+ AC_CHECK_TYPE(bits64_t, [long long])
+elif test "$ac_cv_sizeof_long" = 8; then
+ AC_CHECK_TYPE(bits64_t, long)
+else
+ AC_CHECK_TYPE(bits64_t, double)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_LONG_LONG,
+[
+AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
+[AC_TRY_LINK([
+long long ll = 1; int i = 63;],
+[
+long long llm = (long long) -1;
+return ll << i | ll >> i | llm / ll | llm % ll;
+], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
+if test "$bash_cv_type_long_long" = 'long long'; then
+ AC_DEFINE(HAVE_LONG_LONG, 1)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_UNSIGNED_LONG_LONG,
+[
+AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
+[AC_TRY_LINK([
+unsigned long long ull = 1; int i = 63;],
+[
+unsigned long long ullmax = (unsigned long long) -1;
+return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+], bash_cv_type_unsigned_long_long='unsigned long long',
+ bash_cv_type_unsigned_long_long='unsigned long')])
+if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
+fi
+])
+
+dnl
+dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
+dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
+dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify
+dnl matters, this just checks for rlim_t, quad_t, or long.
+dnl
+AC_DEFUN(BASH_TYPE_RLIMIT,
+[AC_MSG_CHECKING(for size and type of struct rlimit fields)
+AC_CACHE_VAL(bash_cv_type_rlimit,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/resource.h>],
+[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+main()
+{
+#ifdef HAVE_QUAD_T
+ struct rlimit rl;
+ if (sizeof(rl.rlim_cur) == sizeof(quad_t))
+ exit(0);
+#endif
+ exit(1);
+}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
+ [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
+ bash_cv_type_rlimit=long])])
+])
+AC_MSG_RESULT($bash_cv_type_rlimit)
+if test $bash_cv_type_rlimit = quad_t; then
+AC_DEFINE(RLIMTYPE, quad_t)
+elif test $bash_cv_type_rlimit = rlim_t; then
+AC_DEFINE(RLIMTYPE, rlim_t)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_LSTAT,
+[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
+dnl inline function in <sys/stat.h>.
+AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
+[AC_TRY_LINK([
+#include <sys/types.h>
+#include <sys/stat.h>
+],[ lstat(".",(struct stat *)0); ],
+bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
+if test $bash_cv_func_lstat = yes; then
+ AC_DEFINE(HAVE_LSTAT)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_INET_ATON,
+[
+AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
+[AC_TRY_LINK([
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
+bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
+if test $bash_cv_func_inet_aton = yes; then
+ AC_DEFINE(HAVE_INET_ATON)
+else
+ AC_LIBOBJ(inet_aton)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_GETENV,
+[AC_MSG_CHECKING(to see if getenv can be redefined)
+AC_CACHE_VAL(bash_cv_getenv_redef,
+[AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+char *
+getenv (name)
+#if defined (__linux__) || defined (__bsdi__) || defined (convex)
+ const char *name;
+#else
+ char const *name;
+#endif /* !__linux__ && !__bsdi__ && !convex */
+{
+return "42";
+}
+main()
+{
+char *s;
+/* The next allows this program to run, but does not allow bash to link
+ when it redefines getenv. I'm not really interested in figuring out
+ why not. */
+#if defined (NeXT)
+exit(1);
+#endif
+s = getenv("ABCDE");
+exit(s == 0); /* force optimizer to leave getenv in */
+}
+], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
+ [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
+ bash_cv_getenv_redef=yes]
+)])
+AC_MSG_RESULT($bash_cv_getenv_redef)
+if test $bash_cv_getenv_redef = yes; then
+AC_DEFINE(CAN_REDEFINE_GETENV)
+fi
+])
+
+# We should check for putenv before calling this
+AC_DEFUN(BASH_FUNC_STD_PUTENV,
+[
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([AC_C_PROTOTYPES])
+AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
+[AC_TRY_LINK([
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+#ifdef PROTOTYPES
+extern int putenv (char *);
+#else
+extern int putenv ();
+#endif
+],
+[return (putenv == 0);],
+bash_cv_std_putenv=yes, bash_cv_std_putenv=no
+)])
+if test $bash_cv_std_putenv = yes; then
+AC_DEFINE(HAVE_STD_PUTENV)
+fi
+])
+
+# We should check for unsetenv before calling this
+AC_DEFUN(BASH_FUNC_STD_UNSETENV,
+[
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([AC_C_PROTOTYPES])
+AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
+[AC_TRY_LINK([
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+#ifdef PROTOTYPES
+extern int unsetenv (const char *);
+#else
+extern int unsetenv ();
+#endif
+],
+[return (unsetenv == 0);],
+bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
+)])
+if test $bash_cv_std_unsetenv = yes; then
+AC_DEFINE(HAVE_STD_UNSETENV)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS,
+[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
+AC_CACHE_VAL(bash_cv_ulimit_maxfds,
+[AC_TRY_RUN([
+main()
+{
+long maxfds = ulimit(4, 0L);
+exit (maxfds == -1L);
+}
+], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
+ [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
+ bash_cv_ulimit_maxfds=no]
+)])
+AC_MSG_RESULT($bash_cv_ulimit_maxfds)
+if test $bash_cv_ulimit_maxfds = yes; then
+AC_DEFINE(ULIMIT_MAXFDS)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_GETCWD,
+[AC_MSG_CHECKING([if getcwd() calls popen()])
+AC_CACHE_VAL(bash_cv_getcwd_calls_popen,
+[AC_TRY_RUN([
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifndef __STDC__
+#ifndef const
+#define const
+#endif
+#endif
+
+int popen_called;
+
+FILE *
+popen(command, type)
+ const char *command;
+ const char *type;
+{
+ popen_called = 1;
+ return (FILE *)NULL;
+}
+
+FILE *_popen(command, type)
+ const char *command;
+ const char *type;
+{
+ return (popen (command, type));
+}
+
+int
+pclose(stream)
+FILE *stream;
+{
+ return 0;
+}
+
+int
+_pclose(stream)
+FILE *stream;
+{
+ return 0;
+}
+
+main()
+{
+ char lbuf[32];
+ popen_called = 0;
+ getcwd(lbuf, 32);
+ exit (popen_called);
+}
+], bash_cv_getcwd_calls_popen=no, bash_cv_getcwd_calls_popen=yes,
+ [AC_MSG_WARN(cannot check whether getcwd calls popen if cross compiling -- defaulting to no)
+ bash_cv_getcwd_calls_popen=no]
+)])
+AC_MSG_RESULT($bash_cv_getcwd_calls_popen)
+if test $bash_cv_getcwd_calls_popen = yes; then
+AC_DEFINE(GETCWD_BROKEN)
+AC_LIBOBJ(getcwd)
+fi
+])
+
+dnl
+dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
+dnl system, we can't use AC_PREREQ
+dnl
+AC_DEFUN(BASH_FUNC_GETHOSTBYNAME,
+[if test "X$bash_cv_have_gethostbyname" = "X"; then
+_bash_needmsg=yes
+else
+AC_MSG_CHECKING(for gethostbyname in socket library)
+_bash_needmsg=
+fi
+AC_CACHE_VAL(bash_cv_have_gethostbyname,
+[AC_TRY_LINK([#include <netdb.h>],
+[ struct hostent *hp;
+ hp = gethostbyname("localhost");
+], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
+)
+if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_CHECKING(for gethostbyname in socket library)
+fi
+AC_MSG_RESULT($bash_cv_have_gethostbyname)
+if test "$bash_cv_have_gethostbyname" = yes; then
+AC_DEFINE(HAVE_GETHOSTBYNAME)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_FNMATCH_EXTMATCH,
+[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
+AC_CACHE_VAL(bash_cv_fnm_extmatch,
+[AC_TRY_RUN([
+#include <fnmatch.h>
+
+main()
+{
+#ifdef FNM_EXTMATCH
+ exit (0);
+#else
+ exit (1);
+#endif
+}
+], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
+ [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
+ bash_cv_fnm_extmatch=no])
+])
+AC_MSG_RESULT($bash_cv_fnm_extmatch)
+if test $bash_cv_fnm_extmatch = yes; then
+AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_POSIX_SETJMP,
+[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
+AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
+AC_CACHE_VAL(bash_cv_func_sigsetjmp,
+[AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <signal.h>
+#include <setjmp.h>
+
+main()
+{
+#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
+exit (1);
+#else
+
+int code;
+sigset_t set, oset;
+sigjmp_buf xx;
+
+/* get the mask */
+sigemptyset(&set);
+sigemptyset(&oset);
+sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
+sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
+
+/* save it */
+code = sigsetjmp(xx, 1);
+if (code)
+ exit(0); /* could get sigmask and compare to oset here. */
+
+/* change it */
+sigaddset(&set, SIGINT);
+sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
+
+/* and siglongjmp */
+siglongjmp(xx, 10);
+exit(1);
+#endif
+}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
+ [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
+ bash_cv_func_sigsetjmp=missing]
+)])
+AC_MSG_RESULT($bash_cv_func_sigsetjmp)
+if test $bash_cv_func_sigsetjmp = present; then
+AC_DEFINE(HAVE_POSIX_SIGSETJMP)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_STRCOLL,
+[
+AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
+AC_CACHE_VAL(bash_cv_func_strcoll_broken,
+[AC_TRY_RUN([
+#include <stdio.h>
+#if defined (HAVE_LOCALE_H)
+#include <locale.h>
+#endif
+
+main(c, v)
+int c;
+char *v[];
+{
+ int r1, r2;
+ char *deflocale, *defcoll;
+
+#ifdef HAVE_SETLOCALE
+ deflocale = setlocale(LC_ALL, "");
+ defcoll = setlocale(LC_COLLATE, "");
+#endif
+
+#ifdef HAVE_STRCOLL
+ /* These two values are taken from tests/glob-test. */
+ r1 = strcoll("abd", "aXd");
+#else
+ r1 = 0;
+#endif
+ r2 = strcmp("abd", "aXd");
+
+ /* These two should both be greater than 0. It is permissible for
+ a system to return different values, as long as the sign is the
+ same. */
+
+ /* Exit with 1 (failure) if these two values are both > 0, since
+ this tests whether strcoll(3) is broken with respect to strcmp(3)
+ in the default locale. */
+ exit (r1 > 0 && r2 > 0);
+}
+], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
+ [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
+ bash_cv_func_strcoll_broken=no]
+)])
+AC_MSG_RESULT($bash_cv_func_strcoll_broken)
+if test $bash_cv_func_strcoll_broken = yes; then
+AC_DEFINE(STRCOLL_BROKEN)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_PRINTF_A_FORMAT,
+[AC_MSG_CHECKING([for printf floating point output in hex notation])
+AC_CACHE_VAL(bash_cv_printf_a_format,
+[AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+
+int
+main()
+{
+ double y = 0.0;
+ char abuf[1024];
+
+ sprintf(abuf, "%A", y);
+ exit(strchr(abuf, 'P') == (char *)0);
+}
+], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
+ [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
+ bash_cv_printf_a_format=no]
+)])
+AC_MSG_RESULT($bash_cv_printf_a_format)
+if test $bash_cv_printf_a_format = yes; then
+AC_DEFINE(HAVE_PRINTF_A_FORMAT)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC,
+[
+AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
+#include <sys/types.h>
+#include <termios.h>
+])
+])
+
+AC_DEFUN(BASH_STRUCT_TERMIO_LDISC,
+[
+AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
+#include <sys/types.h>
+#include <termio.h>
+])
+])
+
+dnl
+dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
+dnl
+dnl sets bash_cv_struct_stat_st_blocks
+dnl
+dnl unused for now; we'll see how AC_CHECK_MEMBERS works
+dnl
+AC_DEFUN(BASH_STRUCT_ST_BLOCKS,
+[
+AC_MSG_CHECKING([for struct stat.st_blocks])
+AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
+[AC_TRY_COMPILE(
+[
+#include <sys/types.h>
+#include <sys/stat.h>
+],
+[
+main()
+{
+static struct stat a;
+if (a.st_blocks) return 0;
+return 0;
+}
+], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
+])
+AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
+if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
+AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_LIB_TERMCAP,
+[
+if test "X$bash_cv_termcap_lib" = "X"; then
+_bash_needmsg=yes
+else
+AC_MSG_CHECKING(which library has the termcap functions)
+_bash_needmsg=
+fi
+AC_CACHE_VAL(bash_cv_termcap_lib,
+[AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
+ [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
+ [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
+ [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
+ bash_cv_termcap_lib=gnutermcap)])])])])
+if test "X$_bash_needmsg" = "Xyes"; then
+AC_MSG_CHECKING(which library has the termcap functions)
+fi
+AC_MSG_RESULT(using $bash_cv_termcap_lib)
+if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
+LDFLAGS="$LDFLAGS -L./lib/termcap"
+TERMCAP_LIB="./lib/termcap/libtermcap.a"
+TERMCAP_DEP="./lib/termcap/libtermcap.a"
+elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
+TERMCAP_LIB=-ltermcap
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libtinfo; then
+TERMCAP_LIB=-ltinfo
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libncurses; then
+TERMCAP_LIB=-lncurses
+TERMCAP_DEP=
+else
+TERMCAP_LIB=-lcurses
+TERMCAP_DEP=
+fi
+])
+
+dnl
+dnl Check for the presence of getpeername in libsocket.
+dnl If libsocket is present, check for libnsl and add it to LIBS if
+dnl it's there, since most systems with libsocket require linking
+dnl with libnsl as well. This should only be called if getpeername
+dnl was not found in libc.
+dnl
+dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
+dnl AS WELL
+dnl
+AC_DEFUN(BASH_CHECK_LIB_SOCKET,
+[
+if test "X$bash_cv_have_socklib" = "X"; then
+_bash_needmsg=
+else
+AC_MSG_CHECKING(for socket library)
+_bash_needmsg=yes
+fi
+AC_CACHE_VAL(bash_cv_have_socklib,
+[AC_CHECK_LIB(socket, getpeername,
+ bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
+if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_RESULT($bash_cv_have_socklib)
+ _bash_needmsg=
+fi
+if test $bash_cv_have_socklib = yes; then
+ # check for libnsl, add it to LIBS if present
+ if test "X$bash_cv_have_libnsl" = "X"; then
+ _bash_needmsg=
+ else
+ AC_MSG_CHECKING(for libnsl)
+ _bash_needmsg=yes
+ fi
+ AC_CACHE_VAL(bash_cv_have_libnsl,
+ [AC_CHECK_LIB(nsl, t_open,
+ bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
+ if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_RESULT($bash_cv_have_libnsl)
+ _bash_needmsg=
+ fi
+ if test $bash_cv_have_libnsl = yes; then
+ LIBS="-lsocket -lnsl $LIBS"
+ else
+ LIBS="-lsocket $LIBS"
+ fi
+ AC_DEFINE(HAVE_LIBSOCKET)
+ AC_DEFINE(HAVE_GETPEERNAME)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_DIRENT_D_INO,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(if struct dirent has a d_ino member)
+AC_CACHE_VAL(bash_cv_dirent_has_dino,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = d.d_ino;
+], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
+AC_MSG_RESULT($bash_cv_dirent_has_dino)
+if test $bash_cv_dirent_has_dino = yes; then
+AC_DEFINE(STRUCT_DIRENT_HAS_D_INO)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(if struct dirent has a d_fileno member)
+AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = d.d_fileno;
+], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
+AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
+if test $bash_cv_dirent_has_d_fileno = yes; then
+AC_DEFINE(STRUCT_DIRENT_HAS_D_FILENO)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_TIMEVAL,
+[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
+AC_CACHE_VAL(bash_cv_struct_timeval,
+[
+AC_EGREP_HEADER(struct timeval, sys/time.h,
+ bash_cv_struct_timeval=yes,
+ AC_EGREP_HEADER(struct timeval, time.h,
+ bash_cv_struct_timeval=yes,
+ bash_cv_struct_timeval=no))
+])
+AC_MSG_RESULT($bash_cv_struct_timeval)
+if test $bash_cv_struct_timeval = yes; then
+ AC_DEFINE(HAVE_TIMEVAL)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_WINSIZE,
+[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
+AC_CACHE_VAL(bash_cv_struct_winsize_header,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [struct winsize x;],
+ bash_cv_struct_winsize_header=ioctl_h,
+ [AC_TRY_COMPILE([#include <sys/types.h>
+#include <termios.h>], [struct winsize x;],
+ bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
+])])
+if test $bash_cv_struct_winsize_header = ioctl_h; then
+ AC_MSG_RESULT(sys/ioctl.h)
+ AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
+elif test $bash_cv_struct_winsize_header = termios_h; then
+ AC_MSG_RESULT(termios.h)
+ AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
+else
+ AC_MSG_RESULT(not found)
+fi
+])
+
+dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
+AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE,
+[AC_REQUIRE([AC_TYPE_SIGNAL])
+AC_MSG_CHECKING(for type of signal functions)
+AC_CACHE_VAL(bash_cv_signal_vintage,
+[
+ AC_TRY_LINK([#include <signal.h>],[
+ sigset_t ss;
+ struct sigaction sa;
+ sigemptyset(&ss); sigsuspend(&ss);
+ sigaction(SIGINT, &sa, (struct sigaction *) 0);
+ sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
+ ], bash_cv_signal_vintage=posix,
+ [
+ AC_TRY_LINK([#include <signal.h>], [
+ int mask = sigmask(SIGINT);
+ sigsetmask(mask); sigblock(mask); sigpause(mask);
+ ], bash_cv_signal_vintage=4.2bsd,
+ [
+ AC_TRY_LINK([
+ #include <signal.h>
+ RETSIGTYPE foo() { }], [
+ int mask = sigmask(SIGINT);
+ sigset(SIGINT, foo); sigrelse(SIGINT);
+ sighold(SIGINT); sigpause(SIGINT);
+ ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7
+ )]
+ )]
+)
+])
+AC_MSG_RESULT($bash_cv_signal_vintage)
+if test "$bash_cv_signal_vintage" = posix; then
+AC_DEFINE(HAVE_POSIX_SIGNALS)
+elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
+AC_DEFINE(HAVE_BSD_SIGNALS)
+elif test "$bash_cv_signal_vintage" = svr3; then
+AC_DEFINE(HAVE_USG_SIGHOLD)
+fi
+])
+
+dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
+AC_DEFUN(BASH_SYS_PGRP_SYNC,
+[AC_REQUIRE([AC_FUNC_GETPGRP])
+AC_MSG_CHECKING(whether pgrps need synchronization)
+AC_CACHE_VAL(bash_cv_pgrp_pipe,
+[AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+main()
+{
+# ifdef GETPGRP_VOID
+# define getpgID() getpgrp()
+# else
+# define getpgID() getpgrp(0)
+# define setpgid(x,y) setpgrp(x,y)
+# endif
+ int pid1, pid2, fds[2];
+ int status;
+ char ok;
+
+ switch (pid1 = fork()) {
+ case -1:
+ exit(1);
+ case 0:
+ setpgid(0, getpid());
+ exit(0);
+ }
+ setpgid(pid1, pid1);
+
+ sleep(2); /* let first child die */
+
+ if (pipe(fds) < 0)
+ exit(2);
+
+ switch (pid2 = fork()) {
+ case -1:
+ exit(3);
+ case 0:
+ setpgid(0, pid1);
+ ok = getpgID() == pid1;
+ write(fds[1], &ok, 1);
+ exit(0);
+ }
+ setpgid(pid2, pid1);
+
+ close(fds[1]);
+ if (read(fds[0], &ok, 1) != 1)
+ exit(4);
+ wait(&status);
+ wait(&status);
+ exit(ok ? 0 : 5);
+}
+], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
+ [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
+ bash_cv_pgrp_pipe=no])
+])
+AC_MSG_RESULT($bash_cv_pgrp_pipe)
+if test $bash_cv_pgrp_pipe = yes; then
+AC_DEFINE(PGRP_PIPE)
+fi
+])
+
+AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS,
+[AC_REQUIRE([AC_TYPE_SIGNAL])
+AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
+AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
+AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
+[AC_TRY_RUN([
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+typedef RETSIGTYPE sigfunc();
+
+int nsigint;
+
+#ifdef HAVE_POSIX_SIGNALS
+sigfunc *
+set_signal_handler(sig, handler)
+ int sig;
+ sigfunc *handler;
+{
+ struct sigaction act, oact;
+ act.sa_handler = handler;
+ act.sa_flags = 0;
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&oact.sa_mask);
+ sigaction (sig, &act, &oact);
+ return (oact.sa_handler);
+}
+#else
+#define set_signal_handler(s, h) signal(s, h)
+#endif
+
+RETSIGTYPE
+sigint(s)
+int s;
+{
+ nsigint++;
+}
+
+main()
+{
+ nsigint = 0;
+ set_signal_handler(SIGINT, sigint);
+ kill((int)getpid(), SIGINT);
+ kill((int)getpid(), SIGINT);
+ exit(nsigint != 2);
+}
+], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
+ [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
+ bash_cv_must_reinstall_sighandlers=no]
+)])
+AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
+if test $bash_cv_must_reinstall_sighandlers = yes; then
+AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
+fi
+])
+
+dnl check that some necessary job control definitions are present
+AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING,
+[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
+AC_MSG_CHECKING(for presence of necessary job control definitions)
+AC_CACHE_VAL(bash_cv_job_control_missing,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+
+/* Add more tests in here as appropriate. */
+main()
+{
+/* signal type */
+#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
+exit(1);
+#endif
+
+/* signals and tty control. */
+#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
+exit (1);
+#endif
+
+/* process control */
+#if !defined (WNOHANG) || !defined (WUNTRACED)
+exit(1);
+#endif
+
+/* Posix systems have tcgetpgrp and waitpid. */
+#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
+exit(1);
+#endif
+
+#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
+exit(1);
+#endif
+
+/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
+#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
+exit(1);
+#endif
+
+exit(0);
+}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
+ [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
+ bash_cv_job_control_missing=missing]
+)])
+AC_MSG_RESULT($bash_cv_job_control_missing)
+if test $bash_cv_job_control_missing = missing; then
+AC_DEFINE(JOB_CONTROL_MISSING)
+fi
+])
+
+dnl check whether named pipes are present
+dnl this requires a previous check for mkfifo, but that is awkward to specify
+AC_DEFUN(BASH_SYS_NAMED_PIPES,
+[AC_MSG_CHECKING(for presence of named pipes)
+AC_CACHE_VAL(bash_cv_sys_named_pipes,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* Add more tests in here as appropriate. */
+main()
+{
+int fd, err;
+
+#if defined (HAVE_MKFIFO)
+exit (0);
+#endif
+
+#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
+exit (1);
+#endif
+
+#if defined (NeXT)
+exit (1);
+#endif
+err = mkdir("/tmp/bash-aclocal", 0700);
+if (err < 0) {
+ perror ("mkdir");
+ exit(1);
+}
+fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
+if (fd == -1) {
+ rmdir ("/tmp/bash-aclocal");
+ exit (1);
+}
+close(fd);
+unlink ("/tmp/bash-aclocal/sh-np-autoconf");
+rmdir ("/tmp/bash-aclocal");
+exit(0);
+}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
+ [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
+ bash_cv_sys_named_pipes=missing]
+)])
+AC_MSG_RESULT($bash_cv_sys_named_pipes)
+if test $bash_cv_sys_named_pipes = missing; then
+AC_DEFINE(NAMED_PIPES_MISSING)
+fi
+])
+
+AC_DEFUN(BASH_SYS_DEFAULT_MAIL_DIR,
+[AC_MSG_CHECKING(for default mail directory)
+AC_CACHE_VAL(bash_cv_mail_dir,
+[if test -d /var/mail; then
+ bash_cv_mail_dir=/var/mail
+ elif test -d /var/spool/mail; then
+ bash_cv_mail_dir=/var/spool/mail
+ elif test -d /usr/mail; then
+ bash_cv_mail_dir=/usr/mail
+ elif test -d /usr/spool/mail; then
+ bash_cv_mail_dir=/usr/spool/mail
+ else
+ bash_cv_mail_dir=unknown
+ fi
+])
+AC_MSG_RESULT($bash_cv_mail_dir)
+AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
+])
+
+AC_DEFUN(BASH_HAVE_TIOCGWINSZ,
+[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
+AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
+ bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
+AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
+if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
+AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
+fi
+])
+
+AC_DEFUN(BASH_HAVE_TIOCSTAT,
+[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
+AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [int x = TIOCSTAT;],
+ bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
+AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
+if test $bash_cv_tiocstat_in_ioctl = yes; then
+AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
+fi
+])
+
+AC_DEFUN(BASH_HAVE_FIONREAD,
+[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
+AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [int x = FIONREAD;],
+ bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
+AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
+if test $bash_cv_fionread_in_ioctl = yes; then
+AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
+fi
+])
+
+dnl
+dnl See if speed_t is declared in <sys/types.h>. Some versions of linux
+dnl require a definition of speed_t each time <termcap.h> is included,
+dnl but you can only get speed_t if you include <termios.h> (on some
+dnl versions) or <sys/types.h> (on others).
+dnl
+AC_DEFUN(BASH_CHECK_SPEED_T,
+[AC_MSG_CHECKING(for speed_t in sys/types.h)
+AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
+[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
+ bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
+AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
+if test $bash_cv_speed_t_in_sys_types = yes; then
+AC_DEFINE(SPEED_T_IN_SYS_TYPES)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_GETPW_FUNCS,
+[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
+AC_CACHE_VAL(bash_cv_getpw_declared,
+[AC_EGREP_CPP(getpwuid,
+[
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <pwd.h>
+],
+bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
+AC_MSG_RESULT($bash_cv_getpw_declared)
+if test $bash_cv_getpw_declared = yes; then
+AC_DEFINE(HAVE_GETPW_DECLS)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_DEV_FD,
+[AC_MSG_CHECKING(whether /dev/fd is available)
+AC_CACHE_VAL(bash_cv_dev_fd,
+[if test -d /dev/fd && test -r /dev/fd/0; then
+ bash_cv_dev_fd=standard
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
+ bash_cv_dev_fd=whacky
+ else
+ bash_cv_dev_fd=absent
+ fi
+])
+AC_MSG_RESULT($bash_cv_dev_fd)
+if test $bash_cv_dev_fd = "standard"; then
+ AC_DEFINE(HAVE_DEV_FD)
+ AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
+elif test $bash_cv_dev_fd = "whacky"; then
+ AC_DEFINE(HAVE_DEV_FD)
+ AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
+fi
+])
+
+AC_DEFUN(BASH_CHECK_DEV_STDIN,
+[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
+AC_CACHE_VAL(bash_cv_dev_stdin,
+[if test -d /dev/fd && test -r /dev/stdin; then
+ bash_cv_dev_stdin=present
+ elif test -d /proc/self/fd && test -r /dev/stdin; then
+ bash_cv_dev_stdin=present
+ else
+ bash_cv_dev_stdin=absent
+ fi
+])
+AC_MSG_RESULT($bash_cv_dev_stdin)
+if test $bash_cv_dev_stdin = "present"; then
+ AC_DEFINE(HAVE_DEV_STDIN)
+fi
+])
+
+dnl
+dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
+dnl
+AC_DEFUN(BASH_CHECK_KERNEL_RLIMIT,
+[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
+AC_CACHE_VAL(bash_cv_kernel_rlimit,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/resource.h>
+],
+[
+ int f;
+ f = RLIMIT_DATA;
+], bash_cv_kernel_rlimit=no,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#define _KERNEL
+#include <sys/resource.h>
+#undef _KERNEL
+],
+[
+ int f;
+ f = RLIMIT_DATA;
+], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
+)])
+AC_MSG_RESULT($bash_cv_kernel_rlimit)
+if test $bash_cv_kernel_rlimit = yes; then
+AC_DEFINE(RLIMIT_NEEDS_KERNEL)
+fi
+])
+
+dnl
+dnl Check for 64-bit off_t -- used for malloc alignment
+dnl
+dnl C does not allow duplicate case labels, so the compile will fail if
+dnl sizeof(off_t) is > 4.
+dnl
+AC_DEFUN(BASH_CHECK_OFF_T_64,
+[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
+AC_TRY_COMPILE([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+],[
+switch (0) case 0: case (sizeof (off_t) <= 4):;
+], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
+if test $bash_cv_off_t_64 = yes; then
+ AC_DEFINE(HAVE_OFF_T_64)
+fi])
+
+AC_DEFUN(BASH_CHECK_RTSIGS,
+[AC_MSG_CHECKING(for unusable real-time signals due to large values)
+AC_CACHE_VAL(bash_cv_unusable_rtsigs,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+
+#ifndef NSIG
+# define NSIG 64
+#endif
+
+main ()
+{
+ int n_sigs = 2 * NSIG;
+#ifdef SIGRTMIN
+ int rtmin = SIGRTMIN;
+#else
+ int rtmin = 0;
+#endif
+
+ exit(rtmin < n_sigs);
+}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
+ [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
+ bash_cv_unusable_rtsigs=yes]
+)])
+AC_MSG_RESULT($bash_cv_unusable_rtsigs)
+if test $bash_cv_unusable_rtsigs = yes; then
+AC_DEFINE(UNUSABLE_RT_SIGNALS)
+fi
+])
+
+dnl
+dnl check for availability of multibyte characters and functions
+dnl
+AC_DEFUN(BASH_CHECK_MULTIBYTE,
+[
+AC_CHECK_HEADERS(wctype.h)
+AC_CHECK_HEADERS(wchar.h)
+AC_CHECK_HEADERS(langinfo.h)
+
+AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
+AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
+
+AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
+[AC_TRY_RUN([
+#include <wchar.h>
+int
+main ()
+{
+ mbstate_t ps;
+ return 0;
+}], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)])
+if test $bash_cv_have_mbstate_t = yes; then
+ AC_DEFINE(HAVE_MBSTATE_T)
+fi
+
+AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
+[AC_TRY_LINK(
+[#include <langinfo.h>],
+[char* cs = nl_langinfo(CODESET);],
+bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
+if test $bash_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET)
+fi
+
+])
+
+dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
+dnl require:
+dnl AC_PROG_CC
+dnl BASH_CHECK_LIB_TERMCAP
+
+AC_DEFUN(RL_LIB_READLINE_VERSION,
+[
+AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
+
+AC_MSG_CHECKING([version of installed readline library])
+
+# What a pain in the ass this is.
+
+# save cpp and ld options
+_save_CFLAGS="$CFLAGS"
+_save_LDFLAGS="$LDFLAGS"
+_save_LIBS="$LIBS"
+
+# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
+# allows the caller to do something like $_rl_prefix=$withval if the user
+# specifies --with-installed-readline=PREFIX as an argument to configure
+
+if test -z "$ac_cv_rl_prefix"; then
+test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
+fi
+
+eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
+eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
+
+LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
+CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
+LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
+
+AC_TRY_RUN([
+#include <stdio.h>
+#include <readline/readline.h>
+
+main()
+{
+ FILE *fp;
+ fp = fopen("conftest.rlv", "w");
+ if (fp == 0) exit(1);
+ fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
+ fclose(fp);
+ exit(0);
+}
+],
+ac_cv_rl_version=`cat conftest.rlv`,
+ac_cv_rl_version='0.0',
+ac_cv_rl_version='4.2')
+
+CFLAGS="$_save_CFLAGS"
+LDFLAGS="$_save_LDFLAGS"
+LIBS="$_save_LIBS"
+
+RL_MAJOR=0
+RL_MINOR=0
+
+# (
+case "$ac_cv_rl_version" in
+2*|3*|4*|5*|6*|7*|8*|9*)
+ RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
+ RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
+ ;;
+esac
+
+# (((
+case $RL_MAJOR in
+[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
+[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
+*) _RL_MAJOR=00 ;;
+esac
+
+# (((
+case $RL_MINOR in
+[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
+[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
+*) _RL_MINOR=00 ;;
+esac
+
+RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
+
+# Readline versions greater than 4.2 have these defines in readline.h
+
+if test $ac_cv_rl_version = '0.0' ; then
+ AC_MSG_WARN([Could not test version of installed readline library.])
+elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
+ # set these for use by the caller
+ RL_PREFIX=$ac_cv_rl_prefix
+ RL_LIBDIR=$ac_cv_rl_libdir
+ RL_INCLUDEDIR=$ac_cv_rl_includedir
+ AC_MSG_RESULT($ac_cv_rl_version)
+else
+
+AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
+AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
+AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
+
+AC_SUBST(RL_VERSION)
+AC_SUBST(RL_MAJOR)
+AC_SUBST(RL_MINOR)
+
+# set these for use by the caller
+RL_PREFIX=$ac_cv_rl_prefix
+RL_LIBDIR=$ac_cv_rl_libdir
+RL_INCLUDEDIR=$ac_cv_rl_includedir
+
+AC_MSG_RESULT($ac_cv_rl_version)
+
+fi
+])
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/bootstrap.sh cvs/bootstrap.sh
--- bash-2.05b/bootstrap.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/bootstrap.sh 2003-09-01 21:57:32.000000000 +0200
@@ -0,0 +1,55 @@
+#!/bin/sh
+# $Id: bootstrap.sh,v 1.4 2003/08/29 15:29:38 snikkt Exp $
+# Run this to generate all the initial Makefiles, etc.
+
+# Check how echo works in this /bin/sh
+case `echo -n` in
+-n) _echo_n= _echo_c='\c';;
+*) _echo_n=-n _echo_c=;;
+esac
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+(test -f $srcdir/configure.in) || {
+ echo -n "*** Error ***: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level directory"
+ exit 1
+}
+
+(echo $_echo_n " + Running aclocal: $_echo_c"; \
+ aclocal -I . -I debugger ; \
+ echo "done.")
+rc=$?
+(test -n $rc ) || exit $rc
+
+(echo $_echo_n " + Running autoconf: $_echo_c"; \
+ autoconf; \
+ echo "done.")
+
+rc=$?
+(test -n $rc ) || exit $rc
+
+(echo $_echo_n " + Running aclocal in debugger: $_echo_c"; \
+ cd debugger && aclocal -I .; \
+ echo "done.")
+rc=$?
+(test -n $rc ) || exit $rc
+
+(echo $_echo_n " + Running autoconf in debugger: $_echo_c"; \
+ cd debugger && autoconf; \
+ echo "done.")
+rc=$?
+(test -n $rc ) || exit $rc
+
+(echo $_echo_n " + Running automake in debugger: $_echo_c"; \
+ cd debugger && automake --add-missing; \
+ echo "done.")
+rc=$?
+(test -n $rc ) || exit $rc
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/Makefile.in cvs/builtins/Makefile.in
--- bash-2.05b/builtins/Makefile.in 2002-04-23 15:24:23.000000000 +0200
+++ cvs/builtins/Makefile.in 2002-09-19 20:49:51.000000000 +0200
@@ -118,7 +118,7 @@
$(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \
$(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \
$(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \
- $(srcdir)/printf.def $(srcdir)/complete.def
+ $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/caller.def
STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \
getopt.h
@@ -130,7 +130,8 @@
exit.o fc.o fg_bg.o hash.o help.o history.o jobs.o kill.o let.o \
pushd.o read.o return.o set.o setattr.o shift.o source.o \
suspend.o test.o times.o trap.o type.o ulimit.o umask.o \
- wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o
+ wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o \
+ complete.o caller.o
CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h
@@ -214,48 +215,6 @@
$(OFILES): $(MKBUILTINS) ../config.h
-alias.o: alias.def
-bind.o: bind.def
-break.o: break.def
-builtin.o: builtin.def
-cd.o: cd.def
-colon.o: colon.def
-command.o: command.def
-declare.o: declare.def
-echo.o: echo.def
-enable.o: enable.def
-eval.o: eval.def
-exec.o: exec.def
-exit.o: exit.def
-fc.o: fc.def
-fg_bg.o: fg_bg.def
-hash.o: hash.def
-help.o: help.def
-history.o: history.def
-jobs.o: jobs.def
-kill.o: kill.def
-let.o: let.def
-printf.o: printf.def
-pushd.o: pushd.def
-read.o: read.def
-return.o: return.def
-set.o: set.def
-setattr.o: setattr.def
-shift.o: shift.def
-shopt.o: shopt.def
-source.o: source.def
-suspend.o: suspend.def
-test.o: test.def
-times.o: times.def
-trap.o: trap.def
-type.o: type.def
-ulimit.o: ulimit.def
-umask.o: umask.def
-wait.o: wait.def
-getopts.o: getopts.def
-reserved.o: reserved.def
-complete.o: complete.def
-
# C files
bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
bashgetopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h
@@ -550,3 +509,7 @@
complete.o: ${srcdir}/common.h ${srcdir}/bashgetopt.h
#bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h
+
+#;;; Local Variables: ***
+#;;; mode:makefile ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/caller.def cvs/builtins/caller.def
--- bash-2.05b/builtins/caller.def 1970-01-01 01:00:00.000000000 +0100
+++ cvs/builtins/caller.def 2003-02-15 00:33:44.000000000 +0100
@@ -0,0 +1,148 @@
+This file is caller.def, from which is created caller.c. It implements the
+builtin "caller" in Bash.
+
+Copyright (C) 2002 Rocky Bernstein for Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with Bash; see the file COPYING. If not, write to the Free Software
+Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+$PRODUCES caller.c
+
+$BUILTIN caller
+$FUNCTION caller_builtin
+$SHORT_DOC caller [EXPR]
+
+Returns the context of the current subroutine call.
+
+Without EXPR, returns returns "$line $filename". With EXPR, it
+returns "$line $subroutine $filename", and this extra information that
+can be used used to print a stack trace,
+
+The value of EXPR indicates how many call frames to go back before the
+current one; the top frame number would be 0.
+$END
+
+#include <config.h>
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include "../shell.h"
+#include "common.h"
+#include "builtext.h"
+
+#ifdef LOADABLE_BUILTIN
+# include "builtins.h"
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+int
+caller_builtin (list)
+ WORD_LIST *list;
+{
+ SHELL_VAR *funcname_var = find_variable ("FUNCNAME");
+ ARRAY *funcname_a = array_cell (funcname_var);
+ SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
+ ARRAY *bash_source_a = array_cell (bash_source_var);
+ SHELL_VAR *bash_lineno_var = find_variable ("BASH_LINENO");
+ ARRAY *bash_lineno_a = array_cell (bash_lineno_var);
+ ARRAY_ELEMENT *ae;
+ char *lineno_str="";
+ char *source_str="";
+ char *funcname_str="";
+
+ intmax_t num;
+
+ if (!bash_lineno_a || array_empty(bash_lineno_a))
+ return (EXECUTION_FAILURE);
+
+ if (!bash_source_a || array_empty(bash_source_a))
+ return (EXECUTION_FAILURE);
+
+ /* If there is no argument list, then give short form:
+ line filename.
+ */
+ if (list == NULL) {
+ lineno_str=array_reference(bash_lineno_a, 0);
+ source_str=array_reference(bash_source_a, 1);
+ printf("%s %s\n",
+ lineno_str ? lineno_str : "NULL" ,
+ source_str ? source_str : "NULL");
+ return (EXECUTION_SUCCESS);
+ }
+
+ if (legal_number (list->word->word, &num)) {
+ lineno_str=array_reference(bash_lineno_a, num);
+ source_str=array_reference(bash_source_a, num+1);
+ funcname_str=array_reference(funcname_a, num+1);
+
+ if (!funcname_a || array_empty(funcname_a)
+ || NULL == lineno_str || NULL == source_str || NULL == funcname_str )
+ return (EXECUTION_FAILURE);
+
+ printf("%s %s %s\n", lineno_str, funcname_str, source_str);
+ } else {
+ sh_invalidnum (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+
+
+ return (EXECUTION_SUCCESS);
+}
+
+
+#ifdef LOADABLE_BUILTIN
+static char *caller_doc[] = {
+ "Returns the context of the current subroutine call.",
+ "",
+ "Without EXPR, returns returns \"$line $filename\". With EXPR, it",
+ "returns \"$line $subroutine $filename\"; this extra information,",
+ "for example, can be used used to print a stack trace.",
+ "",
+ "The value of EXPR indicates how many call frames to go back before the",
+ "current one; the top frame number would be 0.",
+ (char *)NULL
+};
+
+struct builtin caller_struct = {
+ "caller",
+ caller_builtin,
+ BUILTIN_ENABLED,
+ caller_doc,
+ "pushd [EXPR]",
+ 0
+};
+
+#endif /* LOADABLE_BUILTIN */
+
+/*
+ * Local variables:
+ * mode: C
+ * End:
+ */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/common.c cvs/builtins/common.c
--- bash-2.05b/builtins/common.c 2002-06-28 18:24:31.000000000 +0200
+++ cvs/builtins/common.c 2002-10-10 14:34:04.000000000 +0200
@@ -48,6 +48,7 @@
#include "../builtins.h"
#include "../input.h"
#include "../execute_cmd.h"
+#include "../variables.h"
#include "../trap.h"
#include "bashgetopt.h"
#include "common.h"
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/common.h cvs/builtins/common.h
--- bash-2.05b/builtins/common.h 2002-05-10 18:25:08.000000000 +0200
+++ cvs/builtins/common.h 2002-10-10 14:34:04.000000000 +0200
@@ -77,6 +77,7 @@
extern char **make_builtin_argv __P((WORD_LIST *, int *));
extern void remember_args __P((WORD_LIST *, int));
+extern void forget_args __P((WORD_LIST *));
extern int dollar_vars_changed __P((void));
extern void set_dollar_vars_unchanged __P((void));
@@ -145,7 +146,7 @@
extern WORD_LIST *get_directory_stack __P((void));
/* Functions from evalstring.c */
-extern int parse_and_execute __P((char *, const char *, int));
+extern int parse_and_execute __P((char *, const char *, int, int));
extern void parse_and_execute_cleanup __P((void));
/* Functions from evalfile.c */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/declare.def cvs/builtins/declare.def
--- bash-2.05b/builtins/declare.def 2002-04-08 19:20:55.000000000 +0200
+++ cvs/builtins/declare.def 2002-09-13 21:09:09.000000000 +0200
@@ -32,7 +32,8 @@
-a to make NAMEs arrays (if supported)
-f to select from among function names only
- -F to display function names without definitions
+ -F to display function name, line number and source-file name
+ without definitions
-i to make NAMEs have the `integer' attribute
-r to make NAMEs readonly
-t to make NAMEs have the `trace' attribute
@@ -309,9 +310,15 @@
/* declare -[Ff] name [name...] */
if (flags_on == att_function && flags_off == 0)
{
- t = nodefs ? var->name
- : named_function_string (name, function_cell (var), 1);
- printf ("%s\n", t);
+ if (nodefs) {
+ FUNCTION_DEF *shell_fn = find_function_def(var->name);
+
+ printf ("%s %d %s\n", var->name, shell_fn->line,
+ shell_fn->source_file);
+ } else
+ printf ("%s\n",
+ named_function_string (name,
+ function_cell(var), 1));
}
else /* declare -[fF] -[rx] name [name...] */
{
@@ -440,3 +447,9 @@
: ((any_failed == 0) ? EXECUTION_SUCCESS
: EXECUTION_FAILURE));
}
+
+/*
+ * Local variables:
+ * mode: C
+ * End:
+ */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/eval.def cvs/builtins/eval.def
--- bash-2.05b/builtins/eval.def 2002-04-08 19:21:04.000000000 +0200
+++ cvs/builtins/eval.def 2002-08-25 23:42:10.000000000 +0200
@@ -49,5 +49,5 @@
list = loptend; /* skip over possible `--' */
/* Note that parse_and_execute () frees the string it is passed. */
- return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
+ return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST, 0) : EXECUTION_SUCCESS);
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/evalfile.c cvs/builtins/evalfile.c
--- bash-2.05b/builtins/evalfile.c 2002-02-21 21:08:52.000000000 +0100
+++ cvs/builtins/evalfile.c 2002-10-10 14:34:04.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996,2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -80,6 +80,17 @@
size_t file_size;
sh_vmsg_func_t *errfunc;
+ SHELL_VAR *funcname_var = find_variable ("FUNCNAME");
+ ARRAY *funcname_a = array_cell (funcname_var);
+ SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
+ ARRAY *bash_source_a = array_cell (bash_source_var);
+ SHELL_VAR *bash_lineno_var = find_variable ("BASH_LINENO");
+ ARRAY *bash_lineno_a = array_cell (bash_lineno_var);
+ SHELL_VAR *bash_argv_var = find_variable ("BASH_ARGV");
+ ARRAY *bash_argv_a = array_cell (bash_argv_var);
+ SHELL_VAR *bash_argc_var = find_variable ("BASH_ARGC");
+ ARRAY *bash_argc_a = array_cell (bash_argc_var);
+
USE_VAR(pflags);
fd = open (filename, O_RDONLY);
@@ -175,6 +186,11 @@
return_catch_flag++;
sourcelevel++;
+ array_shift_element(bash_source_a, savestring(filename));
+ array_shift_element(bash_lineno_a, itos(executing_line_number ()));
+ array_shift_element(bash_argv_a, savestring(filename));
+ array_shift_element(bash_argc_a, itos(1));
+ array_shift_element(funcname_a, savestring("source"));
/* set the flags to be passed to parse_and_execute */
pflags = (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
@@ -191,8 +207,8 @@
parse_and_execute_cleanup ();
result = return_catch_value;
}
- else
- result = parse_and_execute (string, filename, pflags);
+ else
+ result = parse_and_execute (string, filename, pflags, 1);
if (flags & FEVAL_UNWINDPROT)
run_unwind_frame ("_evalfile");
@@ -205,6 +221,11 @@
COPY_PROCENV (old_return_catch, return_catch);
}
+ array_dispose_element(array_unshift_element(bash_source_a));
+ array_dispose_element(array_unshift_element(bash_lineno_a));
+ array_dispose_element(array_unshift_element(funcname_a));
+ array_dispose_element(array_unshift_element(bash_argc_a));
+ array_dispose_element(array_unshift_element(bash_argv_a));
return ((flags & FEVAL_BUILTIN) ? result : 1);
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/evalstring.c cvs/builtins/evalstring.c
--- bash-2.05b/builtins/evalstring.c 2002-04-04 20:38:50.000000000 +0200
+++ cvs/builtins/evalstring.c 2002-09-13 00:21:04.000000000 +0200
@@ -84,13 +84,17 @@
(flags & SEVAL_INTERACT) -> interactive = 1;
(flags & SEVAL_NOHIST) -> call bash_history_disable ()
(flags & SEVAL_NOFREE) -> don't free STRING when finished
+
+ reset_line_number causes the line number to be reset to 1, or preserves
+ the line number that we were at inside some other script.
*/
int
-parse_and_execute (string, from_file, flags)
+parse_and_execute (string, from_file, flags, reset_line_number)
char *string;
const char *from_file;
int flags;
+ int reset_line_number;
{
int code, x;
volatile int should_jump_to_top_level, last_result;
@@ -129,7 +133,16 @@
end_unwind_frame ();
parse_and_execute_level++;
- push_stream (1); /* reset the line number */
+
+ push_stream (reset_line_number);
+
+ /* If we don't want to reset the line, number we have to subtract
+ one, because we will add one just before executing the next
+ command. (Resetting sets the line_number to 0; the first line
+ number is 1).
+ */
+ if (!reset_line_number) line_number--;
+
indirection_level++;
if (flags & (SEVAL_NONINT|SEVAL_INTERACT))
interactive = (flags & SEVAL_NONINT) ? 0 : 1;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/fc.def cvs/builtins/fc.def
--- bash-2.05b/builtins/fc.def 2002-03-19 20:05:18.000000000 +0100
+++ cvs/builtins/fc.def 2002-08-29 05:27:39.000000000 +0200
@@ -266,7 +266,7 @@
fprintf (stderr, "%s\n", command);
fc_replhist (command); /* replace `fc -s' with command */
- return (parse_and_execute (command, "fc", SEVAL_NOHIST));
+ return (parse_and_execute (command, "fc", SEVAL_NOHIST, 0));
}
/* This is the second form of the command (the list-or-edit-and-rerun
@@ -367,7 +367,7 @@
command = (char *)xmalloc (3 + strlen (FC_EDIT_COMMAND) + strlen (fn));
sprintf (command, "%s %s", FC_EDIT_COMMAND, fn);
}
- retval = parse_and_execute (command, "fc", SEVAL_NOHIST);
+ retval = parse_and_execute (command, "fc", SEVAL_NOHIST, 0);
if (retval != EXECUTION_SUCCESS)
{
unlink (fn);
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/history.def cvs/builtins/history.def
--- bash-2.05b/builtins/history.def 2002-03-19 20:06:33.000000000 +0100
+++ cvs/builtins/history.def 2003-05-24 22:22:20.000000000 +0200
@@ -34,16 +34,25 @@
append the contents to the history list instead. `-a' means
to append history lines from this session to the history file.
Argument `-n' means to read all history lines not already read
-from the history file and append them to the history list. If
-FILENAME is given, then that is used as the history file else
-if $HISTFILE has a value, that is used, else ~/.bash_history.
-If the -s option is supplied, the non-option ARGs are appended to
-the history list as a single entry. The -p option means to perform
-history expansion on each ARG and display the result, without storing
-anything in the history list.
+from the history file and append them to the history list.
+
+If FILENAME is given, then that is used as the history file else if $HISTFILE
+has a value, that is used, else ~/.bash_history. If the -s
+option is supplied, the non-option ARGs are appended to the history
+list as a single entry. The -p option means to perform history
+expansion on each ARG and display the result, without storing anything
+in the history list.
+
+The format of the timestamp shown in a command history is controlled
+by the $HISTTIMEFORMAT environment variable via strftime; the default
+value is '%a %T ' (abbreviated weekday name and 24-hour time with
+seconds). Note the trailing blank. See strftime(3) for a list of time
+conversion specifiers.
+
$END
#include <config.h>
+#include <time.h>
#if defined (HISTORY)
#include "../bashtypes.h"
@@ -214,6 +223,19 @@
#define histline(i) (hlist[(i)]->line)
#define histdata(i) (hlist[(i)]->data)
+static char *
+histtime(HIST_ENTRY *hlist, const char *hist_time_format)
+{
+ static char time_str[100];
+ time_t t = history_get_time(hlist);
+
+ if (t != 0)
+ strftime(time_str, 100, hist_time_format, localtime(&t));
+ else
+ strcpy(time_str, "?? ");
+ return time_str;
+}
+
static void
display_history (list)
WORD_LIST *list;
@@ -235,6 +257,11 @@
if (hlist)
{
+ char *hist_time_format = get_string_value ("HISTTIMEFORMAT");
+
+ if (hist_time_format == NULL)
+ hist_time_format = "%a %T ";
+
for (i = 0; hlist[i]; i++)
;
@@ -246,9 +273,9 @@
while (hlist[i])
{
QUIT;
- printf ("%5d%c %s\n", i + history_base,
+ printf ("%5d%c %s%s\n", i + history_base,
histdata(i) ? '*' : ' ',
- histline(i));
+ histtime(hlist[i], hist_time_format), histline(i));
i++;
}
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/return.def cvs/builtins/return.def
--- bash-2.05b/builtins/return.def 2002-04-08 19:23:25.000000000 +0200
+++ cvs/builtins/return.def 2002-11-02 14:12:05.000000000 +0100
@@ -54,6 +54,7 @@
{
return_catch_value = get_exitstat (list);
+ run_return_trap ();
if (return_catch_flag)
longjmp (return_catch, 1);
else
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/set.def cvs/builtins/set.def
--- bash-2.05b/builtins/set.def 2002-07-10 22:17:20.000000000 +0200
+++ cvs/builtins/set.def 2002-11-06 04:43:08.000000000 +0100
@@ -76,7 +76,9 @@
#if defined (READLINE)
emacs use an emacs-style line editing interface
#endif /* READLINE */
+ fntrace same as -d
errexit same as -e
+ errtrace same as -E
hashall same as -h
#if defined (BANG_HISTORY)
histexpand same as -H
@@ -172,6 +174,8 @@
{ "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
#endif
{ "errexit", 'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "errtrace", 'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "fntrace", 'd', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
{ "hashall", 'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
#if defined (BANG_HISTORY)
{ "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/shift.def cvs/builtins/shift.def
--- bash-2.05b/builtins/shift.def 2002-03-19 20:08:56.000000000 +0100
+++ cvs/builtins/shift.def 2003-08-11 10:06:30.000000000 +0200
@@ -68,7 +68,7 @@
else if (times > number_of_args ())
{
if (print_shift_error)
- sh_erange (list->word->word, "shift count");
+ sh_erange (list ? list->word->word : NULL, "shift count");
return (EXECUTION_FAILURE);
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/builtins/source.def cvs/builtins/source.def
--- bash-2.05b/builtins/source.def 2002-05-10 18:36:56.000000000 +0200
+++ cvs/builtins/source.def 2003-02-17 22:18:53.000000000 +0100
@@ -23,16 +23,20 @@
$BUILTIN source
$FUNCTION source_builtin
-$SHORT_DOC source filename
+$SHORT_DOC source FILENAME [ARGUMENTS]
Read and execute commands from FILENAME and return. The pathnames
in $PATH are used to find the directory containing FILENAME.
+If any ARGUMENTS are supplied, they become the positional parameters when
+FILENAME is executed.
$END
$BUILTIN .
$DOCNAME dot
$FUNCTION source_builtin
-$SHORT_DOC . filename
+$SHORT_DOC . FILENAME [ARGUMENTS]
Read and execute commands from FILENAME and return. The pathnames
in $PATH are used to find the directory containing FILENAME.
+If any ARGUMENTS are supplied, they become the positional parameters when
+FILENAME is executed.
$END
/* source.c - Implements the `.' and `source' builtins. */
@@ -52,10 +56,12 @@
#include "../bashansi.h"
+#include "../flags.h"
#include "../shell.h"
#include "../findcmd.h"
#include "common.h"
#include "bashgetopt.h"
+#include "../trap.h"
#if !defined (errno)
extern int errno;
@@ -143,9 +149,29 @@
}
set_dollar_vars_unchanged ();
- result = source_file (filename);
+ {
+ char *debug_trap = TRAP_STRING(DEBUG_TRAP);
+ if (debug_trap && !function_trace_mode)
+ {
+ debug_trap = savestring (debug_trap);
+ add_unwind_protect (xfree, debug_trap);
+ add_unwind_protect (set_debug_trap, debug_trap);
+ restore_default_signal (DEBUG_TRAP);
+ }
+
+
+ result = source_file (filename);
+
+ }
+
run_unwind_frame ("source");
return (result);
}
+
+/*
+ * Local variables:
+ * mode: C
+ * End:
+ */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/command.h cvs/command.h
--- bash-2.05b/command.h 2002-03-12 21:28:36.000000000 +0100
+++ cvs/command.h 2002-09-12 12:44:32.000000000 +0200
@@ -195,6 +195,7 @@
/* The CASE command. */
typedef struct case_com {
int flags; /* See description of CMD flags. */
+ int line; /* The line number of command */
WORD_DESC *word; /* The thing to test. */
PATTERN_LIST *clauses; /* The clauses to test against, or NULL. */
} CASE_COM;
@@ -202,6 +203,7 @@
/* FOR command. */
typedef struct for_com {
int flags; /* See description of CMD flags. */
+ int line; /* The line number of command */
WORD_DESC *name; /* The variable name to get mapped over. */
WORD_LIST *map_list; /* The things to map over. This is never NULL. */
COMMAND *action; /* The action to execute.
@@ -224,6 +226,7 @@
/* KSH SELECT command. */
typedef struct select_com {
int flags; /* See description of CMD flags. */
+ int line; /* The line number of command */
WORD_DESC *name; /* The variable name to get mapped over. */
WORD_LIST *map_list; /* The things to map over. This is never NULL. */
COMMAND *action; /* The action to execute.
@@ -290,6 +293,7 @@
WORD_DESC *name; /* The name of the function. */
COMMAND *command; /* The parsed execution tree. */
int line; /* Line number the function def starts on. */
+ char *source_file; /* The source file containing function. */
} FUNCTION_DEF;
/* A command that is `grouped' allows pipes and redirections to affect all
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/config-bot.h cvs/config-bot.h
--- bash-2.05b/config-bot.h 2002-04-16 23:01:03.000000000 +0200
+++ cvs/config-bot.h 2003-06-06 06:01:11.000000000 +0200
@@ -104,7 +104,7 @@
/* For platforms which support the ISO C amendement 1 functionality we
support user defined character classes. */
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
+#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_WCWIDTH)
# include <wchar.h>
# include <wctype.h>
# if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/config.h.in cvs/config.h.in
--- bash-2.05b/config.h.in 2002-06-25 15:48:52.000000000 +0200
+++ cvs/config.h.in 2003-08-11 10:06:03.000000000 +0200
@@ -582,6 +582,9 @@
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
+/* Define if you have the random function. */
+#undef HAVE_RANDOM
+
/* Define if you have the readlink function. */
#undef HAVE_READLINK
@@ -663,6 +666,9 @@
/* Define if you have the strsignal function or macro. */
#undef HAVE_STRSIGNAL
+/* Define if you have the srandom function. */
+#undef HAVE_SRANDOM
+
/* Define if you have the sysconf function. */
#undef HAVE_SYSCONF
Only in bash-2.05b: configure
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/configure.in cvs/configure.in
--- bash-2.05b/configure.in 2002-07-16 15:31:25.000000000 +0200
+++ cvs/configure.in 2003-09-01 21:57:33.000000000 +0200
@@ -1,11 +1,11 @@
dnl
-dnl Configure script for bash-2.05
+dnl Configure script for bash with debugger
dnl
-dnl report bugs to chet@po.cwru.edu
+dnl report bugs to rocky@panix.com
dnl
dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 1987-2002 Free Software Foundation, Inc.
+# Copyright (C) 1987-2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,21 +22,28 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-AC_REVISION([for Bash 2.05b, version 2.144, from autoconf version] AC_ACVERSION)dnl
+define(bashvers, 2.05b)
+define(relstatus, rebash-0.43)
-AC_INIT(bash, 2.05b, bug-bash@gnu.org)
+AC_INIT([bash],[bashvers-relstatus],[rocky@panix.com])
+
+AM_PATH_LISPDIR
+AC_ARG_PROGRAM
dnl make sure we are using a recent autoconf version
-AC_PREREQ(2.50)
+AC_PREREQ(2.53)
AC_CONFIG_SRCDIR(shell.h)
+if test x$ac_srcdir = x ; then
+ ac_srcdir=.
+fi
dnl where to find install.sh, config.sub, and config.guess
AC_CONFIG_AUX_DIR(./support)
AC_CONFIG_HEADERS(config.h)
dnl checks for version info
-BASHVERS=2.05b
-RELSTATUS=release
+BASHVERS=bashvers
+RELSTATUS=relstatus
dnl defaults for debug settings
case "$RELSTATUS" in
@@ -44,9 +51,8 @@
*) DEBUG= MALLOC_DEBUG= ;;
esac
-dnl canonicalize the host and os so we can do some tricky things before
-dnl parsing options
-AC_CANONICAL_HOST
+dnl Allow package selection (for installation), Setting bashdb as default
+AC_BASHDB_PACKAGE([bashdb])
dnl configure defaults
opt_bash_malloc=yes
@@ -92,6 +98,9 @@
*) opt_memscramble=yes ;;
esac
+dnl variables to configure
+AC_ARG_VAR(DEBUGGER_START_FILE, [location of debugger startup file])
+
dnl arguments to configure
dnl packages
AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval)
@@ -138,6 +147,34 @@
prefer_curses=yes
fi
+if test -z "${DEBUGGER_START_FILE}"; then
+ ac_debugger_start_file=${datadir}/${PACKAGE}/dbg-main.inc
+ DEBUGGER_START_FILE=`(
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ eval echo "$ac_debugger_start_file"
+ )`
+fi
+
+dnl We use a diff in regression testing
+AC_PATH_PROG(DIFF, diff, no)
+DIFF_OPTS=
+
+if test "$DIFF" = no ; then
+ AC_PATH_PROG(DIFF, cmp, no)
+else
+ dnl Try for GNU diff options.
+ # MSDOG output uses \r\n rather than \n in tests
+ for diff_opt in -w --unified ; do
+ if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then
+ AC_MSG_RESULT([adding $diff_opt to diff in regression tests])
+ DIFF_OPTS="$DIFF_OPTS $diff_opt"
+ fi
+ done
+fi
+AC_SUBST(DIFF)
+AC_SUBST(DIFF_OPTS)
+
dnl optional shell features in config.h.in
opt_minimal_config=no
@@ -327,8 +364,7 @@
AC_MINIX
dnl test for non-Unix variants
-AC_CYGWIN
-AC_MINGW32
+AC_CANONICAL_HOST()
AC_SYS_LARGEFILE
@@ -345,7 +381,7 @@
if test "x$cross_compiling" = "xyes"; then
case "${host}" in
- *-cygwin*)
+ *cygwin*)
cross_cache=${srcdir}/cross-build/cygwin32.cache
SIGNAMES_H='$(srcdir)/cross-build/win32sig.h'
;;
@@ -394,7 +430,7 @@
if test "$opt_static_link" = yes; then
# if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
- if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
+ if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
STATIC_LD="-static"
case "$host_os" in
solaris2*) ;;
@@ -609,6 +645,9 @@
AC_FUNC_MKTIME
+dnl checks for random functions
+AC_CHECK_FUNCS(random srandom)
+
dnl checks for locale functions
AC_CHECK_HEADERS(libintl.h)
AC_CHECK_FUNCS(gettext textdomain bindtextdomain)
@@ -631,7 +670,8 @@
fi
dnl this defines SYS_SIGLIST_DECLARED
-AC_DECL_SYS_SIGLIST
+AC_CHECK_DECLS([sys_siglist])
+
dnl network functions -- check for inet_aton again
if test "$ac_cv_func_inet_aton" != 'yes'; then
@@ -945,11 +985,29 @@
#AC_SUBST(ALLOCA_SOURCE)
#AC_SUBST(ALLOCA_OBJECT)
-AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
+AC_CONFIG_SUBDIRS(debugger)
+
+AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
- lib/tilde/Makefile doc/Makefile support/Makefile \
- examples/loadables/Makefile examples/loadables/perl/Makefile],
-[
+ lib/tilde/Makefile doc/Makefile \
+ tests/check_common \
+ support/Makefile pathnames.h \
+ examples/loadables/Makefile examples/loadables/perl/Makefile])
+
+# We don't want TeX do be a requirement for compilation.
+if ! test -e $ac_srcdir/doc/version.texi ;then
+ AC_CONFIG_FILES([ doc/version.texi ])
+fi
+
+AC_CONFIG_COMMANDS([default],[[
# Makefile uses this timestamp file to record whether config.h is up to date.
echo timestamp > stamp-h
-])
+# Until we get CVS to set these +x
+chmod +x $ac_srcdir/tests/run-*
+# Keep old dates on these so we don't gratuitously have make do work.
+if test -e $ac_srcdir/doc/version.texi ;then
+ echo timestamp > $ac_srcdir/doc/stamp-vti
+ touch -cr $ac_srcdir/configure.in doc/version.texi $ac_srcdir/doc/stamp-vti
+fi
+]],[[]])
+AC_OUTPUT
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/cvscompile.sh cvs/cvscompile.sh
--- bash-2.05b/cvscompile.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/cvscompile.sh 2002-09-23 23:57:39.000000000 +0200
@@ -0,0 +1,21 @@
+#!/bin/sh
+# $Id: cvscompile.sh,v 1.8 2002/09/23 21:57:39 rockyb Exp $
+# Run this to generate all the initial Makefiles, etc.
+
+# As reported by Masatake YAMATO,
+
+# In the Autotools book written by Gary V. Vaughan, et al.,
+# bootstrap.sh and autogen.sh are are used for initializing files that
+# are derived and are therefore not checked into CVS. The difference
+# between bootstrap.sh and autogen.sh is running configure at the end
+# of script or not; autogen.sh runs and bootstrap.sh does not. So
+# autogen.sh is found in many projects; bootstrap.sh is good for cross
+# compiling.
+
+./autogen.sh $@
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/AUTHORS cvs/debugger/AUTHORS
--- bash-2.05b/debugger/AUTHORS 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/AUTHORS 2002-08-30 18:20:26.000000000 +0200
@@ -0,0 +1,9 @@
+R. Bernstein (rocky@panix.com)
+
+with ideas from (via a predecessor bashdb):
+
+Bill Rosenblatt,
+Michael Loukides,
+Cigy Cyriac,
+Chet Ramey,
+Gary V. Vaughan
\ No newline at end of file
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/CHANGES cvs/debugger/CHANGES
--- bash-2.05b/debugger/CHANGES 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/CHANGES 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,132 @@
+-------------------------------
+CHANGES TO THE BASH INTERPRETER
+-------------------------------
+
+Added timestamped history and customized display via strftime and the
+HISTTIMEFORMAT environment variable.
+
+Added --debugger option which sources debugger startup script.
+
+Extended FUNCNAME variable to be an array indicating the call stack of
+function names in effect. The top-level "function" name is "main."
+
+Extended "declare -F fn" to return the source file name and the line number
+inside that of fn.
+
+Added dynamic BASH_ARGC and BASH_ARGV arrays which store all of the
+parameters. ARGC gives the number of parameters in a call. BASH_ARGV
+are the parameters in stack like fashion. Last parameter of last call
+is on top, first parameter of initial call is on the bottom (index 0).
+
+Added dynamic BASH_SOURCE array variable to give the file names associated
+with FUNCNAME.
+
+Using BASH_SOURCE we now report the right filename when you have an
+evaluation error in a sourced file.
+
+Added dynamic BASH_LINENO array variable to give the source file line
+numbers names associated with FUNCNAME.
+
+LINENO: All line numbers are now relative to the beginning of a file,
+not relative to a function name.
+
+Added dynamic BASH_COMMAND variable which is the command to be
+executed (or is executing) unless the command is a "trap" in which
+case it is the command that will be executed after the trap completes.
+
+Added dynamic BASH_SUBSHELL variable gives the number of subshells
+that you are nested in.
+
+Added a set shell option (set -o fntrace or set -d) which
+causes the TRAP DEBUG setting (whether the value is on or off) to
+persist when entering a function. It also does likewise for the
+"source" builtin and command substitution.
+
+Added a new trap "RETURN" which calls a handler every time a
+function or sourced file is returned.
+
+Added a new trap "SUBEXIT" which calls a handler every time a
+subshell exits.
+
+Added caller() builtin function which works like Perl's builtin.
+
+trap DEBUG will skip the next statement to be executed if the
+handler returns 2 (or sets $? to 2).
+
+Line number on command substitution `` $() and { } is the line number
+of the source file, and not relative to the beginning of the
+substitution (which is usually 1). For debugging absolute line numbers
+are useful. Even outside of debugging, when reporting errors it's hard
+to see how error messages like these generated from errors.tests in the previous versions of bash (<=2.05):
+
+./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+
+are as helpful than what we get now with absolute line numbers:
+
+./errors.tests: line 212: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+
+Line numbers probably a little more accurate on tracing and
+LINENO.
+
+"for" variables, and "case" conditions and "select" selectors are
+listed on "set -x" tracing and debugging.
+
+---------
+CHANGES TO EXTERNAL BASH DEBUGGER AND ITS LIBRARY CODE
+
+First I've tried to make this look more like gdb and perldb which are
+much richer debuggers. Probably the easiest part was to hack into the
+Emacs GUD (Grand Unified Debugger) code to work with bashdb. Making
+bashdb work with DDD, a debugger GUI front end was likewise
+straightforward (although requiring copious additions to many files -
+the changes were basically, "do this like Perl or do this like GDB").
+
+By now (Aug 2002), most of Michael Loukides' and Bill Rosenblatt's ksh
+debugger code (circa 1995 and before) has been replaced.
+
+The hackery of creating and running a concatenated file with debugging
+routines include (bashdb.pre and bashdb.fns) has been eliminated. Now
+we just source the debugged file or, better, do a funny "source"
+inside bash itself to get $0 correct and the the call stack correct.
+
+There is now some option processing in bashdb script. In particular
+use -L to tell bashdb where the directory of the debugger code. There
+is more verbose usage reporting.
+
+There is now an internal source-line array for *each* source file seen
+in debugger execution. The original code always retrieved from a text
+file (and it was presumed that there was only one). Since changes to
+the source after the program is running aren't reflected in the
+execution of the code, reading the source file to retrieve source text
+if that text was modified in the midst of debugging may give the wrong
+source line text. In this respect caching source lines may be more
+accurate.
+
+There had been a variable which stored breakpoints as a string of line
+numbers, e.g. "3|23|45|". Using "|" as a field separator perhaps was
+convenient since one could then call egrep (without the trailing "|")
+to list a line number. Such was life in days when arrays were not a
+considered to be standard in POSIX-like shells, and bash still has
+provisions for conditionally compiling array support in. However,
+nowadays I think it safe to assume the array datatype standard; it is
+POSIX.
+
+So I've removed this breakpoint variable and replaced it with an
+array. As for finding the line associated with the breakpoint, I added
+another array to store the source line for that.
+
+I've added watchpoints as are found in perl5db or gdb.
+
+With the breakpoint array, I also added breakpoint conditions and
+one-time breakpoints, whether the breakpoint is enabled or disabled,
+all analogous to gdb.
+
+Signal handling was added, and saving and restoring $?, $1, $2, the
+"set" options.
+
+With this, I think we've gotten over the main hurdle of getting a
+decent debugger for bash.
+
+$Id: CHANGES,v 1.14 2003/06/01 01:18:40 rockyb Exp $
\ No newline at end of file
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/COPYING cvs/debugger/COPYING
--- bash-2.05b/debugger/COPYING 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/COPYING 2002-08-20 18:04:30.000000000 +0200
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/ChangeLog cvs/debugger/ChangeLog
--- bash-2.05b/debugger/ChangeLog 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/ChangeLog 2003-08-02 22:33:22.000000000 +0200
@@ -0,0 +1,2258 @@
+2003-08-02 16:20 rockyb
+
+ * dbg-cmds.inc, dbg-help.inc, doc/bashdb.texi: Doc changes.
+
+2003-08-02 16:19 rockyb
+
+ * configure.ac: Time for another release.
+
+2003-08-02 16:12 rockyb
+
+ * test/: misc.right, sig.right: Help changed. Not sure why sig
+ keeps changing though.
+
+2003-08-02 15:54 rockyb
+
+ * Makefile.am, dbg-file.inc, dbg-help.inc, dbg-io.inc,
+ dbg-list.inc: Add _Dbg_ in front of more debugger variables. In
+ particular: _read_ -> _Dbg_read_ _maxline_ -> _Dbg_maxline_
+ _source_ -> _Dbg_source_
+
+2003-08-02 15:53 rockyb
+
+ * test/: misc-output.right, misc.right, sig.right: Add test of V
+ command. sig: line number again changed.
+
+2003-08-02 15:52 rockyb
+
+ * test/misc.cmd: Add test of V command.
+
+2003-08-02 15:51 rockyb
+
+ * dbg-cmds.inc: Routine to list variables and values by pattern
+ possibly inverted. Code courtesy of Mikael Andersson
+ <snikkt@telia.com>.
+
+2003-08-02 15:46 rockyb
+
+ * THANKS: This is long overdue, even if it is meager.
+
+2003-08-01 06:45 rockyb
+
+ * dbg-help.inc: Add "help show <command>" and "help info <command>"
+ .
+
+2003-07-31 23:48 rockyb
+
+ * dbg-help.inc: Missing a line for "help V"
+
+2003-06-19 10:49 rockyb
+
+ * TODO: Simple typo.
+
+2003-06-13 17:49 rockyb
+
+ * NEWS, ChangeLog: [no log message]
+
+2003-06-08 23:19 rockyb
+
+ * configure.ac: It's = not == in tests
+
+2003-06-08 10:39 rockyb
+
+ * configure.ac, test/Makefile.am, test/action.tests,
+ test/bugIFS.tests, test/display.tests, test/finish.tests,
+ test/run-action, test/run-brkpt, test/run-brkpt1, test/run-bugIFS,
+ test/run-debug, test/run-display, test/run-finish, test/run-list,
+ test/run-misc, test/run-multi, test/run-parm, test/run-search,
+ test/run-sig, test/run-skip, test/run-subshell, test/run-tbreak,
+ test/run-watch1, test/run-watch2, test/skip.tests,
+ test/subshell1.tests, test/subshell2.tests, test/subshell3.tests:
+ Debugger regression tests now will use diff --u if possible. Will
+ revert even to cmp if diff is not around. check_common: common
+ routines and setup to simplify/unify regression testing
+
+2003-06-06 01:01 rockyb
+
+ * NEWS, test/run-multi: Bash patches 005-007. run-multi: set
+ THIS_SH so it runs under cygwin (and others).
+
+2003-06-03 14:28 rockyb
+
+ * test/: Makefile.am, multi1.right, multi1.tests, multi2.right,
+ multi2.tests, multi3.right, multi3.tests, multi4.tests, run-multi:
+ Add multi tests
+
+2003-06-03 14:27 rockyb
+
+ * Makefile.am: Add EXTEXT for M$ OS's.
+
+2003-06-03 13:08 rockyb
+
+ * test/: Makefile.am, multi.sh, multi1.cmd, multi1.tests,
+ multi2.cmd, multi2.tests, multi3.cmd, multi3.tests, multi4.right,
+ run-multi: Add multi tests
+
+2003-06-02 05:06 rockyb
+
+ * configure.ac: [no log message]
+
+2003-06-02 05:03 rockyb
+
+ * configure.ac: Create bashdb as executable.
+
+2003-06-01 11:07 rockyb
+
+ * Makefile.am: Make sure bash is copied before running "make check"
+
+2003-06-01 10:35 rockyb
+
+ * doc/.cvsignore: [no log message]
+
+2003-06-01 10:35 rockyb
+
+ * .cvsignore, doc/.cvsignore, doc/fdl.texi: CVS maintainance.
+
+2003-06-01 10:32 rockyb
+
+ * ChangeLog, Makefile.am, configure.ac: configure.ac: set unique
+ distribution name Makefile.am: include doc directory.
+
+2003-06-01 10:31 rockyb
+
+ * doc/: Makefile.am, bashdb.texi, gpl.texi, version.texi.in: Except
+ Makefile.am, moved from bash doc directory. Makefile.am: pretty
+ standard stuff.
+
+2003-06-01 10:29 rockyb
+
+ * doc/.cvsignore: [no log message]
+
+2003-06-01 10:25 rockyb
+
+ * NEWS: [no log message]
+
+2003-06-01 09:23 rockyb
+
+ * test/: brkpt1.tests, brkpt2.right, brkpt2.tests, brkpt3.tests,
+ debug.tests, list.tests, misc.tests, parm.tests, run-brkpt,
+ run-debug, run-list, run-misc, run-parm, run-search, run-sig,
+ run-tbreak, run-watch2, search.tests, sig.tests, tbreak.tests,
+ watch2.tests: make check and make distcheck now work.
+
+2003-05-31 22:43 rockyb
+
+ * Makefile.am: Seems to be needed for make dist to work.
+
+2003-05-31 22:23 rockyb
+
+ * configure.ac: configure.in -> configure.ac
+
+2003-05-31 22:15 rockyb
+
+ * test/: Makefile.am, run-action, run-brkpt, run-brkpt1,
+ run-bugIFS, run-debug, run-display, run-finish, run-list, run-misc,
+ run-multi, run-parm, run-search, run-sig, run-skip, run-subshell,
+ run-tbreak, run-watch1, run-watch2, skip.tests, subshell1.tests,
+ tbreak.tests: Closer to getting "make distcheck" working. "make
+ check" is currently broken for a couple of tests.
+
+2003-05-31 21:35 rockyb
+
+ * test/: brkpt3.tests, debug.tests, display.tests, finish.tests,
+ list.tests, subshell2.tests, subshell3.tests, subshell4.tests,
+ tbreak.tests, watch1.tests, watch2.tests: changes to making "make
+ dist" work
+
+2003-05-31 21:18 rockyb
+
+ * CHANGES, Makefile.am, bashdb, bashdb.in, configure.in,
+ dbg-file.inc, test/.cvsignore, test/Makefile.am, test/action.cmd,
+ test/action.right, test/action.tests, test/brkpt1.cmd,
+ test/brkpt1.right, test/brkpt1.tests, test/brkpt2.cmd,
+ test/brkpt2.right, test/brkpt2.tests, test/brkpt3.cmd,
+ test/brkpt3.right, test/brkpt3.tests, test/bugIFS, test/bugIFS.cmd,
+ test/bugIFS.right, test/bugIFS.sh, test/bugIFS.tests,
+ test/dbg-test1.sh, test/dbg-test1.sub, test/dbg-test2.sh,
+ test/debug.cmd, test/debug.right, test/debug.sh, test/debug.tests,
+ test/debug2.cmd, test/display.cmd, test/display.right,
+ test/display.tests, test/finish.cmd, test/finish.right,
+ test/finish.tests, test/list.cmd, test/list.right, test/list.tests,
+ test/misc-output.right, test/misc.cmd, test/misc.right,
+ test/misc.tests, test/multi4.cmd, test/multi4.right,
+ test/multi4.tests, test/parm.cmd, test/parm.right, test/parm.sh,
+ test/parm.tests, test/prof1.cmd, test/prof2.cmd, test/run-action,
+ test/run-all, test/run-brkpt, test/run-brkpt1, test/run-bugIFS,
+ test/run-debug, test/run-display, test/run-finish, test/run-list,
+ test/run-misc, test/run-multi, test/run-parm, test/run-search,
+ test/run-sig, test/run-skip, test/run-subshell, test/run-tbreak,
+ test/run-watch1, test/run-watch2, test/search.cmd,
+ test/search.right, test/search.tests, test/sig.cmd, test/sig.right,
+ test/sig.sh, test/sig.tests, test/skip.cmd, test/skip.right,
+ test/skip.sh, test/skip.tests, test/subshell.sh,
+ test/subshell1.cmd, test/subshell1.right, test/subshell1.tests,
+ test/subshell2.cmd, test/subshell2.right, test/subshell2.tests,
+ test/subshell3.cmd, test/subshell3.right, test/subshell3.tests,
+ test/subshell4.cmd, test/subshell4.right, test/subshell4.tests,
+ test/tbreak.cmd, test/tbreak.right, test/tbreak.tests,
+ test/watch1.cmd, test/watch1.right, test/watch1.tests,
+ test/watch2.cmd, test/watch2.right, test/watch2.tests:
+ configure->configure.ac tests->test bashdb no longer has hard-coded
+ #! some changes to make "make distcheck" work... More changes
+ later..
+
+2003-05-27 19:54 rockyb
+
+ * NEWS: [no log message]
+
+2003-05-20 14:02 rockyb
+
+ * dbg-init.inc: More OS-independent (output independent) test if a
+ terminal is attached.
+
+2003-04-29 20:33 rockyb
+
+ * NEWS: [no log message]
+
+2003-04-29 20:22 rockyb
+
+ * bashdb, dbg-cmds.inc, dbg-fns.inc, dbg-init.inc: Bug: Was using
+ source filename rather than canonicalized (expanded) filename.
+
+2003-04-07 23:24 rockyb
+
+ * dbg-cmds.inc: Use gdb undefined command message.
+
+2003-03-31 10:09 rockyb
+
+ * NEWS, dbg-brk.inc: Numbers in breakpoint/watchpoint/action
+ numbers are printed in a "%-3d" rather than (I think the nicer)
+ %3d" to match gdb's output. This helps ddd parse breakpoints.
+
+2003-03-30 22:04 rockyb
+
+ * NEWS, dbg-brk.inc: Breakpoints are now are origin 1 to match gdb.
+ It also helps ddd.
+
+2003-03-27 00:34 rockyb
+
+ * dbg-pre.inc.in: Ooops - changed dbg-pre.inc but should have
+ changed this one instead.
+
+2003-03-26 09:05 rockyb
+
+ * dbg-file.inc, dbg-io.inc: Add routine to resolve based on dir and
+ then expand a filename. Hopefully will be more permissive in
+ specified and work more like gdb.
+
+2003-03-26 09:01 rockyb
+
+ * dbg-brk.inc: Expand filename only the breakpoint exists.
+
+2003-03-25 23:30 rockyb
+
+ * dbg-list.inc: When set annotate=1 expand full filenames when
+ listing source lines.
+
+2003-03-25 23:29 rockyb
+
+ * dbg-file.inc: Bug in testing absolute file name.
+
+2003-03-25 18:46 rockyb
+
+ * dbg-brk.inc, dbg-file.inc, dbg-list.inc: Canonicalize filenames
+ in list and breakpoint commands and update regression tests to make
+ sure we don't slip back.
+
+2003-03-21 19:16 rockyb
+
+ * dbg-file.inc, dbg-set.inc: Small stuff.
+
+2003-03-21 18:54 rockyb
+
+ * bashdb, dbg-brk.inc, dbg-file.inc, dbg-fns.inc, dbg-help.inc,
+ dbg-init.inc, dbg-set.inc: Add "show dir" and directory search in
+ filename lookup (such as for breakpoints or line listing).
+
+2003-03-21 12:59 rockyb
+
+ * dbg-sig.inc: Signal received message is now gdb's. This
+ simplifies ddd handling.
+
+2003-03-21 12:56 rockyb
+
+ * TODO: Current sitiation.
+
+2003-02-27 05:14 rockyb
+
+ * dbg-brk.inc, dbg-file.inc, dbg-fns.inc, dbg-help.inc, dbg-io.inc:
+ _filenames -> _Dbg_filenames. Array now has expanded name Add
+ routine to print filename in form appropriate to annotation and
+ basename only
+
+2003-02-27 02:33 rockyb
+
+ * NEWS: _bashdb_ -> _Dbg_
+
+2003-02-27 02:27 rockyb
+
+ * bashdb, dbg-brk.inc, dbg-cmds.inc, dbg-file.inc, dbg-fns.inc,
+ dbg-help.inc, dbg-hist.inc, dbg-init.inc, dbg-io.inc, dbg-list.inc,
+ dbg-main.inc, dbg-pre.inc.in, dbg-set-d-vars.inc, dbg-set.inc,
+ dbg-sig-ret.inc, dbg-sig.inc, dbg-stack.inc: All _bashdb_ variables
+ renamed _Dbg_. Might help for debuggers in other POSIX shells.
+
+2003-02-26 23:34 rockyb
+
+ * NEWS, dbg-help.inc, dbg-init.inc, dbg-set.inc: Add "set
+ annotate." More better set/show regression tests.
+
+2003-02-25 11:22 rockyb
+
+ * dbg-brk.inc: A little closer to gdb. Mesage reads breakpoint
+ already hit 1 time or breakpoint already hit n times
+
+2003-02-25 10:55 rockyb
+
+ * dbg-brk.inc: Make breakpoints look more like gdb. It helps ddd
+ parsing.
+
+2003-02-23 15:40 rockyb
+
+ * dbg-file.inc: Add tilde to list of translation characters.
+
+2003-02-19 18:45 rockyb
+
+ * dbg-brk.inc, dbg-cmds.inc, dbg-io.inc, dbg-sig.inc: Some declare
+ -a's turned into typeset -a on the hope (from David Korn) that this
+ will be legal ksh.
+
+2003-02-17 19:23 rockyb
+
+ * .cvsignore: bashdb- -> dbg-
+
+2003-02-17 19:23 rockyb
+
+ * Makefile.am, bashdb-sig-ret.inc, dbg-sig-ret.inc: Miscellaneous
+ small changes for new version and bashdb- -> dbg- changes.
+
+2003-02-17 19:02 rockyb
+
+ * Makefile.am, TODO, bashdb, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-file.inc, bashdb-fns.inc, bashdb-help.inc, bashdb-hist.inc,
+ bashdb-init.inc, bashdb-io.inc, bashdb-list.inc, bashdb-main.inc,
+ bashdb-set-d-vars.inc, bashdb-set.inc, bashdb-sig.inc,
+ bashdb-stack.inc, dbg-brk.inc, dbg-cmds.inc, dbg-file.inc,
+ dbg-fns.inc, dbg-help.inc, dbg-hist.inc, dbg-init.inc, dbg-io.inc,
+ dbg-list.inc, dbg-main.inc, dbg-pre.inc, dbg-set-d-vars.inc,
+ dbg-set.inc, dbg-sig.inc, dbg-stack.inc, bashdb-pre.inc.in,
+ dbg-pre.inc, dbg-pre.inc.in: bashdb -> dbg to facilitate porting to
+ other POSIX shells.
+
+2003-02-17 17:02 rockyb
+
+ * bashdb-fns.inc: Remove SUBEXIT trap.
+
+2003-02-17 13:15 rockyb
+
+ * bashdb-brk.inc: I think I've gotten over the hurdle of passing
+ information back. Removing breakpoints in a subshell and having
+ that persist now works.
+
+2003-02-17 07:34 rockyb
+
+ * bashdb-brk.inc: Perhaps some cleanup.
+
+2003-02-17 06:51 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc, bashdb-sig.inc:
+ State saving bugs: save state of more breakpoint/action variables,
+ step/next variables.
+
+2003-02-16 20:08 rockyb
+
+ * NEWS, bashdb-brk.inc, bashdb-file.inc, bashdb-sig.inc: Probably
+ just beating around problems. Perhaps closer. Perhaps not.
+
+2003-02-16 12:18 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
+ bashdb-sig.inc: More state recorded in subshell journal:
+ Enable/disable fntrace options
+
+ having breakpoints persist inside a subshell now works. (Removing
+ has problems though, as does saving/restoring the step counter)
+
+2003-02-16 08:34 rockyb
+
+ * bashdb-brk.inc, bashdb-file.inc, bashdb-fns.inc, bashdb-sig.inc:
+ Back to the future. Back to a single journal file. Can't get
+ SUBEXIT working and this seems to be more reliable (albeit more
+ work/slower).
+
+2003-02-14 18:47 rockyb
+
+ * NEWS, TODO, bashdb-sig.inc: Bug in quit 0 n.
+
+2003-02-14 18:38 rockyb
+
+ * CHANGES: Note BASH_SUBSHELL. Some typographical mistakes
+ corrected.
+
+2003-02-14 18:31 rockyb
+
+ * NEWS: Update as appropriate.
+
+2003-02-14 18:25 rockyb
+
+ * bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
+ bashdb-set-d-vars.inc, bashdb-sig.inc: Better journal mechanism:
+ Now have journal per subshell. (Journal is used to pass information
+ between subshell and parent)
+
+ There were escaping bugs in putting history entries into the
+ journal and retrieving them.
+
+ Debugger "Print" now works like quote does. We were having
+ substituion problems before, e.g. "This can't happen" (the single
+ quote in the string).
+
+ bashdb-fns.inc: New fn _bashdb_esq_dq. Save last_xxx state even if
+ we don't enter the debugger.
+
+2003-02-12 19:55 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-hist.inc, bashdb-init.inc, bashdb-io.inc,
+ bashdb-list.inc, bashdb-main.inc, bashdb-set.inc, bashdb-sig.inc,
+ bashdb-stack.inc: Try to make more ksh-93 compatible.
+
+ declare -> typeset (except when using declare -p or declare -a).
+ source -> .
+
+2003-02-12 01:47 rockyb
+
+ * bashdb: Small changes to make a little more consistent with ksh93
+
+2002-12-31 23:25 rockyb
+
+ * bashdb-pre.inc.in: Comment more.
+
+2002-12-31 23:17 rockyb
+
+ * bashdb-file.inc: Add % to list of translated file characters.
+
+2002-12-31 23:12 rockyb
+
+ * bashdb-fns.inc: [no log message]
+
+2002-12-31 11:57 rockyb
+
+ * bashdb-fns.inc, bashdb-list.inc, bashdb-sig.inc: Make all bashdb
+ functions begin _bashdb - were were missing a couple of routines.
+
+2002-12-30 23:23 rockyb
+
+ * NEWS: [no log message]
+
+2002-12-30 23:20 rockyb
+
+ * bashdb-file.inc: Add + to list of translated file2var characters.
+
+2002-12-25 10:30 rockyb
+
+ * bashdb-cmds.inc: More state saved.
+
+2002-12-25 10:20 rockyb
+
+ * NEWS: Recent stuff.
+
+2002-12-25 10:18 rockyb
+
+ * TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-file.inc,
+ bashdb-hist.inc, bashdb-set.inc, bashdb-sig.inc: Start the tedious
+ task of having a mechanism for setting variables that in a subshell
+ so that its value appears in its parent shell.
+
+2002-12-25 00:01 rockyb
+
+ * TODO: [no log message]
+
+2002-12-24 23:14 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc: Fix setting breakpoints over
+ restart. Needed to save the _brkpt_filevar and _action_filevar
+ arrays as well as _brkpt_count and _brkpt_cond arrays.
+
+ If we are in a subshell, we need to save BASHB_RESTART_FILE so it
+ will get set in sup-shells.
+
+2002-12-24 22:13 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-12-24 22:13 rockyb
+
+ * bashdb-cmds.inc, bashdb-file.inc, bashdb-sig.inc: Bug/Feature
+ fix: Restart now quits all subshells before issuing its restart
+ (exec) command.
+
+2002-12-20 21:31 rockyb
+
+ * bashdb-fns.inc: Small typo.
+
+2002-12-20 12:22 rockyb
+
+ * TODO: Update.
+
+2002-12-20 12:17 rockyb
+
+ * NEWS: - Bug: if IFS set character in filename: the filename
+ would be truncated. Handle IFS save/restore more pervasively by
+ saving on DEBUG handler entry.
+
+2002-12-20 12:12 rockyb
+
+ * bashdb-cmds.inc, bashdb-fns.inc: Save and restore IFS on debug
+ signal handler. It means we can remove custom save/restores
+ elsewhere in the code.
+
+2002-12-10 04:45 rockyb
+
+ * bashdb-brk.inc: More bash-oriented way to strip off a suffix.
+
+2002-12-10 01:05 rockyb
+
+ * emacs/gud.el: Eval expression command is "x" not "pe"
+
+2002-12-10 01:04 rockyb
+
+ * TODO: [no log message]
+
+2002-12-09 08:16 rockyb
+
+ * CHANGES: "set -x" now show "for", "case" and "select" headers (
+ "for x in", "case c in", "select s")
+
+2002-12-07 22:42 rockyb
+
+ * ChangeLog, NEWS: Get ready for yet another release.
+
+2002-12-07 16:54 rockyb
+
+ * ChangeLog: [no log message]
+
+2002-12-07 16:49 rockyb
+
+ * bashdb-main.inc: Make sure we can read the restart file.
+
+2002-12-07 16:48 rockyb
+
+ * bashdb-cmds.inc: Forgot to unset flag which says to reread the
+ file.
+
+2002-12-07 16:43 rockyb
+
+ * ChangeLog, bashdb, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-main.inc: Preserve breakpoints, watchpoints, debugger set
+ variables on a restart.
+
+2002-12-07 16:41 rockyb
+
+ * Makefile.am: Remove compile of bashdb.elc. It's going away
+ anyway.
+
+2002-12-07 10:24 rockyb
+
+ * NEWS: As appropriate.
+
+2002-12-07 10:23 rockyb
+
+ * ChangeLog: print select head - "select s in"
+
+2002-12-07 08:35 rockyb
+
+ * bashdb-io.inc: [no log message]
+
+2002-12-07 08:18 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-12-07 08:16 rockyb
+
+ * bashdb-io.inc: bashdb-io.inc (_bashdb_readlin): - When reading
+ large files which takes a long time, print out status every 1000
+ lines.
+
+2002-12-07 08:02 rockyb
+
+ * NEWS: Bug: (parse.y) line number was not updated properly when in
+ a here documented with an unquoted delimter and containing
+ backslash newline.
+
+ Update and modernize tests and make executable.
+
+2002-12-06 22:47 rockyb
+
+ * bashdb-sig-ret.inc: Not used, but it if it were, this would be
+ right. Need to save/restore IFS around a "set -"
+
+2002-12-06 22:44 rockyb
+
+ * bashdb-list.inc: Typo.
+
+2002-12-06 22:43 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-12-06 11:27 rockyb
+
+ * emacs/: gud.el, gud.el.diff: A typo. Also modified DB when I
+ meant to modify bashdb.
+
+2002-12-03 19:46 rockyb
+
+ * bashdb-help.inc: Typo.
+
+2002-12-03 19:34 rockyb
+
+ * bashdb-fns.inc: Remove previous variable test. Not needed?
+
+2002-12-03 19:24 rockyb
+
+ * bashdb-fns.inc: Bug in set was set of IFS messing up "set"
+ parsing. This time for sure!?
+
+2002-12-03 18:36 rockyb
+
+ * bashdb-fns.inc: More precise function comment.
+
+2002-12-03 18:34 rockyb
+
+ * bashdb-fns.inc: Bug: if _bashdb_old_set_opts was null. Test now.
+
+2002-12-02 08:20 rockyb
+
+ * TODO: Update as appropriate.
+
+2002-12-02 06:58 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-12-02 06:42 rockyb
+
+ * bashdb-cmds.inc, bashdb-file.inc, bashdb-init.inc:
+ bashdb-file.inc: source persistent only if it exists.
+ bashdb-init.inc/bashdb-cmds.inc: read persistent, write persistent.
+
+2002-12-02 06:41 rockyb
+
+ * bashdb-help.inc: Update doc for "x/examine"
+
+2002-12-02 06:41 rockyb
+
+ * bashdb-sig.inc: Hack (but works more often) cleanup of persistent
+ file.
+
+2002-12-02 06:40 rockyb
+
+ * CHANGES, NEWS, TODO: As appropriate.
+
+2002-12-02 04:32 rockyb
+
+ * CHANGES: Update as appropriate.
+
+2002-11-30 19:13 rockyb
+
+ * bashdb-hist.inc: Typo.. "H count" was broken.
+
+2002-11-30 01:16 masata-y
+
+ * bashdb: Fix a typo.
+
+2002-11-26 10:47 rockyb
+
+ * bashdb-init.inc, bashdb-set-d-vars.inc: More elegant (and I
+ wonder if not more robust) way to set $1 via set. Use "set -- xx
+ yy" rather than "set xx yy"
+
+2002-11-26 07:23 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-11-26 07:09 rockyb
+
+ * emacs/gud.el.diff: Set default minibuf-mod-map in bashdb read
+ call from Masatake YAMATO and add link to
+ http://bashdb.sourceforge.net
+
+2002-11-26 07:04 rockyb
+
+ * emacs/gud.el: Add HTTP reference.
+
+2002-11-26 06:34 rockyb
+
+ * emacs/gud.el: Change from Masatake YAMATO in running bash
+ initially. Uses gud-minibuffer-local-map now.
+
+2002-11-23 00:17 rockyb
+
+ * bashdb-sig.inc: Don't wipe temp files unless subshell is 0.
+ Likewise don't enter command shell if subshell is not 0. Don't know
+ that this will make much difference, but I guess it's the right
+ thing to do.
+
+2002-11-22 22:02 rockyb
+
+ * bashdb-help.inc: Document help "set showcommand"
+
+2002-11-22 21:50 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-11-22 21:50 rockyb
+
+ * bashdb-init.inc: Bug: if no script we were running "set" to dump
+ environment.
+
+2002-11-22 20:57 rockyb
+
+ * bashdb-cmds.inc, bashdb-list.inc, bashdb-set.inc,
+ emacs/bashdb.el, emacs/gud.el: We now keep track of the subshell
+ level: dynamic veriable BASH_SUBSHELL and the debugger prints these
+ as ()'s inside of the prompt.
+
+2002-11-20 12:00 rockyb
+
+ * TODO: Current state of things and known bugs.
+
+2002-11-20 10:11 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-11-20 09:55 rockyb
+
+ * bashdb-init.inc: "bash --debugger script args" was not setting
+ args properly.
+
+2002-11-19 23:02 rockyb
+
+ * bashdb-cmds.inc: Changes to have regression tests work with
+ different paths.
+
+2002-11-19 22:17 rockyb
+
+ * bashdb: We have a better expand_fn now if we need it.
+
+2002-11-19 21:44 rockyb
+
+ * Makefile.am: This is a pain. Get date and autoregen right on
+ bashdb-pre.inc.
+
+2002-11-19 21:26 rockyb
+
+ * TODO: Mostly hacks to make a distribution work smoothly.
+ MANIFEST: add DVI's. This reduce TeX dependency, okay? TODO:
+ document bugs configure.in touch files so that we have right the
+ first time.
+
+2002-11-19 20:26 rockyb
+
+ * bashdb-cmds.inc: Variable name typo. When rerunning, show full
+ command now. Is messing up a bit too much.
+
+2002-11-19 20:25 rockyb
+
+ * bashdb-set.inc: Update help.
+
+2002-11-19 20:21 rockyb
+
+ * bashdb: Remove readonly attributes because when we run as a
+ subshell these want to get set again. May have to rethink how to
+ do.
+
+2002-11-19 20:20 rockyb
+
+ * Makefile.am: Put touch inside build of bashd-pre.inc to avoid
+ redoing work.
+
+2002-11-19 20:19 rockyb
+
+ * bashdb-help.inc: Add set documentation. Put messages in a form
+ that DDD will understand without any hassle.
+
+2002-11-19 16:01 rockyb
+
+ * NEWS: Update as appropriate. Gee there are lots of changes,
+ mostly bug fixes.
+
+2002-11-19 15:32 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc, bashdb-help.inc,
+ bashdb-io.inc, bashdb-main.inc: Canonicalize filevars via a file
+ expand routine. Allows multpile to refer to a given file.
+
+ Add option to have files show only short (basename) names, useful
+ in testing
+
+ Add set/show of these.
+
+ Bug in not setting fntrace correctly on debugger exit.
+
+ Add -c option on bashdb. Analogous to "bash -c string"
+
+2002-11-19 15:16 rockyb
+
+ * bashdb-help.inc, bashdb-set.inc: Add set/show options to debug
+ debugger and have filenames get listed as basename only.
+
+2002-11-19 15:15 rockyb
+
+ * Makefile.am, bashdb-file.inc: Break out more routines into
+ bashdb-file.inc. Add _bashdb_expand_filename to canonicalize file
+ names.
+
+2002-11-19 10:36 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc: Fix bug in continue comand.
+ Moved code from bashdb-brk.inc to bashdb-cmds.inc
+
+2002-11-19 02:58 rockyb
+
+ * bashdb-brk.inc, bashdb-init.inc, bashdb-list.inc,
+ bashdb-pre.inc.in: Use common routines now. Spelled "Bourne"
+ incorrectly in bashdb-{pre,init}.inc
+
+2002-11-19 02:55 rockyb
+
+ * bashdb-fns.inc: Add common routines _bashdb_check_line and
+ _bashdb_get_maxline. Reduces code bulk while making things more
+ reliable. _get_maxline now reads in the file if it hasn't been read
+ in yet.
+
+2002-11-19 02:53 rockyb
+
+ * bashdb-io.inc: Test to see if file exists before reading. We
+ could probably do better, but will need more code reorganization
+ for this.
+
+2002-11-18 22:14 rockyb
+
+ * bashdb-brk.inc: A little closer for FreeBSD...
+
+2002-11-18 22:08 rockyb
+
+ * bashdb-brk.inc, bashdb-stack.inc: Even closer to getting FreeBSD
+ regression tests work okay.
+
+2002-11-18 21:50 rockyb
+
+ * bashdb-list.inc: More changes to make FreeBSD regression tests
+ work out -- more to come...
+
+2002-11-18 21:31 rockyb
+
+ * bashdb, bashdb-brk.inc, bashdb-init.inc, bashdb-list.inc,
+ bashdb-stack.inc: Add -B option to list only basename in debugger
+ output. Is useful for FreeBSD which list files as foo rather than
+ ./foo.
+
+2002-11-18 19:40 rockyb
+
+ * .cvsignore, bashdb-pre.inc.in: Release information included via
+ bashdb-pre.inc (via bashdb-pre.inc.in)
+
+2002-11-18 19:36 rockyb
+
+ * Makefile.am, NEWS, bashdb, bashdb-init.inc, bashdb-init.inc.in,
+ bashdb.in: Add release information via new file bashdb-pre.in
+ rather than modify bashdb-init.inc and bashdb
+
+2002-11-18 09:32 rockyb
+
+ * NEWS: typo
+
+2002-11-18 09:30 rockyb
+
+ * NEWS: Note configure script bug fix.
+
+2002-11-18 08:57 rockyb
+
+ * configure.in: Clean up a little.
+
+2002-11-17 20:26 rockyb
+
+ * Makefile.am: Changes to make .in targets get recreated.
+
+2002-11-17 19:44 rockyb
+
+ * NEWS, TODO: Update to reflect current situation.
+
+2002-11-17 19:41 rockyb
+
+ * bashdb-sig.inc: Bug: don't set exit handler inside debug trap
+ handler. Seems to kick to be inhereted on subshells and then we
+ call the exit routine too often.
+
+ exit_handler more like the other handlers. Understands
+ "stop/nostop, print/noprint stack/nostack". Does more of the same
+ things before entering cmdloop that debug_handler does via a more
+ common debugger enter routine.
+
+ Saving _curline now done in common debbber enter routine
+
+2002-11-17 19:38 rockyb
+
+ * bashdb-cmds.inc: File got trunctated. Like bashdb-help.inc --
+ Hmm. Something's fishy.
+
+ Anyway, "debug" with no arguments now uses the last command rather
+ the last statement. This should be correct more often.
+
+2002-11-17 19:34 rockyb
+
+ * bashdb-fns.inc, bashdb-main.inc: _curline is now set by
+ BASH_LINENO rather than passing as a parameter to the trap.
+
+ Add this common thing inside common debugger enter routine.
+
+2002-11-17 19:30 rockyb
+
+ * bashdb-help.inc: info signals now shows EXIT in list.
+
+ Some help text got truncated.
+
+ Move CVS Id line to end to facilitate debugging.
+
+2002-11-17 19:26 rockyb
+
+ * Makefile.am: Add new .in files to distribution
+
+2002-11-17 19:23 rockyb
+
+ * bashdb: Derived now from bashdb.in
+
+2002-11-17 19:23 rockyb
+
+ * bashdb-init.inc: Derived now from bashdb-init.in
+
+2002-11-17 19:22 rockyb
+
+ * bashdb-init.inc.in, bashdb.in: bashdb and bashdb-init.inc are now
+ derived so that we can automatically put in the release number.
+
+2002-11-16 11:17 rockyb
+
+ * CHANGES: Update as appropriate
+
+2002-11-16 09:49 rockyb
+
+ * bashdb-list.inc: We now print the statement to be executed if it
+ was on the same line/file and the statement part is different from
+ the last time we ran this.
+
+2002-11-16 09:48 rockyb
+
+ * emacs/gud.el: Patched version for emacs 21.2 of gud.el with bash
+ support.
+
+2002-11-16 09:47 rockyb
+
+ * emacs/gud.el.diff: Patches that I hope will be on the next
+ version of Emacs (assuming the paperwork isn't lost, people don't
+ forget about the patch as a result of the time delay to do the
+ paperwork and so on.)
+
+2002-11-16 09:45 rockyb
+
+ * emacs/bashdb.el: Move from parent directory here. May have also
+ added provision for "finish" command.
+
+2002-11-16 09:40 rockyb
+
+ * bashdb-main.inc, bashdb-sig.inc: Now save the command that is to
+ be executed next.
+
+2002-11-16 09:38 rockyb
+
+ * bashdb-fns.inc: Add common function
+ _bashdb_set_to_return_from_debugger to regularize the things that
+ need to be done on exit. There are more now, since we are saving
+ the last command executed on this line of the source file.
+
+2002-11-16 09:36 rockyb
+
+ * bashdb-init.inc: Need to skip more initially for "bashdb -c"
+ setup.
+
+2002-11-16 09:25 rockyb
+
+ * bashdb: Add -c option analogous to "bash -c".
+
+2002-11-14 15:45 rockyb
+
+ * NEWS, bashdb-cmds.inc: More improvements to "x" command. Use
+ print as a fallback...
+
+2002-11-14 09:25 rockyb
+
+ * bashdb-help.inc: configuure.in: get ready for version 0.32
+ bashdb.texi: minor typo changes debugger/help/sig: Remove "Num"
+ from title as it is no longer there.
+
+2002-11-14 09:08 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-11-14 08:15 rockyb
+
+ * bashdb-help.inc, bashdb-sig.inc: A tad more like gdb: no signal
+ numbers listed. No longer trap on SIGWINCH.
+
+2002-11-13 23:39 rockyb
+
+ * NEWS, bashdb-help.inc, bashdb-sig.inc: Add help for "handle".
+ Tidy generic signal handler more and make more general (e.g
+ unconditinally turn off set tracing).
+
+2002-11-13 23:22 rockyb
+
+ * bashdb-fns.inc, bashdb-sig.inc: Clean up signal handling code a
+ small amount by creating a common routine to set some global
+ variables.
+
+2002-11-13 19:33 rockyb
+
+ * bashdb-cmds.inc, bashdb-help.inc, bashdb-sig.inc: Signal handling
+ is more like gdb now. No doubt there're room for improvement, but
+ this is probably a big improvement.
+
+2002-11-12 15:20 rockyb
+
+ * NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-init.inc,
+ bashdb-sig.inc: Some work on signal handling. More is there, more
+ to do. So what else is new?
+
+2002-11-12 09:30 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-11-12 07:45 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc: Add gdb's
+ "condition" command.
+
+2002-11-12 07:42 rockyb
+
+ * bashdb-sig.inc: Oops --- typo in variable name.
+
+2002-11-12 07:41 rockyb
+
+ * bashdb-sig.inc: Add provision for debugging debugger.
+
+2002-11-12 07:40 rockyb
+
+ * bashdb-io.inc: Add more file translation characters for ", [, and
+ ] and reorder letters to make mnemonic.
+
+2002-11-11 23:56 rockyb
+
+ * bashdb-sig.inc: Caught another routine that didn't start _bashdb_
+
+2002-11-11 23:45 rockyb
+
+ * TODO: Cross many things off list.
+
+2002-11-11 23:45 rockyb
+
+ * NEWS: Update as appropriate - major changes.
+
+2002-11-11 23:44 rockyb
+
+ * Makefile.am: Move bashdb.el into emacs directory.
+
+2002-11-11 16:45 rockyb
+
+ * bashdb.el: Moved inside emacs directory now.
+
+2002-11-10 21:26 rockyb
+
+ * NEWS: Believe it or not, the C files have gotten a little bit
+ *simpler*. We are closer towards having line numbers recorded
+ accurately in BASH_LINENO (although things are not perfect yet).
+
+2002-11-10 14:39 rockyb
+
+ * bashdb-help.inc, bashdb-stack.inc, bashdb.el: bashdb-help: Make
+ more like gdb - facilitates use in ddd. bashdb-stack.inc: Fix bug
+ in "stack_down". (There's another one though lurking) bashdb.el:
+ add key mapping for finish and other keymappings tests/misc: change
+ in "show" output tests/brkpt2: perhaps better although not quite
+ perfect.
+
+2002-11-10 11:35 rockyb
+
+ * bashdb-help.inc: Add help for finish command. Invalid help
+ command now reports what gdb does.
+
+2002-11-09 23:54 rockyb
+
+ * bashdb-help.inc: Missed a place that should have added _bashdb.
+
+2002-11-09 20:28 rockyb
+
+ * bashdb-set.inc: Make show command work like gdb.
+
+2002-11-09 20:16 rockyb
+
+ * bashdb-io.inc: Missed a couple more "builtin printf"'s
+
+2002-11-09 20:15 rockyb
+
+ * bashdb-io.inc: Specify *builtin* printf.
+
+2002-11-09 07:38 rockyb
+
+ * Makefile.am, NEWS, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-hist.inc, bashdb-io.inc, bashdb-main.inc, bashdb-set.inc:
+ echo -> builtin echo Add "info signals" and "info handler" Break
+ out history into new file bashdb-hist.inc. Help command change v
+ -> M
+
+2002-11-08 21:08 rockyb
+
+ * bashdb-sig.inc: Previous flie was horribly truncated.
+
+2002-11-05 22:43 rockyb
+
+ * bashdb-sig-ret.inc: bashdb.texi: Document finish command.
+
+ debugger/tests*, MANIFEST, Makefile.am: Add finish command test.
+
+ *sig: add signal save/restor test
+
+2002-11-02 15:17 rockyb
+
+ * NEWS: Today's hacks.
+
+2002-11-02 14:46 rockyb
+
+ * Makefile.am, bashdb-list.inc, bashdb-sig-ret.inc, bashdb-sig.inc:
+ Save/restore signals on entering debugger.
+
+2002-11-02 10:16 rockyb
+
+ * bashdb-cmds.inc, bashdb-sig.inc: Workaround? for bash bug
+ introduced implementing "trap RETURN"
+
+2002-11-02 09:15 rockyb
+
+ * bashdb-sig.inc: [no log message]
+
+2002-11-02 09:15 rockyb
+
+ * bashdb-sig.inc: Small comment changes.
+
+2002-11-02 09:12 rockyb
+
+ * CHANGES: Reflects better the changes.
+
+2002-11-02 09:03 rockyb
+
+ * CHANGES: Update as appropriate.
+
+2002-11-02 08:12 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-sig.inc, bashdb-stack.inc: Fix bug
+ where stack trace current line entry was sometimes wrong. No
+ longer mangle line number in stack changing commands.
+
+ Printing source line on "RETURN" debugger call.
+
+2002-11-01 07:14 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc, bashdb-io.inc,
+ bashdb-list.inc, bashdb-main.inc, bashdb-sig.inc: Add gdb's finish
+ or perl5db's return. Line number on return statement is funny and
+ there are some bugs to make fully work.
+
+ Now all debugger routines start _bashdb.
+
+2002-10-31 05:59 rockyb
+
+ * TODO: [no log message]
+
+2002-10-30 22:11 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-10-30 22:03 rockyb
+
+ * bashdb-cmds.inc, bashdb-help.inc: Allow negative numbers in
+ history commands. Get ready for release 0.30.
+
+2002-10-30 07:13 rockyb
+
+ * TODO: Cross some things off the list.
+
+2002-10-29 08:54 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-help.inc: Make history command more
+ robust and allow for more features. How allows for !n:p. We now
+ give an error message if the history numbers are out of range.
+ Separate history parsing into a subroutine to tidy and facilitate
+ future features.
+
+2002-10-27 00:05 rockyb
+
+ * NEWS: Update as appropriate.
+
+2002-10-27 00:02 rockyb
+
+ * bashdb-set-d-vars.inc: Better way to set dollar parameters. It
+ handles more than $1..$9 and sets $# correctly too.
+
+2002-10-26 23:17 rockyb
+
+ * bashdb-init.inc: bug in bashdb --debugger some local's must be
+ declares.
+
+2002-10-26 10:27 rockyb
+
+ * NEWS, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-init.inc, bashdb-set.inc: Fix/change history. Numbers now
+ match prompt numbers. Can use !n as well as hi n
+
+ Add GDB's "set editing" command.
+
+ _bashdb_help_set added to show set commands. Made more like GDB's
+ output.
+
+2002-10-25 08:15 rockyb
+
+ * bashdb-cmds.inc: Make H be like perl's. Fix history (hi) command.
+ Don't but some commands like comment and history in the history.
+ Test.
+
+2002-10-25 08:05 rockyb
+
+ * bashdb-cmds.inc: Make H be more like perl's. Make hi work.
+
+2002-10-25 07:07 rockyb
+
+ * bashdb-set.inc: Tidy up show output. Tests changed largely as a
+ result of size increase in bashdb from last change. run-misc:
+ wasn't giving an error is diff failed on first diff check.
+
+2002-10-25 06:44 rockyb
+
+ * NEWS: Latest news...
+
+2002-10-25 06:41 rockyb
+
+ * bashdb, bashdb-cmds.inc, bashdb-set.inc: Add "set/show prompt."
+ Make prompt customizable. bashdb: all -t to be a filename.
+
+2002-10-24 09:33 rockyb
+
+ * bashdb-set.inc, bashdb-sig.inc: Comment about why slightly more
+ complex loop to set args.
+
+2002-10-24 09:08 rockyb
+
+ * NEWS, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-init.inc, bashdb-io.inc, bashdb-set.inc: - Fix bugs in
+ debugger output when debugged program redirects I/O
+
+ - Add GDB's "set args" command
+
+2002-10-23 09:04 rockyb
+
+ * bashdb: Remove debug statement accidentally committed.
+
+2002-10-23 08:51 rockyb
+
+ * bashdb, bashdb-init.inc, bashdb-io.inc: bashdb, bashdb-init.inc:
+ Add -t option to set tty bashdb-io.inc: bug in not testing
+ _bashdb_tty in _bashdb_printf tests: output changes bashdb script
+ has gotten larger.
+
+2002-10-23 08:49 rockyb
+
+ * TODO: Update as appropriate.
+
+2002-10-23 08:26 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-init.inc, bashdb-io.inc, bashdb-set.inc: Change variable
+ $_tty to $_bashdb_tty
+
+ All "read -e -p" now have input and output redirected.
+
+ Implement tty command to set tty.
+
+2002-10-22 06:25 rockyb
+
+ * bashdb-cmds.inc: Fix bug in printing debugger prompt when
+ debugged program has redirected stderr. Thanks to Masatake YAMATO.
+
+2002-10-21 10:59 rockyb
+
+ * bashdb-cmds.inc: Remove trailing blanks.
+
+2002-10-21 10:48 rockyb
+
+ * bashdb-io.inc, bashdb-list.inc, bashdb-sig.inc: Just format
+ changes: remove blanks at the ends of some lines.
+
+2002-10-21 10:26 rockyb
+
+ * .cvsignore: Allow for different versions of autotools.
+
+2002-10-21 10:25 rockyb
+
+ * bashdb-help.inc: Bug in "help return" -- missing some lines
+ there.
+
+2002-10-19 09:26 rockyb
+
+ * bashdb-help.inc: Add documentation for new command return.
+ bashdb.texi: had duplicate help screens
+
+2002-10-19 09:08 rockyb
+
+ * NEWS: Minor typographical changes.
+
+2002-10-18 23:24 rockyb
+
+ * bashdb-cmds.inc: Make so regression test is portable. A hack for
+ now
+
+2002-10-18 23:16 rockyb
+
+ * bashdb-cmds.inc: Correct debug test.
+
+2002-10-18 22:40 rockyb
+
+ * bashdb-set-d-vars.inc: To set dollar variables ($1, $2, ... $?)
+ before evaluation of a user expression.
+
+2002-10-18 21:31 rockyb
+
+ * Makefile.am, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-io.inc, bashdb-sig.inc: A better way of handling setting
+ dollar variables.
+
+ Add debug test.
+
+2002-10-18 08:44 rockyb
+
+ * bashdb-brk.inc, NEWS: Set $1, $2 before watch-expression
+ evaluation
+
+2002-10-18 08:10 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-sig.inc: $? is saved and preserved
+ for use inside "eval" and "print"
+
+2002-10-18 06:38 rockyb
+
+ * bashdb-set.inc: Correct show version to add more sources.
+
+2002-10-18 06:32 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-sig.inc: Fix bug in skip *count*.
+
+2002-10-17 08:56 rockyb
+
+ * NEWS, TODO, bashdb-cmds.inc, bashdb-main.inc: bashdb-main.inc:
+ Bug in changing to _bashdb_libdir bashdb-cmds.inc: number of times
+ nested in debug listed via exported variable
+ BASHDB_LEVEL
+
+2002-10-17 08:11 rockyb
+
+ * bashdb-cmds.inc: Remove debugging statments.
+
+2002-10-17 00:10 rockyb
+
+ * NEWS, TODO, bashdb, bashdb-cmds.inc: Get "debug" working much
+ better: variables (e.g. $0) are substituted now. "bash
+ --debugger" invocations work since we no longer fork _libdir
+ renamed to _bashdb_libdir (in bashdb). We add "-L
+ _bashdb_libdir" when executing via bashdb script.
+
+2002-10-16 08:41 rockyb
+
+ * bashdb-help.inc: Document skip and debug.
+
+2002-10-16 08:40 rockyb
+
+ * bashdb-cmds.inc: Make skip work like next/step.
+
+2002-10-16 08:22 rockyb
+
+ * NEWS: As appropriate.
+
+2002-10-15 23:29 rockyb
+
+ * bashdb-help.inc: Document skip command.
+
+2002-10-15 22:57 rockyb
+
+ * bashdb-cmds.inc, bashdb-sig.inc: Add ability to skip execution of
+ a command. Debugger command: skip
+
+2002-10-11 23:18 rockyb
+
+ * NEWS: Update to reflect current sitiation
+
+2002-10-11 23:17 rockyb
+
+ * bashdb-list.inc: Fix bug in search forward not resetting line to
+ start.
+
+ Search now lists only one line same as gdb and perl5db do. Update
+ tests as appropriate.
+
+2002-10-10 21:08 rockyb
+
+ * TODO: Update to reflect current situtation: parameters now work.
+
+2002-10-10 20:57 rockyb
+
+ * bashdb-cmds.inc, bashdb-main.inc, bashdb-sig.inc: Fix bug so that
+ $1 preserve embedded blanks (or more precisely, embedded IFS) that
+ they might have had.
+
+2002-10-10 08:47 rockyb
+
+ * bashdb-cmds.inc: Bug in _bashdb_cmd_eval. Was not erasing
+ evalfile before starting if $1.. was empty, so we'd have
+ accumulated output.
+
+2002-10-10 08:30 rockyb
+
+ * .cvsignore: Add more good derived stuff (from autotools)
+
+2002-10-10 08:17 rockyb
+
+ * bashdb-cmds.inc, bashdb-io.inc, bashdb-sig.inc, bashdb-stack.inc:
+ Add parameters in stack trace. And can now refer to $1 $2 $3 in
+ print and eval commands.
+
+2002-10-03 08:40 rockyb
+
+ * bashdb-list.inc: Fix up search command to do the right thing more
+ often. However need to make another pass to match gdb semantics
+ more perfectly. Save last search pattern and can be repeated if no
+ pattern given.
+
+2002-09-24 13:30 rockyb
+
+ * Makefile.am, NEWS, bashdb-brk.inc, bashdb-cmds.inc,
+ bashdb-help.inc, bashdb-io.inc, bashdb-list.inc, bashdb-main.inc,
+ bashdb-sig.inc: Add "search" "reverse" (forward/backward searching)
+ and Perl's "a" (action) commands. bashdb-list.inc split off for the
+ debugger growth.
+
+2002-09-24 01:26 rockyb
+
+ * bashdb-help.inc: Add tb to help list.
+
+2002-09-23 18:45 rockyb
+
+ * NEWS: [no log message]
+
+2002-09-23 18:19 rockyb
+
+ * NEWS: [no log message]
+
+2002-09-23 18:09 rockyb
+
+ * NEWS: Make mroe readible.
+
+2002-09-23 17:52 rockyb
+
+ * bashdb.el: Small typo
+
+2002-09-23 17:47 rockyb
+
+ * bashdb.el: Messed up on author and didn't comment properly.
+
+2002-09-23 17:41 rockyb
+
+ * MANIFEST: This really isn't used. Autotools rules. (But really we
+ do a make dist in the parent directory.)
+
+2002-09-23 09:09 rockyb
+
+ * bashdb-brk.inc, bashdb-io.inc: Change format of display output to
+ identify display number and expression.
+
+2002-09-22 07:40 rockyb
+
+ * bashdb-help.inc: Add display regression test. bashdb-help.inc:
+ change lines to linespecs in help. Add missing _bashdb_msg.
+
+2002-09-21 22:46 rockyb
+
+ * bashdb.el: Don't know how to spell my own name!
+
+2002-09-21 22:35 rockyb
+
+ * bashdb-help.inc: Add help for display. correct en/dis help to
+ watchpoint and display.
+
+2002-09-21 21:41 rockyb
+
+ * NEWS, TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc: Add
+ gdb's auto display commands (display, undisplay, enable/disable
+ display)
+
+2002-09-21 06:41 rockyb
+
+ * bashdb-cmds.inc: debug command a tad better -- now allows for
+ command to get run.
+
+2002-09-21 06:17 rockyb
+
+ * bashdb-cmds.inc: Okay, now get out some of the bugs in the
+ "debug" command. More work is needed to make this more seamless.
+ (In particular need to skip over execution after debugged execution
+ happens).
+
+2002-09-21 05:50 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-sig.inc: Add provision to debug
+ into a script ("debug" command), and leave script without going
+ back into debugger command loop (BASHDB_QUIT_ON_QUIT environment
+ variable).
+
+2002-09-19 14:49 rockyb
+
+ * NEWS: Add caller builtin
+
+2002-09-19 13:01 masata-y
+
+ * bashdb-help.inc, bashdb.el: bashdb-help.inc: fix typo(tbreak,
+ down), added [count] in up command's help message. bashdb.el:
+ added gud-tbreak.
+
+2002-09-19 12:51 masata-y
+
+ * bashdb.el: added simple comments about how to install bashdb.el.
+ provided bashdb.
+
+2002-09-18 21:37 rockyb
+
+ * NEWS, bashdb-brk.inc, bashdb-cmds.inc, bashdb-help.inc,
+ bashdb-sig.inc: Add temporary break.
+
+2002-09-18 02:03 rockyb
+
+ * bashdb-help.inc: Document "break" command change args help
+ linespec in online help where appropriate.
+
+2002-09-17 09:01 rockyb
+
+ * NEWS: typo.
+
+2002-09-17 08:03 rockyb
+
+ * NEWS: Last minute additions for version 0.25 - recent doc
+ changes.
+
+2002-09-17 07:56 rockyb
+
+ * INSTALL: Remove generic instructions and customize for something
+ specific for the debugger. Should be more helpful, I think.
+
+2002-09-16 17:37 rockyb
+
+ * NEWS, bashdb-fns.inc, bashdb-main.inc, bashdb-sig.inc: Move debug
+ trap handler to bashdb-sig.inc and rename it, well,
+ debug_trap_handler.
+
+ Save restart set parameters and inside set -xv (at least
+ initially).
+
+2002-09-14 18:26 rockyb
+
+ * NEWS: Update.
+
+2002-09-14 18:14 rockyb
+
+ * bashdb-help.inc: Change info args to match closer gdb. Is now $1,
+ $2 and so on rather than initial program arguments.
+
+2002-09-14 17:54 rockyb
+
+ * bashdb-fns.inc, bashdb-main.inc: Now support $1 $2 as ${ARG[1}},
+ ${ARG[2]}.
+
+2002-09-14 14:51 rockyb
+
+ * bashdb-cmds.inc: Missed place in renaming _hi to _bashdb_hi
+
+2002-09-14 12:19 rockyb
+
+ * NEWS, TODO, bashdb, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-init.inc, bashdb-sig.inc: Variable name cleanup: more now
+ start with _bashdb
+
+2002-09-14 12:09 rockyb
+
+ * bashdb-cmds.inc: Some variable name cleanup and removal.
+
+2002-09-14 11:40 rockyb
+
+ * bashdb-cmds.inc: Correct "restart" command when running via "bash
+ -c ..."
+
+2002-09-14 07:36 rockyb
+
+ * NEWS, bashdb-init.inc, bashdb-io.inc: Small cleanups. BOGUS file
+ renamed to *BOGUS*.
+
+2002-09-14 07:21 rockyb
+
+ * bashdb, bashdb-cmds.inc, bashdb-help.inc, bashdb-init.inc,
+ bashdb-main.inc: Clean up code for debugger source command. Add
+ "info source"
+
+2002-09-14 01:09 rockyb
+
+ * bashdb-cmds.inc, bashdb-init.inc: Slightly cleaner code.
+
+2002-09-14 00:51 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-init.inc: Command files now nest
+ and pick up where they left off in between script execution. There
+ are still some minor cleanups and a small bug here or there.
+
+2002-09-13 23:04 rockyb
+
+ * bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc, bashdb-io.inc:
+ bash --debugger -c "..." now works. (Bug in restarting currently
+ though. restart now picks up full bash name from BASH environment
+ variable.
+
+ To accomplish the above, environment variable BASH_EXECUTION_STRING
+ was added which contains the contents what was passed after -c.
+
+2002-09-13 21:24 rockyb
+
+ * NEWS, bashdb-brk.inc: Fix bug where "watche x > 24" was creating
+ output to file 24
+
+2002-09-13 15:09 rockyb
+
+ * NEWS: Add: Function names now supported by changing the semantics
+ of declare -F.
+
+2002-09-13 15:06 rockyb
+
+ * NEWS: Function names now supported. As a result, can now set
+ breakpoints on them. However in non-interactive mode the line
+ number is wrong. It is the caller line.
+
+2002-09-13 15:03 rockyb
+
+ * TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc: Function
+ names now supported. As a result, can now set breakpoints on them.
+ However in non-interactive mode the line number is wrong. It is the
+ caller line.
+
+ As a result of the above, now extended these commands to include
+ linespecs: continue, break, list.
+
+2002-09-12 18:18 rockyb
+
+ * NEWS, bashdb-cmds.inc, bashdb-io.inc: Add list file:line. Rename
+ internal routines from print to list since that's what the command
+ is called.
+
+2002-09-12 16:17 rockyb
+
+ * bashdb-cmds.inc, bashdb-fns.inc: Change names of variables so as
+ not to conflict with user variables. Thus more of them are
+ prefaced with "_bashdb_." May have introduced a bug in the renaming
+ though...
+
+2002-09-12 06:44 rockyb
+
+ * NEWS, TODO: Now list/stop line of "for" or "select".
+
+2002-09-11 22:36 rockyb
+
+ * TODO: Note more line number problems.
+
+2002-09-11 22:36 rockyb
+
+ * bashdb-sig.inc: Add cmd-loop loop in exit handler so we in fact
+ don't exit!
+
+2002-09-11 22:13 rockyb
+
+ * bashdb-fns.inc: Don't go into debugger command loop when called
+ from the debugger: (the caller is _bashdb_).
+
+2002-09-11 07:39 rockyb
+
+ * bashdb-brk.inc, bashdb-fns.inc, bashdb-init.inc: Add break
+ file:line syntax. Add counts on watchpoints and display of this on
+ listing. Display breakpoint number when adding. i
+
+2002-09-11 07:38 rockyb
+
+ * NEWS: Version 0.23 changes (so far)
+
+2002-09-11 00:36 rockyb
+
+ * bashdb-cmds.inc: Make safe for tampering with IFS.
+
+2002-09-10 13:25 rockyb
+
+ * bashdb-cmds.inc: Fix bug in comment without space after #, e.g.
+ #foo.
+
+2002-09-10 13:13 rockyb
+
+ * bashdb-cmds.inc: Improve comment pattern so "#foo" works as does
+ "# foo."
+
+2002-09-10 12:49 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc: Bugs fixed in getting watch
+ command regression tests hammered out; eval now checks for tty,
+ listing watchpoints quotes expressions.
+
+2002-09-10 11:47 rockyb
+
+ * TODO: Cross a couple of things off the list.
+
+2002-09-10 11:02 rockyb
+
+ * bashdb-brk.inc: Test to see that line breaks are inside lines
+ Remove bug in not setting break condition correctly. Message if no
+ breakpoints have been set.
+
+2002-09-10 11:00 rockyb
+
+ * bashdb-cmds.inc: More crud in comments.
+
+2002-09-10 10:59 rockyb
+
+ * bashdb-cmds.inc: Removed some crud.
+
+2002-09-10 10:58 rockyb
+
+ * bashdb-cmds.inc: Rename to _bashdb_cmd_break to be consistent in
+ naming.
+
+2002-09-10 09:08 rockyb
+
+ * Makefile.am, configure.in: Add support to create/run regression
+ tests in tests directory.
+
+2002-09-09 22:50 rockyb
+
+ * bashdb-brk.inc, bashdb-cmds.inc: Enable/disable of watchpoints
+ done. delete, enable and disable will allow suffix "w" for
+ watchpoint.
+
+2002-09-09 20:55 rockyb
+
+ * bashdb-help.inc: Add help for set command. Minor text changes.
+
+2002-09-09 19:45 rockyb
+
+ * NEWS: Add case statement work.
+
+2002-09-09 19:09 rockyb
+
+ * TODO: Update as appropriate.
+
+2002-09-09 19:02 rockyb
+
+ * TODO: Update as appropriate.
+
+2002-09-09 12:39 rockyb
+
+ * Makefile.am, TODO, configure.in: Use Automake AM_LISPDIR rather
+ than trying to roll this code on my own (and failing). Thanks to
+ Masatake YAMATO!
+
+2002-09-09 12:37 rockyb
+
+ * NEWS: Add 0.22 features.
+
+2002-09-08 18:57 rockyb
+
+ * bashdb-set.inc: Set/show commands
+
+2002-09-07 14:41 rockyb
+
+ * bashdb-cmds.inc: Add frame command. Version command is now a
+ separate command.
+
+2002-09-07 14:35 rockyb
+
+ * bashdb-stack.inc: Get frame with args command hammered out
+ properly.
+
+2002-09-07 09:36 rockyb
+
+ * bashdb-io.inc: Some error correction and error message on list
+ command.
+
+2002-09-07 09:35 rockyb
+
+ * bashdb-cmds.inc: Ooops - forgot to allow set/show as valid
+ commands here. Move CVS Id to end.
+
+2002-09-07 09:09 rockyb
+
+ * Makefile.am, bashdb-cmds.inc, bashdb-fns.inc, bashdb-help.inc,
+ bashdb-init.inc, bashdb-io.inc, bashdb-main.inc: Start set/show
+ commands. List now takes up where it left off. Move some CVS id
+ lines to the end to facilitate debugging Some minor improvements.
+
+2002-09-06 03:06 rockyb
+
+ * bashdb-brk.inc, bashdb-help.inc, bashdb-main.inc: Minor formating
+ changes or typos.
+
+2002-09-06 01:56 rockyb
+
+ * Makefile.am: Include new guy bashdb-sig.inc.
+
+2002-09-05 22:39 rockyb
+
+ * bashdb-cmds.inc, bashdb-main.inc, bashdb-sig.inc: Add signal
+ handlers for interrupt and exit. Now we catch when the program
+ stopped and report that.
+
+2002-09-05 22:37 rockyb
+
+ * TODO: Update as appropriate.
+
+2002-09-05 10:54 rockyb
+
+ * bashdb-main.inc: Slightly better?
+
+2002-09-05 10:53 rockyb
+
+ * bashdb-main.inc: Test to see if we are using a debugger-enabled
+ bash, and give up if not.
+
+2002-09-05 08:56 rockyb
+
+ * bashdb-brk.inc: Add null line + if in break command.
+
+2002-09-04 22:24 rockyb
+
+ * TODO: Update.
+
+2002-09-04 22:08 rockyb
+
+ * bashdb, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-init.inc, bashdb-io.inc: Redo the way
+ breakpoints are handled. Is more like gdb than perltdb.
+
+ Now have enable/disable and breakpoint conditions.
+
+ Some other minor changes. Like testing to see if we have an
+ attached tty.
+
+2002-09-03 13:22 rockyb
+
+ * bashdb: Change option -s to -q as it is in gdb.
+
+2002-09-03 12:47 rockyb
+
+ * bashdb, bashdb-init.inc: Add more options - x: command file run,
+ n: no init file run, -V show version, and -s silient. All
+ compatible with GDB.
+
+2002-09-03 12:36 rockyb
+
+ * bashdb-help.inc: Minor change to refer to doc.
+
+2002-09-03 12:30 rockyb
+
+ * Makefile.am: Add newly-created file bashdb-io.inc
+
+2002-09-02 22:37 rocky
+
+ * TODO, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-init.inc, bashdb-io.inc, bashdb-main.inc,
+ bashdb-stack.inc: Major cleanup/expansion and a
+ bug/misunderstanding removed. Now reads in files once. Unset
+ breakpoint code no longer inlined. "info files" now works Stack
+ trace bug when via "info stack" fixed. bashdb-io.inc created.
+
+2002-09-02 15:29 rocky
+
+ * bashdb, bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc,
+ bashdb-help.inc, bashdb-init.inc: Add info command. In the process,
+ we now allow getting tty and args.
+
+2002-09-02 00:35 rocky
+
+ * TODO: Revise as appropriate.
+
+2002-09-02 00:28 rocky
+
+ * bashdb-help.inc: Update to reflect current situation.
+
+2002-09-02 00:16 rocky
+
+ * bashdb-cmds.inc, bashdb-help.inc, bashdb-stack.inc: Add bt
+ backtrace as an alias for where, or T. Add parameter to specify how
+ many frames to list on bt.
+
+2002-09-01 19:57 rocky
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-stack.inc: Mostly
+ formatting. Change basic indent from 4 to 2. Stack commands were
+ duplicated in bashdb-cmds.inc, and a file identifier incorrect in
+ bashdb-brk.inc
+
+2002-09-01 11:05 rocky
+
+ * bashdb-brk.inc, bashdb-cmds.inc, bashdb-fns.inc, bashdb-help.inc,
+ bashdb-main.inc: Minor: correct function comments at top of file.
+
+2002-09-01 11:05 rocky
+
+ * Makefile.am: Break into more smaller files.
+
+2002-09-01 11:04 rocky
+
+ * bashdb-stack.inc: Break away from bashdb-cmds.inc
+
+2002-09-01 10:41 rocky
+
+ * bashdb-brk.inc: Things with breakpoints are now in a separate
+ file.
+
+2002-09-01 10:40 rocky
+
+ * bashdb-help.inc: Things with breakpoints and watchpoints (and
+ later actions) are now their own separate file
+
+2002-09-01 10:39 rocky
+
+ * bashdb-help.inc: Help is now it's own separate file.
+
+2002-09-01 05:32 rocky
+
+ * bashdb-cmds.inc, bashdb-fns.inc: Change pe to x. On watch, set
+ initial value (and display it). Allow dump of variable. Add
+ internal function _is_var.
+
+2002-09-01 04:08 rocky
+
+ * bashdb-fns.inc: Separate watch variables from watch expressions
+
+2002-09-01 04:07 rocky
+
+ * bashdb-init.inc: Add array to note if watchpoint is arithmetic or
+ not.
+
+2002-09-01 04:06 rocky
+
+ * bashdb-cmds.inc: Separate out watch variable and watch
+ expressions.
+
+2002-09-01 02:47 rocky
+
+ * bashdb-init.inc: Set default next/step default value.
+
+2002-08-31 23:34 rocky
+
+ * bashdb-cmds.inc, bashdb-init.inc: Make more like gdb. Implement
+ aliases: run, shell. Add Init file startup ~.bashdbinit. Save args
+ on print and pe.
+
+2002-08-30 20:44 rocky
+
+ * CHANGES: Note watchpoints, and line number changes.
+
+2002-08-30 16:17 rocky
+
+ * bashdb-cmds.inc, bashdb-fns.inc: Small cleanups. Remove function
+ break code which doesn't work anyway.
+
+2002-08-30 12:46 rocky
+
+ * bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: Add
+ watchpoints. Help and commands now allow unique prefix, e.g. del
+ for delete.
+
+2002-08-30 12:20 rocky
+
+ * AUTHORS: Again.
+
+2002-08-30 12:18 rocky
+
+ * AUTHORS: More precies.
+
+2002-08-30 00:55 rocky
+
+ * TODO: Add watchpoints as requested by Bert Caridad.
+
+2002-08-27 20:56 rocky
+
+ * bashdb-cmds.inc: Fixed bug Inadvertently added by change \? to ?.
+ (Is now '?') to help emacs script editing.
+
+2002-08-27 20:52 rocky
+
+ * bashdb-cmds.inc: Doc continue enhancement.
+
+2002-08-27 20:51 rocky
+
+ * bashdb-cmds.inc, bashdb-fns.inc: clearing breakpoints now works
+ via a workaround.
+
+2002-08-27 20:48 rocky
+
+ * TODO: Update to reflect current situation.
+
+2002-08-26 23:53 rocky
+
+ * TODO: Did "up" and "down" - remove from list.
+
+2002-08-26 23:52 rocky
+
+ * bashdb.el: Add back in "up" and "down" which we have (but perldb
+ doesn't).
+
+2002-08-26 23:51 rocky
+
+ * bashdb, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: "Up
+ [count} and down {count] working. Stack trace is now more like gdb
+ than perl. Probably will move more in that direction, too.
+
+ Note: There may be some funniness in FUNCNAME BASH_SOURCE and
+ BASH_LINENO.
+
+2002-08-26 09:22 rocky
+
+ * bashdb, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: S !pat
+ now works. Some alphabetization of commands and more subroutings in
+ bashdb-cmds start _bashdb_cmd_. init Has where we are in stack for
+ getting ready to put in up and down.
+
+2002-08-26 09:20 rocky
+
+ * TODO: Update.
+
+2002-08-26 09:20 rocky
+
+ * NEWS: More features - note that we're useful even if you don't
+ use the debugger.
+
+2002-08-26 08:06 rocky
+
+ * bashdb-cmds.inc: This time, for sure!
+
+2002-08-26 08:05 rocky
+
+ * bashdb-cmds.inc: - now lists up to _curline Bug in restart for
+ bash --debugger
+
+2002-08-26 06:55 rocky
+
+ * bashdb: Minor changes.
+
+2002-08-26 05:45 rocky
+
+ * CHANGES, TODO: Fix off-by-one line number error in command
+ subtitutions $(), `` and {}.
+
+2002-08-25 23:10 rocky
+
+ * bashdb-cmds.inc: Help for individual commands.
+
+2002-08-25 23:09 rocky
+
+ * TODO: Added emacs lisp install. help on commands and fixed
+ substutution line numbers.
+
+2002-08-25 23:08 rocky
+
+ * .cvsignore, Makefile.am, configure.in: batch-compile and install
+ emacs lisp files. (First cut: no doubt there's room for
+ improvement.)
+
+2002-08-25 20:27 rocky
+
+ * bashdb-cmds.inc: A couple more.
+
+2002-08-25 20:17 rocky
+
+ * bashdb-cmds.inc: Add long-form of commands.
+
+2002-08-25 20:17 rocky
+
+ * bashdb: Replace a [ with [[
+
+2002-08-25 17:50 rocky
+
+ * CHANGES: Note line number change in command substitution.
+
+2002-08-25 12:13 rocky
+
+ * TODO: Another bug with subshells found.
+
+2002-08-25 09:58 rocky
+
+ * TODO, bashdb-cmds.inc: Fix restart in bash --debugger
+
+2002-08-25 02:18 rocky
+
+ * bashdb, bashdb-cmds.inc, bashdb-init.inc, bashdb-main.inc: Minor
+ variable name corrections and changes. Mostly to do with version
+ command. Typo in bashdb.
+
+2002-08-25 02:05 rocky
+
+ * AUTHORS, Makefile.am, PERMISSION, TODO, bashdb, bashdb-cmds.inc,
+ bashdb-fns.inc, bashdb-init.inc, bashdb-main.inc: Last minute
+ cleanups before initial Savannah CVS import.
+
+2002-08-24 18:13 rocky
+
+ * bashdb, bashdb-cmds.inc, bashdb-fns.inc: Mostly small extensions
+ to make this match perl5db: - Add Subroutine list (S) - Add list
+ functions (l func) - Add variable dump (V) - Note where we
+ haven't finished implementing parameters - Fix help
+
+ bashdb: rename functions to more system-like names (so won't appear
+ in function list)
+
+2002-08-24 18:08 rocky
+
+ * TODO, NEWS: Update as appropriate.
+
+2002-08-24 00:58 rocky
+
+ * TODO: Fixed "continue"
+
+2002-08-24 00:55 rocky
+
+ * bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc: Breakpoints now
+ work! setting, deleting, clearing all, listing.
+
+2002-08-23 14:15 rocky
+
+ * bashdb, bashdb-cmds.inc, bashdb-fns.inc: CVS cleanup: add CVS
+ lines
+
+2002-08-23 14:13 rocky
+
+ * bashdb-fns.inc: Command "Continue" ('c") now runs silently.
+
+2002-08-23 07:57 rocky
+
+ * TODO, bashdb, bashdb-fns.inc, bashdb-init.inc: Get dual execution
+ of "bashdb" and "bash --debugger" with respect to command-line
+ arguments. In bashdb however, $0 is bashdb not the program.
+
+2002-08-23 07:56 rocky
+
+ * bashdb.el: Remove looking for "--emacs" option in calling bashdb.
+ This is used in perldb but I don't know if we need it here. It
+ might get added later when we know what this is about and decide
+ it's necessary.
+
+2002-08-23 00:08 rocky
+
+ * bashdb, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc,
+ bashdb-main.inc, bashdb.el: Changes so that we can support "bash
+ --debugger"
+
+2002-08-22 23:29 rocky
+
+ * CHANGES, TODO: Update to reflect current state of things.
+
+2002-08-22 08:13 rocky
+
+ * bashdb: _cleanup -> _bashdb_cleanup
+
+2002-08-22 08:03 rocky
+
+ * bashdb: Bug: not handling -T correctly. Also add emacs mode.
+
+2002-08-22 07:58 rocky
+
+ * Makefile.am, bashdb-cmds.inc, bashdb-fns.inc, bashdb-init.inc,
+ bashdb-main.inc: Split bashdb-fns into multiple *.inc files
+
+2002-08-22 07:56 rocky
+
+ * .cvsignore: Yet more of the usual ignored files...
+
+2002-08-22 07:54 rocky
+
+ * .cvsignore: CVS: Useful file.
+
+2002-08-21 19:53 rocky
+
+ * CHANGES, bashdb, bashdb-main.inc: Now source the file to be
+ debugged rather than use that hacky temp file. x
+
+2002-08-20 12:10 rocky
+
+ * bashdb, bashdb-main.inc: Bogosity in assuming single-file script
+ removed. Now tracks source file correctly (in conjunction with
+ changes in bash)
+
+2002-08-20 12:08 rocky
+
+ * bashdb.el: [no log message]
+
+2002-08-20 12:07 rocky
+
+ * bashdb.el: Add GPL
+
+2002-08-20 12:05 rocky
+
+ * README: Add CVS id line
+
+2002-08-20 12:05 rocky
+
+ * README: No longer a modification but a rewrite. Note that bashdb
+ now requires my patches.
+
+2002-08-20 12:04 rocky
+
+ * AUTHORS, CHANGES, COPYING, ChangeLog, INSTALL, Makefile.am, NEWS,
+ TODO, configure.in: Automake'd and autoconf'd
+
+2002-08-20 11:34 rocky
+
+ * bashdb-main.inc: Add stack trace. Some typos corrected.
+
+2002-08-20 11:31 rocky
+
+ * bashdb-main.inc: Add GPL
+
+2000-04-03 08:54 rocky
+
+ * bashdb-main.inc: Typo. Cut over to version control id.
+
+2000-04-02 23:26 rocky
+
+ * MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc, bashdb.el:
+ Initial revision
+
+2000-04-02 23:26 rocky
+
+ * MANIFEST, PERMISSION, README, bashdb, bashdb-main.inc, bashdb.el:
+ Imported sources
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/INSTALL cvs/debugger/INSTALL
--- bash-2.05b/debugger/INSTALL 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/INSTALL 2002-09-17 13:56:07.000000000 +0200
@@ -0,0 +1,43 @@
+See also INSTALL in the top-level directory, that is the parent of
+this directory for general instructions on installing the
+debug-enabled version of bash. The instructions here cover only the
+debugger portion.
+
+First of all, the debugger needs a debugger-enabled version of Bash
+which contains things like the ability to step into functions
+automatically, give tracebacks, and list source-file information. The
+source code to the debugger-enabled version of bash is found in the
+parent directory of the directory that this file is located. (And if
+you have configured and compiled, the binary will be there too.)
+
+It is possible to try out the debugger without installing it by using
+the bashdb script that is in this directory. To do so you would invoke
+your script as follows assuming you are currently in the directory
+(debugger) that you originally found this file in.
+
+ ../bash -L . ./bashdb *script-to-be-debugged* *options-to-debugged-program*
+
+The only downside to this approach is that $0 in will be ``bashdb''
+(or more likely ``./bashdb'') rather than the name of the script to be
+debugged. If this is a problem, then you will have to install the
+debugger, or modify the script to be debugged to point to the
+debugger-enabled version of bash. For example if your script were in
+this directory (debugger) as well is your current working directory
+(as shown by ``pwd''), then having this at the beginning of your
+script:
+
+#!../bash --debugger
+
+might also work.
+
+For information on the differences between "bash --debugger" and
+bashdb, see Chapter 2 (Getting In and Out) of the bashdb documentation
+(bashdb.info, bashdb.html, or bashdb.texi)
+
+Before installing please do run "make check" to ensure that all of the
+debugger regression tests work.
+
+After compiling bash (``make'' in the parent directory of this one) and
+running the regression tests, as root run ``make install.'' That's it!
+
+$Id: INSTALL,v 1.2 2002/09/17 11:56:07 rockyb Exp $
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/Makefile.am cvs/debugger/Makefile.am
--- bash-2.05b/debugger/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/Makefile.am 2003-09-01 22:00:46.000000000 +0200
@@ -0,0 +1,48 @@
+# Copyright (C) 2002 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+#$Id: Makefile.am,v 1.35 2003/08/29 15:29:41 snikkt Exp $
+
+SUBDIRS = test doc emacs
+
+dist-hook: bash
+
+bash: $(top_builddir)/../bash$(EXTEXT)
+ cp $(top_builddir)../bash$(EXTEXT) bash$(EXTEXT)
+
+check-recursive: bash
+
+man:
+ @( cd $(top_builddir)/doc ; $(MAKE) $(MFLAGS) man )
+html:
+ @( cd $(top_builddir)/doc ; $(MAKE) $(MFLAGS) html )
+
+# Set up the install target
+bin_SCRIPTS = bashdb
+
+data_DATA =
+pkgdata_DATA = dbg-brk.inc dbg-help.inc dbg-cmds.inc \
+ dbg-fns.inc dbg-init.inc dbg-io.inc \
+ dbg-list.inc dbg-main.inc dbg-set.inc \
+ dbg-sig.inc dbg-stack.inc dbg-set-d-vars.inc \
+ dbg-hist.inc dbg-pre.inc \
+ dbg-file.inc
+
+EXTRA_DIST = dbg-pre.inc.in bashdb.in dbg-main.inc.in \
+ $(pkgdata_DATA) acinclude.m4 bash THANKS
+
+#;;; Local Variables: ***
+#;;; mode:makefile ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/NEWS cvs/debugger/NEWS
--- bash-2.05b/debugger/NEWS 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/NEWS 2003-09-08 08:40:24.000000000 +0200
@@ -0,0 +1,411 @@
+Version 0.43
+- Autostuff improvements
+- configurable package and executable names
+- Allow modification the philosophical parts the bashdb reference
+ manual to placate Matthias Klose and presumably Debian folks
+- Bug: a comment line in the history was taken as a timestamp and we
+ dumped core. Non-timestamp comment lines should appear in the history now.
+
+
+Version 0.42
+- Add bashdb manual page.
+- Changes to allow building outside of source tree.
+- Add Debian bash 2.05b patches provided by Matthias Klose.
+
+Version 0.41
+
+- The line number in multi-line assignments had been the line number where
+ the assignment ends, not the beginning. Thus assignments with
+ back-ticked subshells gave the wrong line number.
+- V (info variables) command working thanks to Mikael Andersson
+- Add "help show <command>" and "help info <command>"
+- More global variables start out _Dbg_ now (e.g. source_ -> _Dbg_source_)
+- Add long overdue THANKS
+
+Version 0.40
+
+- "make distcheck" from debugger directory works
+- bashdb doc moved under debugger directory
+- Make portability changes for cygwin and OS's that don't have wcwidth
+- Install public bash 2.05b patches 005-007
+- use diff -u if that's available on regression tests
+
+Version 0.39
+
+- history now is timestamped. Use environment variable HISTTIMEFORMAT
+ to customize using strftime specifiers.
+- tty detection made less more generic
++ The timestamp patch is was posted to bug-readline@gnu.org; there is no
+ response.
+
+
+Version 0.38
+- Was not finding source file if we did a cd in the debugged script
+ and the source file name was relative. Expand source file names.
+
+Version 0.37 (since 0.36):
+- As a result of the below ddd's break/clear icon/buttons should work:
+ * Add "set annotate".
+ * Make breakpoint output more like gdb's. make show output more like gdb's
+ * Canonicalize filenames on breakpoints, actions, lists.
+ * add gdb "show dir" and do lookup based on source name and $cdir:$cwd
+- _bashdb_ -> _Dbg_
+- Add ~ to filename translation characters
+
+Version 0.36 (since 0.35):
+- Bug: if IFS set character in filename: the filename would be truncated.
+ Handle IFS save/restore more pervasively by saving on DEBUG handler
+ entry.
+
+- Bug/Feature fix: Restart now quits all subshells before issuing its
+ restart (exec) command.
+
+- Mechanism for having variables set in a subshell persist in a parent
+ shell worked out. Some of the global debugger settings (like
+ listsize, history) use this.
+
+- debugger "print" command now uses double quote expansion rules.
+ (So print *** will expand filenames). We were having evaluation problems
+ in printing strings like "This won't work" (the single quote).
+
+- Bug: setting shell variables with double/single quotes other
+ meta characters now works.
+
+- Bug: caller() returned mismatched functions for line numbers/filenames.
+ Also now returns null string if no caller.
+
+- Add + to list of filename translation characters.
+
++ Patches for this version is posted to bash maintainer; word March 31st
+ 2003, that bash debugger patches have been integrated in a modified
+ form into "mainline bash code".
+
+Version 0.35 (since 0.34):
+- Bug: if IFS was not blank setting _bashdb_old_set_opts might fail.
+ Save and restore IFS before using "set"
+
+- Bug: (parse.y) line number was not updated properly when in a here
+ documented with an unquoted delimiter and containing backslash newline.
+
+- Bug, sort of: now set BASH_COMMAND to for head (for i in x y z ...)
+ in case head (case x in ), and in select head (select s in).
+
+- Feature: "restart" now saves debugger environment. Environment variable
+ BASHDB_RESTART give the state file to read.
+
+- Add environment variable BASHDB_INPUT to have a debugger command
+ file get read. This can be a space-separated list of files. Allow
+ -x many times in bashdb.
+
+- Patches: Install public bash 2.05b patches 001-004.
+
+- When reading large fileswhich takes a long time (e.g. "configure"
+ scripts), print out status every 1000 lines.
+
+Version 0.34 (since 0.33):
+- Bug: if no script we were running "set" to dump environment.
+
+- Bug: "H count" was broken due to typo.
+
+- We now keep track of the subshell level: dynamic variable
+ BASH_SUBSHELL and the debugger prints these as ()'s inside of the
+ prompt.
+
+- "quit" leaves nested subshells more properly. Now takes an optional
+ argument to specify how many subshells to leave.
+
+- Update gud.el (Masatake YAMATO), remove examples/bashdb/bashdb.el which may
+ cause confusion and set expectations for examples/bashdb (via README)
+
+Version 0.33 (since 0.32):
+- Regression tests work on FreeBSD, OSX (as well as Linux and Solaris)
+
+- Fix following bugs:
+
+ * exit handler was getting called each time we exited a subshell.
+
+ * "bash --debugger script args" was not setting args properly.
+
+ * (configure) remove --with-debugger-start which are for
+ packages. Is variable DEBUGGER_START_FILE now. Versions are more
+ automatically picked up from a central setting. (More could be done
+ though). Thanks to c_thomps@ecolinux.no-ip.com.
+
+ * not setting fntrace correctly on debugger exit.
+
+ * wrong line number on case selector statement. Was esac rather than case.
+
+ * was getting max line number for some files properly
+
+ * (makefile) man2html.o not removed on clean
+
+- Be able to handle EXIT like other signals (stop/nostop stack/nostack).
+
+- Add provision for finding out which command is going to be executed.
+ Useful on multi-statement lines, conditional tests, for-loop headers a
+ eval (since the statement might be first "eval $foo" and then
+ "echo this is my life."
+
+- Display command in debugger session we are on the same line/file and this
+ command changed.
+
+- Canonicalize filevars via a file-expand routine. Allows many ways to
+ refer to the same file.
+
+- Add option to have files show only short (basename) names, useful in testing
+
+- Add set/show of these (basename, debugging debugger).
+
+- Add -c option on bashdb. Analogous to "bash -c string"
+
+- correct releases automatically put in "bash -v" and debugger M commands.
+
+- Clean up signal handling code some. No longer need to pass LINENO.
+ Add routine to do some of the common entry/exit things.
+
+Version 0.32 (since 0.31):
+
+- Line number reporting improved.
+
+- Fix bug in using trap line numbers inside traps. BASH_LINENO had
+ been wrong for the parts inside of a trap.
+
+- Fix bug in case line numbers reporting line number of "esac" rather than case clause
+
+- Fix bug in "down" command
+
+- Bug in regression test run-all not picking up right shell sometimes.
+
+- Make command "x" (display variable) much more useful and smarter
+ and more like perl5db's "x" command: show variable attributes (via
+ declare -p) or function body (via declare -f) evaluates an expression if
+ those fail and if *that* fails do what good ol' "print" would do.
+
+- Add gdb's:
+ "condition" command.
+ "info break <n>".
+ "handle" command
+ "info signal"
+
+- Signal handling more like gdb.
+
+- bashdb patches for ddd
+
+- Change help be more like gdb to facilitate ddd support.
+
+- Improve bashdb.el and patches for gud.el
+
+- Missing "finish" help info.
+
+
+Version 0.31 (since 0.30):
+- Fix bug where stack trace current line entry was sometimes wrong.
+ No longer mangle line number in stack changing commands.
+
+- Implement gdb "finish" (some line number weirdnesses though.)
+
+- Don't clobber debugged script's INT or ERR trap signal if set, but
+ do change them inside the debugger.
+
+- All debugger functions now start _bashdb
+
+- Expand history commands: "H -n" and "! n" work like perl5db.
+
+- short command v (versions) changed to M to match perl5db.
+
+Version 0.30 (since 0.29):
+- Fix bugs in debugger output when debugged program redirects I/O
+
+- Fix bug in setting $# via the way we set $1, $2 and so on. We now
+ also handle an arbitrary number of parameters.
+
+- Fix/change history. Numbers now match prompt numbers. Can use !n, !-n as
+ well as hi [-]n. Also ![-]n:p instead of H n. Can limit the number
+ of history items listed on the H command.
+
+- Add GDB's "set args" command.
+
+- Add GDB's "set editing" command.
+
+- Add GDB's set/show prompt and allow for more flexible prompt customization.
+
+- Add GDB-like tty command and bashdb option -t for this.
+ Unlike GDB though, you can redirect debugger output to a file.
+
+- Minor tweaks to "help" and "show". "show subtopic" works.
+
+Version 0.29 (since 0.28):
+
+- Fix bug in "make uninstall"
+
+- $? is saved and preserved for use inside "eval", "print", "watch",
+ "display", "break" and "action" expressions.
+
+- Can also refer to $1, $2, ... in commands mentioned above.
+
+- debug-level nesting (the number of times we are nested in debugger)
+ is now shown in prompt via new exported variable BASHDB_LEVEL.
+
+- Implement "skip" command. (Don't run next command.) Integrate this into
+ "debug" command.
+
+- First cut at gdb-type "return" (premature return from function or
+ sourced program).
+
+- Document caller() builtin function and "debug" debugger command.
+
+- "Search" now works like gdb and perl5db. Fix a small bug in search
+ forward: was not resetting line to search location.
+
+Version 0.28 (since 0.27):
+
+- Can refer to parameters $1 $2, ... in "print", "eval" and breakpoint
+ conditions.
+
+- Parameters appear in call stack. To do this:
+
+- BASH_ARGC and BASH_ARGV arrays added. One is a stack of the count of
+ the parameters and the other a stack of the parameters.
+
+Version 0.27 (since 0.26):
+- Add forward and backward search.
+
+- Add Perl "a" and "A" (action) commands.
+
+- Add builtin caller().
+
+Version 0.26 (since 0.25):
+- Document "break" command.
+
+- Change "line" to "linespec" in online help where
+ appropriate.
+
+- Add commands "tbreak" (one-time break) and "display" (automatic display).
+
+- Add provision to debug into a script ("debug" command), and leave
+ script without going back into debugger command loop
+ (BASHDB_QUIT_ON_QUIT environment variable).
+
+- Document command "tbreak", "enable" and "disable" in manual.
+
+Version 0.25 (since 0.24):
+
+- Fix core dump on error (when no source file).
+
+- Fix bug where "watche x > 24" was creating output to file 24.
+
+- "restart" now picks up full bash name from BASH environment variable.
+
+- bash --debugger -c "..." now works.
+
+ To accomplish the above, environment variable BASH_EXECUTION_STRING
+ was added which contains the contents what was passed after -c.
+
+- Command files now nest and pick up where they left off in between
+ script execution.
+
+- save "set" parameters on debugger entry and restore them. Inside the
+ debugger: set +xv.
+
+- add ARG array for $1, $2 and so on. "info args" now shows these.
+
+- Revise and update doc for above and (hopefully) better overall
+ organization.
+
+- Better installation instructions.
+ Revise bash's top-level README and INSTALL's (debugger and top
+ level) to note debugger changes.
+
+Version 0.24 (since 0.23):
+
+- Line numbers of initial "for var in..." and "select" listed or stopped.
+ Error messages on those lines should print correctly.
+
+- Rename debugger variables so as not to conflict with possible user
+ variables (such as "i").
+
+- Don't allow stepping into debugger on program exit.
+ loop on command loop in "exit" handler.
+
+- Function names now supported. breakpoints can be set on them. "list" now
+ allows a function name.
+
+ To add function name support, the semantics of "declare -F" have
+ changed: the source file and line number is now added in the output.
+
+ However in non-interactive mode, the line number is wrong. It is the
+ caller line.
+
+- These commands have been extended to include linespecs
+ "continue", "break" (tbreak), "list".
+
+
+Version 0.23 (since 0.22):
+
+- More work on breakpoints and watchpoints, error checking
+ * Allow breaking on file:line.
+ * Give counts on number of times hit
+ * Allow enabling/disabling/clearing watchpoints via "w" suffix
+- fix bugs
+ handling break/watch conditions
+ eval without a tty
+ "-" command size wrong
+ #comment handling
+ make cmd_loop read safe from tampering with IFS
+- More texinfo manual revisions
+- Separate debugger tests from bash tests
+
+Version 0.22 (since initial release):
+
+- More complete texinfo manual
+- Automake improvements to install Emacs lisp (Masatake YAMATO)
+- Set/show started
+- List with no arguments works like gdb and Perl's debugger
+ list regression test added
+- Add frame command
+- Add signal handler for exit so we don't exit debugger when exiting program
+- case statements now indicate line number of "case WORD".
+
+Initial release -
+
+Initial release of something that's worthy of being called a debugger!
+
+In contrast to earlier ksh/bash debuggers, this release has:
+
+Line numbers and source text are reported correctly
+ - through loops
+ - through conditionals
+ - inside functions
+ - inside sourced files
+
+A change in source file is now tracked - we don't assume one script
+file nor do we create a fake script file with a funny name and run
+that.
+
+Emacs support via GUD (grand-unified debugger)
+
+Step/next (to step inside a function or ignore it) now work
+ - even works on "source"
+
+Call stack display.
+ - Since "source" is a builtin function that shows up in the call stack
+ - function names, filenames and line numbers appear in call stack
+
+Command arguments to debugged routine are left intact (if using bash
+--debugger). In particular $0 is the program name.
+
+Debugging interface similar (and largely a subset of) Perl's debugger
+interface with gdb long mnemonics. (Well, okay: where - but perhaps
+more in the future like "up" and "down").
+
+Even without using *our* debugging script, there are changes to bash
+that make other debugging (or writing other debuggers) more
+amenable. In particular, line numbers of command substitution ``,
+$(), and {}, now gives the absolute line number in the file rather
+than relative to the beginning of the substitution. (So error
+reporting you generally see that an unhelpful message that error
+occurred on line 1.) Also support for call stacks with source files
+and line numbers can be helpful for stand-alone debugging and error
+reporting
+
+$Id: NEWS,v 1.86 2003/09/03 07:54:02 rockyb Exp $
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/README cvs/debugger/README
--- bash-2.05b/debugger/README 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/README 2002-08-20 18:05:49.000000000 +0200
@@ -0,0 +1,16 @@
+This is a rewrite of the Korn Shell debugger from Bill Rosenblatt's
+`Learning the Korn Shell', published by O'Reilly and Associates (ISBN
+1-56592-054-6). Michael Loukides and Cigy Cyriac made some additional
+changes.
+
+The original `kshdb' is available for anonymous FTP with the URL
+
+ftp://ftp.uu.net/published/oreilly/nutshell/ksh/ksh.tar.Z
+
+However this code now depends on a number of debugging support
+features that are neither part of the POSIX standard and are probably
+not in many POSIX-like shells.
+
+R. Bernstein (rocky@panix.com)
+
+$Id: README,v 1.3 2002/08/20 16:05:49 rocky Exp $
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/THANKS cvs/debugger/THANKS
--- bash-2.05b/debugger/THANKS 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/THANKS 2003-08-11 10:06:34.000000000 +0200
@@ -0,0 +1,6 @@
+The following kind people have contributed to this debugger.
+
+Masatake YAMATO <jet@gyve.org> - Emacs support, screenshots
+Mikael Andersson <snikkt@telia.com> - "V" command
+Matthias Klose <doko@cs.tu-berlin.de> - making build system and package
+ more industrial strength.
\ No newline at end of file
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/TODO cvs/debugger/TODO
--- bash-2.05b/debugger/TODO 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/TODO 2003-08-11 10:06:34.000000000 +0200
@@ -0,0 +1,63 @@
+For Debian release:
+- bashdb manual page
+- GFDL or GPL for documentation?
+- install lib in /usr/share. Have bashdb fallback to
+ "@DEBUGGER_START_FILE@"? if no -L and no ../lib?
+
+BUGS
+
+- source can have parameters but that doesn't appear in ARGC, ARGV.
+ RETURN trap should signal when leaving source'd file.
+
+- Stack trace on rare occasions can get the wrong line number.
+
+- Interrupts to program sometimes are delayed. Seems like a bash thing. Why?
+
+- Darwin compilation problem in siglist
+
+- Check that all global variables are changed via "journal"
+
+-------------------------------------
+
+NECESSARY TO DO:
+
+ - Documentation:
+ update sample session ?
+ Info for calling from inside script. Developer's handbook?
+
+FEATURES TO ADD:
+
+ 0. bash should maintain a list of line numbers that one can
+ set breaks on.
+
+ 1. perl5db actions
+
+ *2. debugger to catch error handling. (Does this need bash?)
+ Might be able to somehow cascade onto existing Error routine.
+ Same might be done with SIGDEBUG.
+
+ 3. gdb signal mechanism - it's partly there
+
+ 4. "finish" or "return" where frame has been changed from top.
+
+ Gdb commands that could be added:
+ backtrace -n
+ set history filename
+ set history name
+ set history size
+ ignore
+
+
+FUTURE:
+
+ *More support in bash: list of valid line numbers
+ *Rewrite so debugger lives outside of process
+ - will not be subject to subshell environment discards.
+ - will have its own global state, but it needs to have access to debugger
+ environment
+ - will support remote debugging
+
+
+*=Things that bash might help out with.
+-------------------------------------
+$Id: TODO,v 1.49 2003/08/10 23:58:40 rockyb Exp $
\ No newline at end of file
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/acinclude.m4 cvs/debugger/acinclude.m4
--- bash-2.05b/debugger/acinclude.m4 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/acinclude.m4 2003-08-28 04:47:10.000000000 +0200
@@ -0,0 +1,30 @@
+AC_DEFUN([AC_BASHDB_PACKAGE], [
+dnl Allow choosing the package name to avoid clashes with
+dnl bash if beeing installed side-by-side
+AC_ARG_VAR(
+ ALT_PACKAGE_NAME,
+ AC_HELP_STRING([],[alternate packagename to use (default is "$1")])
+)
+if test -z "${ALT_PACKAGE_NAME}"; then
+ ALT_PACKAGE_NAME="$PACKAGE_NAME"
+fi
+
+dnl define PACKAGE and VERSION.
+PACKAGE=$ALT_PACKAGE_NAME
+VERSION=$PACKAGE_VERSION
+AC_DEFINE_UNQUOTED(PACKAGE,$PACKAGE)
+AC_DEFINE_UNQUOTED(VERSION,$VERSION)
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+])
+
+
+AC_DEFUN([AC_SUBST_DIR], [
+ ifelse($2,,,$1="$2")
+ $1=`(
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ eval echo \""[$]$1"\"
+ )`
+ AC_SUBST($1)
+])
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/bashdb.in cvs/debugger/bashdb.in
--- bash-2.05b/debugger/bashdb.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/bashdb.in 2003-08-30 07:31:04.000000000 +0200
@@ -0,0 +1,165 @@
+#!@INTERPRETER_NAME@
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+#
+# Alternate way to invoke debugger. bash --debugger however is preferred.
+
+typeset _Dbg_ver=\
+'$Id: bashdb.in,v 1.4 2003/08/25 16:34:35 snikkt Exp $'
+
+declare -a _Dbg_script_args="$@"
+
+# Equivalent to basename $0; the short program name
+typeset _Dbg_pname=${0##*/}
+
+# Show basename only in location listing. This is needed in regression tests
+typeset -i _Dbg_basename_only=${BASHDB_BASENAME_ONLY:-0}
+
+typeset _Dbg_main=dbg-main.inc
+typeset _Dbg_libdir=@PKGDATADIR@
+typeset _Dbg_bindir=$(dirname $0)
+typeset _Dbg_tmpdir=/tmp
+
+typeset _Dbg_cmd='' # If command string given on command line, this is it.
+
+
+_Dbg_usage() {
+ printf "_Dbg_usage:
+ ${_Dbg_pname} [OPTIONS] <script_file>
+
+Runs script_file under a (primitive) debugger.
+
+options:
+ -B basename only on source listings. (Needed in regression tests)
+ -h print this help
+ -n Don't run initialization files
+ -c command Run this passed command of a script
+ -q Quiet. Do not print introductory and quiet messages.
+ -x cmdfile execute commands from cmdfile
+ -L libdir set directory location of library helper file: $_Dbg_main
+ the default directory is: $_Dbg_libdir
+ -T tmpdir set directory location for temporary files: $_Dbg_tmpdir
+ -t tty set debuger terminal
+ -V show version number and no-warranty and exit.
+" 1>&2
+}
+
+# What to set for location of helper routines?
+if [[ ! -e $_Dbg_libdir/$_Dbg_main ]] ; then
+ # Use bindir/../share as fallback
+ _Dbg_libdir=
+ if [[ -d $_Dbg_bindir/../share/bashdb ]] ; then
+ _Dbg_libdir=$_Dbg_bindir/../share/bashdb
+ fi
+fi
+
+while getopts BhnqVc:t:x:L:T: opt; do
+ case $opt in
+ B) _Dbg_basename_only=1 ;;
+ c) _Dbg_cmd="$OPTARG" ;;
+ h) _Dbg_usage; exit 100 ;;
+ n) _Dbg_no_init=1 ;;
+ q) _Dbg_quiet=1 ;;
+ x) BASHDB_INPUT="$BASHDB_INPUT $OPTARG" ;;
+ L) _Dbg_libdir=$OPTARG ;;
+ T) _Dbg_tmpdir=$OPTARG ;;
+ t)
+ if ! $(touch $OPTARG >/dev/null 2>/dev/null); then
+ echo "${_Dbg_pname}: Can't access $OPTARG for writing."
+ elif [[ ! -w $OPTARG ]] ; then
+ echo "${_Dbg_pname}: terminal $OPTARG needs to be writable."
+ else
+ _Dbg_tty=$OPTARG
+ fi
+ ;;
+ V) show_version=1 ;;
+ *) _Dbg_usage; exit 2 ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+[[ $# == 0 && -z $show_version && -z $_Dbg_cmd ]] && {
+ echo "${_Dbg_pname}: Need to give a script name to debug."
+ exit 1
+}
+
+if [[ ! -d $_Dbg_libdir ]] && [[ ! -d $_Dbg_libdir ]] ; then
+ echo "${_Dbg_pname}: cannot read $_Dbg_libdir. " \
+ "Perhaps bashdb is installed wrong." >&2
+ echo "${_Dbg_pname}: or try using -L (with a different directory)." >&2
+ exit 1
+fi
+
+_source_file=$1
+shift
+
+if [[ ! -d $_Dbg_tmpdir ]] && [[ ! -w $_Dbg_tmpdir ]] ; then
+ echo "${_Dbg_pname}: cannot write to temp directory $_Dbg_tmpdir." >&2
+ echo "${_Dbg_pname}: Use -T try directory location." >&2
+ exit 1
+fi
+
+[[ -r $_Dbg_libdir/$_Dbg_main ]] || {
+ echo "${_Dbg_pname}: cannot read debugger file $_Dbg_libdir/$_Dbg_main." >&2
+ echo "${_Dbg_pname}: Perhaps bashdb is installed incorrectly." >&2
+ exit 1
+}
+
+# Note that this is called via bashdb rather than "bash --debugger"
+_Dbg_script=1
+
+. ${_Dbg_libdir}/dbg-pre.inc
+
+if [[ -z $_Dbg_quiet ]] ; then
+ echo "Bourne-Again Shell Debugger, release $_Dbg_release"
+ cat <<EOF
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+EOF
+fi
+
+if (( show_version == 1 )) ; then
+cat <<EOF
+There is absolutely no warranty for BASHDB. Type "show warranty" for details.
+EOF
+ exit 1
+fi
+
+if [[ ! -r "$_source_file" ]] && [[ -z $_Dbg_cmd ]] ; then
+ echo "${_Dbg_pname}: cannot read program to debug: $_source_file." >&2
+ exit 1
+else
+ typeset -r _Dbg_source_file=$(_Dbg_expand_filename $_source_file)
+fi
+
+. $_Dbg_libdir/dbg-main.inc
+set -o fntrace
+if [[ -z $_Dbg_cmd ]] ; then
+ . $_source_file
+else
+ eval $_Dbg_cmd
+fi
+
+
+# end of bashdb
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/configure.ac cvs/debugger/configure.ac
--- bash-2.05b/debugger/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/configure.ac 2003-09-01 22:00:47.000000000 +0200
@@ -0,0 +1,130 @@
+dnl
+dnl Configure script for bash-2.05 debugger
+dnl
+dnl report bugs to rocky@panix.com
+dnl
+dnl Process this file with autoconf to produce a configure script.
+
+# Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+dnl TENTATIVE:
+dnl Use same version as in main bash configure.in
+define(bashvers, 2.05b)
+define(relstatus, 0.43)
+
+AC_INIT([bash],[bashvers-debugger-relstatus],[rocky@panix.com])
+
+AM_PATH_LISPDIR
+
+dnl make sure we are using a recent autoconf version
+AC_PREREQ(2.53)
+
+AC_ARG_PROGRAM
+AM_INIT_AUTOMAKE([no-define])
+
+AC_BASHDB_PACKAGE([bashdb])
+
+# Brought over from bash/configure.in to substitute BASHVERS
+# and RELSTATUS in dbg-pre.inc.in and version.texi
+BASHVERS=bashvers
+RELSTATUS=relstatus
+AC_SUBST(BASHVERS)
+AC_SUBST(RELSTATUS)
+
+
+AC_CONFIG_SRCDIR(bashdb.in)
+if test x$ac_srcdir = x ; then
+ ac_srcdir=.
+fi
+
+AC_PATH_PROG(EMACS, emacs, no)
+if test x$EMACS = xno ; then
+ emacs_lisp=no
+fi
+
+# Create a suitable transform ( without the $ -> $$ escaping added
+# because of $program_transform_name being used in a Makefile
+# This transform is needed because bashbd must be executed by the
+# bashdb-bash regardless if a program transform has taken place
+ac_transform=`echo "$program_transform_name" | sed 's/\\$\\$/\\$/g'`
+
+# Fully expanded name of bash executable to be substituted into
+# bashdb.This allow us to move this package into any suitable location
+# by using --prefix as an option to configure.
+AC_SUBST_DIR(INTERPRETER_NAME,"${bindir}/"`echo bash | sed "$ac_transform"`)
+
+# Fully expanded namn of pkgdatadir. This is where arch independent files
+# should be placed according to FHS. Used in bashdb.in and dbg-main.inc.in
+AC_SUBST_DIR(PKGDATADIR,"${datadir}/${PACKAGE}")
+
+
+
+dnl We use a diff in regression testing
+AC_PATH_PROG(DIFF, diff, no)
+DIFF_OPTS=
+
+if test "$DIFF" = no ; then
+ AC_PATH_PROG(DIFF, cmp, no)
+else
+ dnl Try for GNU diff options.
+ # MSDOG output uses \r\n rather than \n in tests
+ for diff_opt in -w --unified ; do
+ if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then
+ AC_MSG_RESULT([adding $diff_opt to diff in regression tests])
+ DIFF_OPTS="$DIFF_OPTS $diff_opt"
+ fi
+ done
+fi
+AC_SUBST(DIFF)
+AC_SUBST(DIFF_OPTS)
+
+AM_CONDITIONAL(INSTALL_EMACS_LISP, test "x$lispdir" != "x")
+
+#Makefiles
+AC_CONFIG_FILES([Makefile \
+ doc/Makefile \
+ emacs/Makefile \
+ test/Makefile])
+
+# Additional files needing substitution of values (not Makefiles).
+AC_CONFIG_FILES([bashdb \
+ dbg-pre.inc \
+ dbg-main.inc \
+ test/check_common ],[chmod +x bashdb])
+
+
+# We don't want TeX do be a requirement for compilation.
+if ! test -e $ac_srcdir/doc/version.texi ;then
+ AC_CONFIG_FILES([ doc/version.texi ])
+fi
+
+AC_CONFIG_COMMANDS([default],[[
+# Keep old dates on these files to prevent rebuilding.
+touch -cr $ac_srcdir/configure.ac doc/bashdb.1
+touch -cr $ac_srcdir/configure.ac doc/bashdb-man.html
+if test -e $ac_srcdir/doc/version.texi ;then
+ echo timestamp > $ac_srcdir/doc/stamp-vti
+ touch -cr $ac_srcdir/configure.ac $ac_srcdir/doc/version.texi \
+ $ac_srcdir/doc/stamp-vti \
+ $ac_srcdir/doc/bashdb.info*
+
+fi
+]],[[]])
+
+AC_OUTPUT
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-brk.inc cvs/debugger/dbg-brk.inc
--- bash-2.05b/debugger/dbg-brk.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-brk.inc 2003-03-31 17:09:19.000000000 +0200
@@ -0,0 +1,1018 @@
+# dbg-brk.inc - Bourne Again Shell Debugger Break/Watch/Action routines
+
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+#================ VARIABLE INITIALIZATIONS ====================#
+
+declare -r _Dbg_brk_ver=\
+'$Id: dbg-brk.inc,v 1.11 2003/03/31 15:09:19 rockyb Exp $'
+
+typeset -ar _Dbg_yn=("n" "y")
+typeset -ar _Dbg_keep=('keep' 'del')
+
+# action data structures
+typeset -ai _Dbg_action_line=() # Line number of breakpoint
+typeset -a _Dbg_action_file=() # filename of breakpoint
+typeset -ai _Dbg_action_enable=() # 1/0 if enabled or not
+typeset -a _Dbg_action_stmt=() # Statement to eval when line is hit.
+typeset -i _Dbg_action_max=0 # Needed because we can't figure
+ # out what the max index is and arrays
+ # can be sparse
+
+# Note: we loop over possibly sparse arrays with _brkpt_max by adding one
+# and testing for an entry. Could add yet another array to list only
+# used indices. Bash is kind of primitive.
+
+# Breakpoint data structures
+typeset -ai _brkpt_line=() # Line number of breakpoint
+typeset -a _brkpt_file=() # filename of breakpoint
+typeset -a _brkpt_enable=() # 1/0 if enabled or not
+typeset -ai _brkpt_count=() # Number of times hit
+typeset -ai _brkpt_onetime=() # Is this a onetime break?
+typeset -a _brkpt_cond=() # Condition to eval true in order to stop.
+typeset -i _brkpt_max=0 # Needed because we can't figure out what
+ # the max index is and arrays can be sparse
+# Note: we loop over possibly sparse arrays with _brkpt_max by adding one
+# and testing for an entry. Could add yet another array to list only
+# used indices. Bash is kind of primitive.
+
+# Watchpoint data structures
+typeset -a _Dbg_watch_exp=() # Watchpoint expressions
+typeset -a _Dbg_watch_val=() # values of watchpoint expressions
+typeset -ai _Dbg_watch_arith=() # 1 if arithmetic expression or not.
+typeset -ai _Dbg_watch_count=() # Number of times hit
+typeset -ai _Dbg_watch_enable=() # 1/0 if enabled or not
+typeset -i _Dbg_watch_max=0 # Needed because we can't figure out what
+ # the max index is and arrays can be sparse
+
+typeset -r _watch_pat="${int_pat}[wW]"
+
+# Display data structures
+typeset -a _Dbg_disp_exp=() # Watchpoint expressions
+typeset -ai _Dbg_disp_enable=() # 1/0 if enabled or not
+typeset -i _Dbg_disp_max=0 # Needed because we can't figure out what
+ # the max index is and arrays can be sparse
+
+
+#========================= FUNCTIONS ============================#
+
+_Dbg_save_breakpoints() {
+ local file
+ for file in ${_Dbg_filenames[@]} ; do
+ local filevar="`_Dbg_file2var $file`"
+ declare -p _brkpt_$filevar >> $_Dbg_statefile 2>/dev/null
+ done
+ declare -p _brkpt_line >> $_Dbg_statefile
+ declare -p _brkpt_file >> $_Dbg_statefile
+ declare -p _brkpt_cond >> $_Dbg_statefile
+ declare -p _brkpt_count >> $_Dbg_statefile
+ declare -p _brkpt_enable >> $_Dbg_statefile
+ declare -p _brkpt_onetime >> $_Dbg_statefile
+ declare -p _brkpt_max >> $_Dbg_statefile
+
+}
+
+_Dbg_save_actions() {
+ for file in ${_Dbg_filenames[@]} ; do
+ local filevar="`_Dbg_file2var $file`"
+ declare -p _Dbg_action_$filevar >> $_Dbg_statefile 2>/dev/null
+ done
+ declare -p _Dbg_action_line >> $_Dbg_statefile
+ declare -p _Dbg_action_file >> $_Dbg_statefile
+ declare -p _Dbg_action_enable >> $_Dbg_statefile
+ declare -p _Dbg_action_stmt >> $_Dbg_statefile
+ declare -p _Dbg_action_max >> $_Dbg_statefile
+}
+
+_Dbg_save_watchpoints() {
+ declare -p _Dbg_watch_exp >> $_Dbg_statefile
+ declare -p _Dbg_watch_val >> $_Dbg_statefile
+ declare -p _Dbg_watch_arith >> $_Dbg_statefile
+ declare -p _Dbg_watch_count >> $_Dbg_statefile
+ declare -p _Dbg_watch_enable >> $_Dbg_statefile
+ declare -p _Dbg_watch_max >> $_Dbg_statefile
+}
+
+_Dbg_save_display() {
+ declare -p _Dbg_disp_exp >> $_Dbg_statefile
+ declare -p _Dbg_disp_enable >> $_Dbg_statefile
+ declare -p _Dbg_disp_max >> $_Dbg_statefile
+}
+
+# Start out with general break/watchpoint functions first...
+
+# Routine to a delete breakpoint/watchpoint by entry numbers.
+_Dbg_cmd_delete() {
+ local -r to_go=$@
+ local -i i
+ local -i found=0
+
+ # set -xv
+ eval "$_seteglob"
+ for del in $to_go ; do
+ case $del in
+ $_watch_pat )
+ _Dbg_delete_watch_entry ${del:0:${#del}-1}
+ ;;
+ $int_pat )
+ _Dbg_delete_brkpt_entry $del
+ ((found += $?))
+ ;;
+ * )
+ _Dbg_msg "Invalid entry number skipped: $del"
+ esac
+ done
+ eval "$_resteglob"
+ [[ $found != 0 ]] && _Dbg_msg "Removed $found breakpoint(s)."
+ return $found
+ # set +xv
+}
+
+# Enable/disable breakpoint or watchpoint by entry numbers.
+_Dbg_enable_disable() {
+ if [ -z "$1" ] ; then
+ _Dbg_msg "Expecting a list of breakpoint/watchpoint numbers. Got none."
+ return 1
+ fi
+ local -i on=$1
+ local en_dis=$2
+ shift; shift
+
+ if [[ $1 = 'display' ]] ; then
+ shift
+ local to_go="$@"
+ local i
+ eval "$_seteglob"
+ for i in $to_go ; do
+ case $i in
+ $int_pat )
+ _Dbg_enable_disable_display $on $en_dis $i
+ ;;
+ * )
+ _Dbg_msg "Invalid entry number skipped: $i"
+ esac
+ done
+ eval "$_resteglob"
+ return 0
+ elif [[ $1 = 'action' ]] ; then
+ shift
+ local to_go="$@"
+ local i
+ eval "$_seteglob"
+ for i in $to_go ; do
+ case $i in
+ $int_pat )
+ _Dbg_enable_disable_action $on $en_dis $i
+ ;;
+ * )
+ _Dbg_msg "Invalid entry number skipped: $i"
+ esac
+ done
+ eval "$_resteglob"
+ return 0
+ fi
+
+ local to_go="$@"
+ local i
+ eval "$_seteglob"
+ for i in $to_go ; do
+ case $i in
+ $_watch_pat )
+ _Dbg_enable_disable_watch $on $en_dis ${del:0:${#del}-1}
+ ;;
+ $int_pat )
+ _Dbg_enable_disable_brkpt $on $en_dis $i
+ ;;
+ * )
+ _Dbg_msg "Invalid entry number skipped: $i"
+ esac
+ done
+ eval "$_resteglob"
+ return 0
+}
+
+_Dbg_cmd_continue() {
+ # set -xv
+ local -r first_arg=$1
+
+ [[ -z "$1" ]] && return 0
+ local -ar word=($(_Dbg_parse_linespec "$first_arg"))
+ if [[ ${#word[@]} == 0 ]] ; then
+ _Dbg_msg "Invalid linespec: $first_arg"
+ return 1
+ fi
+ local filename=${word[1]}
+ local line_number=${word[0]}
+ local full_filename=`_Dbg_is_file $filename`
+ if [[ -n $full_filename ]] ; then
+ if (( $line_number == 0 )) ; then
+ _Dbg_msg "There is no line 0 to continue at."
+ else
+ _Dbg_check_line $line_number "$full_filename"
+ (( $? == 0 )) && \
+ _Dbg_set_brkpt "$full_filename" "$line_number" 1 1
+ return 0
+ fi
+ else
+ _Dbg_msg "File $filename not found in read-in files."
+ _Dbg_msg "See 'info files' for a list of known files."
+ fi
+ return 1
+}
+
+# Enable breakpoint(s)/watchpoint(s) by entry number(s).
+_Dbg_cmd_enable() {
+ _Dbg_enable_disable 1 "enabled" $@
+}
+
+# Disable breakpoint(s)/watchpoint(s) by entry number(s).
+_Dbg_cmd_disable() {
+ _Dbg_enable_disable 0 "disabled" $@
+}
+
+_Dbg_print_brkpt_count() {
+ local -ir i=$1
+ if (( _brkpt_count[$i] != 0 )) ; then
+ if (( _brkpt_count[$i] == 1 )) ; then
+ _Dbg_printf "\tbreakpoint already hit 1 time"
+ else
+ _Dbg_printf "\tbreakpoint already hit %d times" ${_brkpt_count[$i]}
+ fi
+ fi
+}
+
+#======================== BREAKPOINTS ============================#
+
+# Add breakpoint(s) at given line number of the current file. $1 is
+# the line number or _curline if omitted. $2 is a condition to test
+# for whether to stop.
+
+_Dbg_cmd_break() {
+
+ local -i is_temp=$1;
+ shift
+
+ local n=${1:-$_curline}
+ shift
+
+ if [[ "$n" == 'if' ]]; then
+ n=$_curline
+ else
+ [[ "$1" == 'if' ]] && shift
+ fi
+ local condition;
+ if [ -z "$1" ] ; then
+ condition=1
+ else
+ condition="$*"
+ fi
+
+ local -ar word=($(_Dbg_parse_linespec "$n"))
+ if [[ ${#word[@]} == 0 ]] ; then
+ _Dbg_msg "Invalid linespec $n"
+ return
+ fi
+
+ local filename=${word[1]}
+ local line_number=${word[0]}
+ local full_filename=`_Dbg_is_file $filename`
+ if [[ -n $full_filename ]] ; then
+ if (( $line_number == 0 )) ; then
+ _Dbg_msg "There is no line 0 to break at."
+ else
+ _Dbg_check_line $line_number "$full_filename"
+ (( $? == 0 )) && \
+ _Dbg_set_brkpt "$full_filename" "$line_number" $is_temp "$condition"
+ fi
+ else
+ filename=$(_Dbg_adjust_filename "$filename")
+ _Dbg_msg "File $filename not found in read-in files."
+ _Dbg_msg "See 'info files' for a list of known files."
+ fi
+}
+
+# Set a condition for a given breakpoint $1 is a breakpoint number
+# $2 is a condition. If not given, set "unconditional" or 1.
+# returns 0 if success or 1 if fail.
+_Dbg_cmd_condition() {
+ # set -x
+ local -r n=$1
+ shift
+ local condition="$@"
+ # set -xv
+
+ if [[ -z $n ]]; then
+ _Dbg_msg "Argument required (breakpoint number)."
+ return 1
+ fi
+
+ eval "$_seteglob"
+ if [[ $n != $int_pat ]]; then
+ eval "$_resteglob"
+ _Dbg_msg "Bad breakpoint number: $n"
+ return 1
+ fi
+ eval "$_resteglob"
+
+ if [[ -z ${_brkpt_file[$n]} ]] ; then
+ _Dbg_msg "Breakpoint entry $n is not set. Condition not changed."
+ return 1
+ fi
+
+ if [[ -z $condition ]] ; then
+ condition=1
+ _Dbg_msg "Breakpoint $n now unconditional."
+ fi
+ _brkpt_cond[$n]="$condition"
+ return 0
+}
+
+# delete brkpt(s) at given file:line numbers. If no file is given
+# use the current file.
+_Dbg_cmd_clear_brkpt() {
+ # set -x
+ local -r n=${1:-$_curline}
+
+ local -ar word=($(_Dbg_parse_linespec "$n"))
+ if [[ ${#word[@]} == 0 ]] ; then
+ _Dbg_msg "Invalid linespec $n"
+ return
+ fi
+
+ local filename=${word[1]}
+ local line_number=${word[0]}
+ local full_filename=`_Dbg_is_file $filename`
+ if [[ -n $full_filename ]] ; then
+ if (( $line_number == 0 )) ; then
+ _Dbg_msg "There is no line 0 to clear."
+ else
+ _Dbg_check_line $line_number "$full_filename"
+ if (( $? == 0 )) ; then
+ _Dbg_unset_brkpt "$full_filename" "$line_number"
+ local -r found=$?
+ if [[ $found != 0 ]] ; then
+ _Dbg_msg "Removed $found breakpoint(s)."
+ else
+ _Dbg_msg "Didn't find any breakpoints to remove at $n."
+ fi
+ fi
+ fi
+ else
+ filename=$(_Dbg_adjust_filename "$filename")
+ _Dbg_msg "File $filename not found in read-in files."
+ _Dbg_msg "See 'info files' for a list of known files."
+ fi
+}
+
+# list breakpoints and break condition.
+# If $1 is given just list those associated for that line.
+_Dbg_cmd_list_brkpt() {
+
+ eval "$_seteglob"
+ if [[ -n $1 ]] ; then
+ if [[ $1 != $int_pat ]]; then
+ _Dbg_msg "Bad breakpoint number $1."
+ elif [[ -z ${_brkpt_file[$1]} ]] ; then
+ _Dbg_msg "Breakpoint entry $1 is not set."
+ else
+ local -r -i i=$1
+ local source_file=${_brkpt_file[$i]}
+ source_file=$(_Dbg_adjust_filename "$source_file")
+ _Dbg_msg "Num Type Disp Enb What"
+ _Dbg_printf "%-3d breakpoint %-4s %-3s %s:%s" $i \
+ ${_Dbg_keep[${_brkpt_onetime[$i]}]} \
+ ${_Dbg_yn[${_brkpt_enable[$i]}]} \
+ $source_file ${_brkpt_line[$i]}
+ if [[ ${_brkpt_cond[$i]} != '1' ]] ; then
+ _Dbg_printf "\tstop only if %s" "${_brkpt_cond[$i]}"
+ fi
+ _Dbg_print_brkpt_count ${_brkpt_count[$i]}
+ fi
+ eval "$_resteglob"
+ return
+ fi
+
+ if [ ${#_brkpt_line[@]} != 0 ]; then
+ local -i i
+
+ _Dbg_msg "Num Type Disp Enb What"
+ for (( i=1; (( i <= _brkpt_max )) ; i++ )) ; do
+ local source_file=${_brkpt_file[$i]}
+ if [[ -n ${_brkpt_line[$i]} ]] ; then
+ source_file=$(_Dbg_adjust_filename "$source_file")
+ _Dbg_printf "%-3d breakpoint %-4s %-3s %s:%s" $i \
+ ${_Dbg_keep[${_brkpt_onetime[$i]}]} \
+ ${_Dbg_yn[${_brkpt_enable[$i]}]} \
+ $source_file ${_brkpt_line[$i]}
+ if [[ ${_brkpt_cond[$i]} != '1' ]] ; then
+ _Dbg_printf "\tstop only if %s" "${_brkpt_cond[$i]}"
+ fi
+ if (( _brkpt_count[$i] != 0 )) ; then
+ _Dbg_print_brkpt_count ${_brkpt_count[$i]}
+ fi
+ fi
+ done
+ else
+ _Dbg_msg "No breakpoints have been set."
+ fi
+}
+
+# clear all brkpts
+_Dbg_clear_all_brkpt() {
+
+ local -i k
+ for (( k=0; (( k < ${#_Dbg_filenames[@]} )) ; k++ )) ; do
+ local filename=${_filename[$k]}
+ local filevar="`_Dbg_file2var $filename`"
+ local brkpt_a="_brkpt_${filevar}"
+ _Dbg_write_journal_eval "unset ${brkpt_a}[$k]"
+ done
+ _Dbg_write_journal_eval "_brkpt_line=()"
+ _Dbg_write_journal_eval "_brkpt_cond=()"
+ _Dbg_write_journal_eval "_brkpt_file=()"
+ _Dbg_write_journal_eval "_brkpt_enable=()"
+ _Dbg_write_journal_eval "_brkpt_count=()"
+ _Dbg_write_journal_eval "_brkpt_onetime=()"
+}
+
+# Internal routine to a set breakpoint unconditonally.
+
+_Dbg_set_brkpt() {
+ local source_file=$1
+ local -ir line=$2
+ local -ir is_temp=$3
+ local -r condition=${4:-1}
+ local -r filevar="`_Dbg_file2var $source_file`"
+
+ local val_str=`_Dbg_get_assoc_array_entry "_brkpt_$filevar" $line`
+
+ # Increment brkpt_max here because we are 1-origin
+ ((_brkpt_max++))
+
+ if [ -z "$val_str" ] ; then
+ val_str=$_brkpt_max
+ else
+ val_str="$val_str $_brkpt_max"
+ fi
+
+ _brkpt_line[$_brkpt_max]=$line
+ _brkpt_file[$_brkpt_max]="$source_file"
+ _brkpt_cond[$_brkpt_max]="$condition"
+ _brkpt_onetime[$_brkpt_max]=$is_temp
+ _brkpt_count[$_brkpt_max]=0
+ _brkpt_enable[$_brkpt_max]=1
+
+ local dq_source_file=$(_Dbg_esc_dq "$source_file")
+ local dq_condition=$(_Dbg_esc_dq "$condition")
+ _Dbg_write_journal "_brkpt_line[$_brkpt_max]=$line"
+ _Dbg_write_journal "_brkpt_file[$_brkpt_max]=\"$dq_source_file\""
+ _Dbg_write_journal "_brkpt_cond[$_brkpt_max]=\"$dq_condition\""
+ _Dbg_write_journal "_brkpt_onetime[$_brkpt_max]=$is_temp"
+ _Dbg_write_journal "_brkpt_count[$_brkpt_max]=\"0\""
+ _Dbg_write_journal "_brkpt_enable[$_brkpt_max]=1"
+
+ _Dbg_set_assoc_array_entry "_brkpt_$filevar" $line $val_str
+ source_file=$(_Dbg_adjust_filename "$source_file")
+ if (( $is_temp == 0 )) ; then
+ _Dbg_msg "Breakpoint $_brkpt_max set in file ${source_file}, line $line."
+ else
+ _Dbg_msg "One-time breakpoint $_brkpt_max set in file ${source_file}, line $line."
+ fi
+ _Dbg_write_journal "_brkpt_max=$_brkpt_max"
+}
+
+# Internal routine to unset the actual breakpoint arrays
+_Dbg_unset_brkpt_arrays() {
+ local -i del=$1
+ _Dbg_write_journal_eval "unset _brkpt_line[$del]"
+ _Dbg_write_journal_eval "unset _brkpt_count[$del]"
+ _Dbg_write_journal_eval "unset _brkpt_file[$del]"
+ _Dbg_write_journal_eval "unset _brkpt_enable[$del]"
+ _Dbg_write_journal_eval "unset _brkpt_cond[$del]"
+ _Dbg_write_journal_eval "unset _brkpt_onetime[$del]"
+}
+
+# Internal routine to delete a breakpoint by file/line.
+_Dbg_unset_brkpt() {
+ local -r filename=$1
+ local -ir line=$2
+ local -r filevar="`_Dbg_file2var $filename`"
+ local -r fullname="`_Dbg_expand_filename $filename`"
+ local -i found=0
+
+ # set -xv
+ local -r entries=`_Dbg_get_assoc_array_entry "_brkpt_$filevar" $line`
+ local -i del
+ for del in $entries ; do
+ if [[ -z ${_brkpt_file[$del]} ]] ; then
+ _Dbg_msg "No breakpoint found at $filename:$line"
+ continue
+ fi
+ local brkpt_fullname=$(_Dbg_expand_filename ${_brkpt_file[$del]})
+ if [[ $brkpt_fullname != $fullname ]] ; then
+ _Dbg_msg "Brkpt inconsistency:" \
+ "$filename[$line] lists ${_brkpt_file[$del]} at entry $del"
+ else
+ _Dbg_unset_brkpt_arrays $del
+ ((found++))
+ fi
+ done
+ _Dbg_write_journal_eval "unset _brkpt_$filevar[$line]"
+ return $found
+ # set +xv
+}
+
+# Routine to a delete breakpoint by entry number: $1.
+# Returns whether or not anything was deleted.
+_Dbg_delete_brkpt_entry() {
+ local -r del=$1
+ local -i i
+ local -i found=0
+
+ # set -xv
+ if [[ -z ${_brkpt_file[$del]} ]] ; then
+ _Dbg_msg "Breakpoint entry $del is not set."
+ return 0
+ fi
+ local filevar="`_Dbg_file2var ${_brkpt_file[$del]}`"
+ local line=${_brkpt_line[$del]}
+ local -r entries=`_Dbg_get_assoc_array_entry "_brkpt_$filevar" $line`
+ local try
+ local -a new_val=()
+ for try in $entries ; do
+ if (( $try == $del )) ; then
+ _Dbg_unset_brkpt_arrays $del
+ found=1
+ else
+ if [[ -n ${_brkpt_file[$try]} ]] ; then
+ new_val[${#new_val[@]}]=$try
+ fi
+ fi
+ done
+ if [[ ${#new_val[@]} == 0 ]] ; then
+ _Dbg_write_journal_eval "unset _brkpt_$filevar[$line]"
+ else
+ _Dbg_set_assoc_array_entry "_brkpt_$filevar" $line "${new_val[@]}"
+ fi
+
+ return $found
+ # set +xv
+}
+
+# Enable/disable breakpoint(s) by entry numbers.
+_Dbg_enable_disable_brkpt() {
+ local -i on=$1
+ local en_dis=$2
+ local -i i=$3
+ if [[ -n "${_brkpt_file[$i]}" ]] ; then
+ if [[ ${_brkpt_enable[$i]} == $on ]] ; then
+ _Dbg_msg "Breakpoint entry $i already $en_dis so nothing done."
+ else
+ _Dbg_write_journal_eval "_brkpt_enable[$i]=$on"
+ _Dbg_msg "Breakpoint entry $i $en_dis."
+ fi
+ else
+ _Dbg_msg "Breakpoint entry $i doesn't exist so nothing done."
+ fi
+}
+
+#======================== WATCHPOINTS ============================#
+
+_Dbg_get_watch_exp_eval() {
+ local -i i=$1
+ local new_val
+
+ if [[ `eval echo \"${_Dbg_watch_exp[$i]}\"` == "" ]]; then
+ new_val=''
+ elif (( ${_Dbg_watch_arith[$i]} == 1 )) ; then
+ . ${_Dbg_libdir}/dbg-set-d-vars.inc
+ eval let new_val=\"${_Dbg_watch_exp[$i]}\"
+ else
+ . ${_Dbg_libdir}/dbg-set-d-vars.inc
+ eval new_val="${_Dbg_watch_exp[$i]}"
+ fi
+ echo $new_val
+}
+
+# Enable/disable watchpoint(s) by entry numbers.
+_Dbg_enable_disable_watch() {
+ local -i on=$1
+ local en_dis=$2
+ local -i i=$3
+ if [ -n "${_Dbg_watch_exp[$i]}" ] ; then
+ if [[ ${_Dbg_watch_enable[$i]} == $on ]] ; then
+ _Dbg_msg "Watchpoint entry $i already $en_dis so nothing done."
+ else
+ _Dbg_write_journal_eval "_Dbg_watch_enable[$i]=$on"
+ _Dbg_msg "Watchpoint entry $i $en_dis."
+ fi
+ else
+ _Dbg_msg "Watchpoint entry $i doesn't exist so nothing done."
+ fi
+}
+
+_Dbg_list_watch() {
+ if [ ${#_Dbg_watch_exp[@]} != 0 ]; then
+ local i=0 j
+ _Dbg_msg "Watch expressions:"
+ for (( i=0; (( i < _Dbg_watch_max )); i++ )) ; do
+ if [ -n "${_Dbg_watch_exp[$i]}" ] ;then
+ _Dbg_printf '%-3d watchpoint %-4s %s' $i \
+ ${_Dbg_yn[${_Dbg_watch_enable[$i]}]} \
+ "${_Dbg_watch_exp[$i]}"
+ _Dbg_print_brkpt_count ${_Dbg_watch_count[$i]}
+ fi
+ done
+ else
+ _Dbg_msg "No watch expressions have been set."
+ fi
+}
+
+_Dbg_delete_watch_entry() {
+ local -i del=$1
+
+ if [ -n "${_Dbg_watch_exp[$del]}" ] ; then
+ _Dbg_write_journal_eval "unset _Dbg_watch_exp[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_watch_val[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_watch_enable[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_watch_count[$del]"
+ else
+ _Dbg_msg "Watchpoint entry $del doesn't exist so nothing done."
+ fi
+}
+
+_Dbg_clear_watch() {
+ if (( $# < 1 )) ; then
+ local _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
+ read $_Dbg_edit -p "Delete all watchpoints? (y/n): " \
+ <&$_Dbg_input_desc 2>>$_Dbg_prompt_output
+
+ if [[ $REPLY = [Yy]* ]] ; then
+ _Dbg_write_journal_eval unset _Dbg_watch_exp[@]
+ _Dbg_write_journal_eval unset _Dbg_watch_val[@]
+ _Dbg_write_journal_eval unset _Dbg_watch_enable[@]
+ _Dbg_write_journal_eval unset _Dbg_watch_count[@]
+ _Dbg_msg "All Watchpoints have been cleared"
+ fi
+ return 0
+ fi
+
+ eval "$_seteglob"
+ if [[ $1 == $int_pat ]]; then
+ _Dbg_write_journal_eval "unset _Dbg_watch_exp[$1]"
+ _msg "Watchpoint $i has been cleared"
+ else
+ _Dbg_list_watch
+ _basdhb_msg "Please specify a numeric watchpoint number"
+ fi
+
+ eval "$_resteglob"
+}
+
+# Set or list watch command
+_Dbg_cmd_watch() {
+ if [ -z "$2" ]; then
+ _Dbg_clear_watch
+ else
+ local -i n=_Dbg_watch_max++
+ _Dbg_watch_arith[$n]="$1"
+ shift
+ _Dbg_watch_exp[$n]="$1"
+ _Dbg_watch_val[$n]=`_Dbg_get_watch_exp_eval $n`
+ _Dbg_watch_enable[$n]=1
+ _Dbg_watch_count[$n]=0
+ _Dbg_printf '%2d: %s==%s arith: %d' $n \
+ "(${_Dbg_watch_exp[$n]})" ${_Dbg_watch_val[$n]} \
+ ${_Dbg_watch_arith[$n]}
+ fi
+}
+
+#======================== ACTIONs ============================#
+
+# Add actions(s) at given line number of the current file. $1 is
+# the line number or _curline if omitted. $2 is a condition to test
+# for whether to stop.
+
+_Dbg_cmd_action() {
+
+ local n=${1:-$_curline}
+ shift
+
+ local stmt;
+ if [ -z "$1" ] ; then
+ condition=1
+ else
+ condition="$*"
+ fi
+
+ local -ar word=($(_Dbg_parse_linespec "$n"))
+ if [[ ${#word[@]} == 0 ]] ; then
+ _Dbg_msg "Invalid linespec $n"
+ return
+ fi
+
+ local filename=${word[1]}
+ local line_number=${word[0]}
+ local full_filename=`_Dbg_is_file $filename`
+ if [[ -n $full_filename ]] ; then
+ if (( $line_number == 0 )) ; then
+ _Dbg_msg "There is no line 0 to set action at."
+ else
+ _Dbg_check_line $line_number "$full_filename"
+ (( $? == 0 )) && \
+ _Dbg_set_action "$full_filename" "$line_number" $is_temp "$condition"
+ fi
+ else
+ filename=$(_Dbg_adjust_filename "$filename")
+ _Dbg_msg "File $filename not found in read-in files."
+ _Dbg_msg "See 'info files' for a list of known files."
+ fi
+}
+
+# clear all actions
+_Dbg_cmd_clear_all_actions() {
+
+ local _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
+ read $_Dbg_edit -p "Delete all actions? (y/n): " \
+ <&$_Dbg_input_desc 2>>$_Dbg_prompt_output
+
+ if [[ $REPLY != [Yy]* ]] ; then
+ return 1
+ fi
+ local -i k
+ for (( k=0; (( k < ${#_Dbg_filenames[@]} )) ; k++ )) ; do
+ local filename=${_filename[$k]}
+ local filevar="`_Dbg_file2var $filename`"
+ local action_a="_Dbg_action_${filevar}"
+ unset ${action_a}[$k]
+ done
+ _Dbg_write_journal_eval "_Dbg_action_line=()"
+ _Dbg_write_journal_eval "_Dbg_action_stmt=()"
+ _Dbg_write_journal_eval "_Dbg_action_file=()"
+ _Dbg_write_journal_eval "_Dbg_action_enable=()"
+ return 0
+}
+
+# delete actions(s) at given file:line numbers. If no file is given
+# use the current file.
+_Dbg_cmd_clear_action() {
+ # set -x
+ local -r n=${1:-$_curline}
+
+ local -ar word=($(_Dbg_parse_linespec "$n"))
+ if [[ ${#word[@]} == 0 ]] ; then
+ _Dbg_msg "Invalid linespec $n"
+ return
+ fi
+
+ local filename=${word[1]}
+ local line_number=${word[0]}
+ local full_filename=`_Dbg_is_file $filename`
+ if [[ -n $full_filename ]] ; then
+ if (( $line_number == 0 )) ; then
+ _Dbg_msg "There is no line 0 to clear action at."
+ else
+ _Dbg_check_line $line_number "$full_filename"
+ (( $? == 0 )) && \
+ _Dbg_unset_action "$full_filename" "$line_number"
+ local -r found=$?
+ if [[ $found != 0 ]] ; then
+ _Dbg_msg "Removed $found action(s)."
+ else
+ _Dbg_msg "Didn't find any actions to remove at $n."
+ fi
+ fi
+ else
+ filename=$(_Dbg_adjust_filename "$filename")
+ _Dbg_msg "File $filename not found in read-in files."
+ _Dbg_msg "See 'info files' for a list of known files."
+ fi
+}
+
+# list actions
+_Dbg_list_action() {
+
+ if [ ${#_Dbg_action_line[@]} != 0 ]; then
+ _Dbg_msg "Actions at following places:"
+ local -i i
+
+ _Dbg_msg "Num Enb Stmt file:line"
+ for (( i=0; (( i < _Dbg_action_max )) ; i++ )) ; do
+ if [[ -n ${_Dbg_action_line[$i]} ]] ; then
+ local source_file=${_Dbg_action_file[$i]}
+ source_file=$(_Dbg_adjust_filename "$source_file")
+ _Dbg_printf "%-3d %3d %-18s %s:%s" $i ${_Dbg_action_enable[$i]} \
+ "${_Dbg_action_stmt[$i]}" \
+ $source_file ${_Dbg_action_line[$i]}
+ fi
+ done
+ else
+ _Dbg_msg "No actions have been set."
+ fi
+}
+
+# Internal routine to a set breakpoint unconditonally.
+
+_Dbg_set_action() {
+ local source_file=$1
+ local -ir line=$2
+ local -r stmt=${3:-1}
+ local -r filevar="`_Dbg_file2var $source_file`"
+
+ local val_str=`_Dbg_get_assoc_array_entry "_Dbg_action_$filevar" $line`
+ if [ -z "$val_str" ] ; then
+ val_str=$_Dbg_action_max
+ else
+ val_str="$val_str $_Dbg_action_max"
+ fi
+
+ _Dbg_action_line[$_Dbg_action_max]=$line
+ _Dbg_action_file[$_Dbg_action_max]="$source_file"
+ _Dbg_action_stmt[$_Dbg_action_max]="$stmt"
+ _Dbg_action_enable[$_Dbg_action_max]=1
+
+ local dq_source_file=$(_Dbg_esc_dq "$source_file")
+ local dq_stmt=$(_Dbg_esc_dq "stmt")
+
+ _Dbg_write_journal "_Dbg_action_line[$_Dbg_action_max]=$line"
+ _Dbg_write_journal "_Dbg_action_file[$_Dbg_action_max]=\"$dq_source_file\""
+ _Dbg_write_journal "_Dbg_action_stmt[$_Dbg_action_max]=\"$dq_stmt\""
+ _Dbg_write_journal "_Dbg_action_enable[$_Dbg_action_max]=1"
+
+ _Dbg_set_assoc_array_entry "_Dbg_action_$filevar" $line $val_str
+ source_file=$(_Dbg_adjust_filename "$source_file")
+ _Dbg_msg "Breakpoint $_Dbg_action_max set at ${source_file}:$line."
+ ((_Dbg_action_max++))
+ _Dbg_write_journal "_Dbg_action_max=$_Dbg_action_max"
+}
+
+# Internal routine to delete a breakpoint by file/line.
+_Dbg_unset_action() {
+ local -r filename=$1
+ local -ir line=$2
+ local -r filevar="`_Dbg_file2var $filename`"
+ local -i found=0
+
+ # set -xv
+ local -r entries=`_Dbg_get_assoc_array_entry "_Dbg_action_$filevar" $line`
+ local -i del
+ for del in $entries ; do
+ if [[ -z ${_Dbg_action_file[$del]} ]] ; then
+ _Dbg_msg "No action found at $filename:$line"
+ continue
+ fi
+ if [[ ${_Dbg_action_file[$del]} != $filename ]] ; then
+ _Dbg_msg "action inconsistency:" \
+ "$filename[$line] lists ${_Dbg_action_file[$del]} at entry $del"
+ else
+ _Dbg_write_journal_eval "unset _Dbg_action_line[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_action_stmt[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_action_file[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_action_enable[$del]"
+ ((found++))
+ fi
+ done
+ _Dbg_write_journal_eval unset _Dbg_action_$filevar[$line]
+ return $found
+ # set +xv
+}
+
+# Routine to a delete breakpoint/watchpoint by entry numbers.
+_Dbg_cmd_action_delete() {
+ local -r to_go=$@
+ local -i i
+ local -i found=0
+
+ # set -xv
+ eval "$_seteglob"
+ for del in $to_go ; do
+ case $del in
+ $int_pat )
+ _Dbg_delete_action_entry $del
+ ((found += $?))
+ ;;
+ * )
+ _Dbg_msg "Invalid entry number skipped: $del"
+ esac
+ done
+ eval "$_resteglob"
+ [[ $found != 0 ]] && _Dbg_msg "Removed $found action(s)."
+ return $found
+ # set +xv
+}
+
+#======================== DISPLAYs ============================#
+
+# Enable/disable display by entry numbers.
+_Dbg_disp_enable_disable() {
+ if [ -z "$1" ] ; then
+ _Dbg_msg "Expecting a list of display numbers. Got none."
+ return 1
+ fi
+ local -i on=$1
+ local en_dis=$2
+ shift; shift
+
+ local to_go="$@"
+ local i
+ eval "$_seteglob"
+ for i in $to_go ; do
+ case $i in
+ $int_pat )
+ _Dbg_enable_disable_display $on $en_dis $i
+ ;;
+ * )
+ _Dbg_msg "Invalid entry number skipped: $i"
+ esac
+ done
+ eval "$_resteglob"
+ return 0
+}
+
+_Dbg_eval_all_display() {
+ local -i i
+ for (( i=0; i < _Dbg_disp_max ; i++ )) ; do
+ if [ -n "${_Dbg_disp_exp[$i]}" ] \
+ && [[ ${_Dbg_disp_enable[i]} != 0 ]] ; then
+ _Dbg_printf_nocr "%2d (%s): " $i "${_Dbg_disp_exp[i]}"
+ _Dbg_cmd_eval "${_Dbg_disp_exp[i]}"
+ fi
+ done
+}
+
+# Set display command or list all current display expressions
+_Dbg_cmd_display() {
+ if [[ -z "$@" ]]; then
+ _Dbg_eval_all_display
+ else
+ local -i n=_Dbg_disp_max++
+ _Dbg_disp_exp[$n]="$@"
+ _Dbg_disp_enable[$n]=1
+ _Dbg_printf '%2d: %s' $n "${_Dbg_disp_exp[$n]}"
+ fi
+}
+
+# List display command(s)
+_Dbg_cmd_list_display() {
+ if [ ${#_Dbg_disp_exp[@]} != 0 ]; then
+ local i=0 j
+ _Dbg_msg "Display expressions:"
+ _Dbg_msg "Num Enb Expression "
+ for (( i=0; (( i < _Dbg_disp_max )); i++ )) ; do
+ if [ -n "${_Dbg_disp_exp[$i]}" ] ;then
+ _Dbg_printf '%-3d %3d %s' \
+ $i ${_Dbg_disp_enable[$i]} "${_Dbg_disp_exp[$i]}"
+ fi
+ done
+ else
+ _Dbg_msg "No display expressions have been set."
+ fi
+}
+
+# Enable/disable display(s) by entry numbers.
+_Dbg_enable_disable_display() {
+ local -i on=$1
+ local en_dis=$2
+ local -i i=$3
+ if [ -n "${_Dbg_disp_exp[$i]}" ] ; then
+ if [[ ${_Dbg_disp_enable[$i]} == $on ]] ; then
+ _Dbg_msg "Display entry $i already $en_dis so nothing done."
+ else
+ _Dbg_write_journal_eval "_Dbg_disp_enable[$i]=$on"
+ _Dbg_msg "Display entry $i $en_dis."
+ fi
+ else
+ _Dbg_msg "Display entry $i doesn't exist so nothing done."
+ fi
+}
+
+_Dbg_cmd_undisplay() {
+ local -i del=$1
+
+ if [ -n "${_Dbg_disp_exp[$del]}" ] ; then
+ _Dbg_write_journal_eval "unset _Dbg_disp_exp[$del]"
+ _Dbg_write_journal_eval "unset _Dbg_disp_enable[$del]"
+ else
+ _Dbg_msg "Display entry $del doesn't exist so nothing done."
+ fi
+}
+
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-cmds.inc cvs/debugger/dbg-cmds.inc
--- bash-2.05b/debugger/dbg-cmds.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-cmds.inc 2003-08-06 16:21:55.000000000 +0200
@@ -0,0 +1,848 @@
+# dbg-cmds.inc - Bourne Again Shell Debugger Top-level debugger commands
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# Debugger command loop: Come here at to read debugger commands to
+# run.
+
+# Main-line debugger read/execute command loop
+
+# ==================== VARIABLES =======================================
+# input_start_descriptor is the lowest descriptor we use for reading.
+# input_desc is the current descriptor in use. "sourc"ing other
+# command files will increase this descriptor
+
+typeset -ir _Dbg_input_start_desc=9
+typeset -i _Dbg_input_desc=_Dbg_input_start_desc-1 # will ++ before use
+
+# Are we inside the middle of a "skip" command?
+typeset -i _Dbg_inside_skip=0
+
+# A variable holding a space is set so it can be used in a "set prompt" command
+# ("read" in the main command loop will remove a trailing space so we need
+# another way to allow a user to enter spaces in the prompt.)
+
+typeset _Dbg_space=' '
+
+# Should we allow editing of debugger commands?
+# The value should either be '-e' or ''
+typeset _Dbg_edit='-e'
+
+# What do we use for a debugger prompt? Technically we don't need to
+# use the above $bashdb_space in the assignment below, but we put it
+# in to suggest to a user that this is how one gets a spaces into the
+# prompt.
+
+typeset _Dbg_prompt_str='bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space'
+
+# The arguments in the last "print" command.
+typeset _Dbg_last_print_args=''
+
+# The arguments in the last "x" command.
+typeset _Dbg_last_x_args=''
+
+# ===================== FUNCTIONS =======================================
+
+# Note: We have to be careful here in naming "local" variables. In contrast
+# to other places in the debugger, because of the read/eval loop, they are
+# in fact seen by those using the debugger. So in contrast to other "local"s
+# in the debugger, we prefer to preface these with _Dbg_.
+_Dbg_cmdloop() {
+
+ # THIS SHOULD BE DONE IN dbg-sig.inc, but there's a bug in BASH in
+ # trying to change "trap RETURN" inside a "trap RETURN" handler....
+ # Turn off return trapping. Not strictly necessary, since it *should* be
+ # covered by the _Dbg_ test below if we've named functions correctly.
+ # However turning off the RETURN trap should reduce unnecessary calls.
+ # trap RETURN
+
+ _Dbg_inside_skip=0
+
+ # Evaluate all the display expressions
+ _Dbg_eval_all_display
+
+ # Loop over all pending open input file descriptors
+ while (( $_Dbg_input_desc >= $_Dbg_input_start_desc )) ; do
+ local _Dbg_cmd;
+ local _Dbg_args;
+
+ # Set up prompt to show shell level.
+ local _Dbg_greater=''
+ local _Dbg_less=''
+ local -i _Dbg_i=0
+ for (( _Dbg_i=0 ; _Dbg_i < BASHDB_LEVEL ; _Dbg_i++ )) ; do
+ _Dbg_greater=">$_Dbg_greater"
+ _Dbg_less="<$_Dbg_less"
+ done
+
+ for (( _Dbg_i=0 ; _Dbg_i < BASH_SUBSHELL ; _Dbg_i++ )) ; do
+ _Dbg_greater=")$_Dbg_greater"
+ _Dbg_less="$_Dbg_less("
+ done
+
+ # Loop over debugger commands. But before reading a debugger
+ # command, we need to make sure IFS is set to spaces to ensure our
+ # two variables (command name and rest of the arguments) are set
+ # correctly. Saving the IFS and setting it to the "normal" value
+ # of space should be done in the DEBUG signal handler entry.
+
+ # Also, we need to make sure the prompt output is
+ # redirected to the debugger terminal. Both of these things may
+ # have been changed by the debugged program for its own
+ # purposes. Furthermore, were we *not* to redirect our stderr
+ # below, we may mess up what the debugged program expects to see
+ # in in stderr by adding our debugger prompt.
+
+ # if no tty, no prompt
+ local _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
+
+ eval "local _Dbg_prompt=$_Dbg_prompt_str"
+ while read $_Dbg_edit -p "$_Dbg_prompt" \
+ _Dbg_cmd _Dbg_args \
+ <&$_Dbg_input_desc 2>>$_Dbg_prompt_output; do
+
+ # Set default next, step or skip command
+ if [[ -z $_Dbg_cmd ]]; then
+ _Dbg_cmd=$_Dbg_last_next_step_cmd
+ _Dbg_args=$_Dbg_last_next_step_args
+ fi
+
+ local dq_cmd=$(_Dbg_esc_dq "$_Dbg_cmd")
+ local dq_args=$(_Dbg_esc_dq "$_Dbg_args")
+ # _Dbg_write_journal_eval doesn't work here. Don't really understand
+ # how to get it to work. So we do this in two steps.
+ _Dbg_write_journal \
+ "_Dbg_history[${#_Dbg_history[@]}]=\"$dq_cmd $dq_args\""
+ _Dbg_history[${#_Dbg_history[@]}]="$_Dbg_cmd $_Dbg_args"
+
+ _Dbg_hi=${#_Dbg_history[@]}
+
+ local -i _Dbg_redo=1
+ while (( $_Dbg_redo )) ; do
+
+ _Dbg_redo=0
+
+ case $_Dbg_cmd in
+
+ # Comment line
+ [#]* )
+ _Dbg_remove_history_item
+ ;;
+
+ # List window up to _curline
+ - )
+ local -i start_line=(_curline+1-$_Dbg_listsize)
+ local -i count=($_Dbg_listsize)
+ if (( start_line <= 0 )) ; then
+ ((count=count+start_line-1))
+ start_line=1;
+ fi
+ _Dbg_list $_cur_source_file $start_line $count
+ ;;
+
+ # list current line
+ . )
+ _Dbg_list $_cur_source_file $_curline 1
+ ;;
+
+ # Search forwards for pattern
+ /* )
+ _Dbg_cmd_search $_Dbg_cmd
+ ;;
+
+ # Search backwards for pattern
+ [?]* )
+ _Dbg_cmd_search_back $_Dbg_cmd
+ ;;
+
+ # Set action to be silently run when a line is hit
+ a )
+ _Dbg_cmd_action $_Dbg_args ;;
+
+ # Set breakpoint on a line
+ b | br | bre | brea | break )
+ _Dbg_cmd_break 0 $_Dbg_args ;;
+
+ # Continue
+ c | cont | conti |contin |continu | continue )
+ _Dbg_cmd_continue $_Dbg_args
+ if [[ $? == 0 ]] ; then
+ IFS="$_Dbg_old_IFS";
+ _Dbg_write_journal_eval \
+ "_Dbg_old_set_opts=\"$_Dbg_old_set_opts -o fntrace\""
+ return 0
+ fi
+ ;;
+
+ # Breakpoint/Watchpoint Conditions
+ cond | condi |condit |conditi | conditio | condition )
+ _Dbg_cmd_condition $_Dbg_args
+ ;;
+
+ # Delete all breakpoints by line number.
+ # Note we use "d" as an alias for "clear" to be compatible
+ # with the Perl5 debugger.
+ d | cl | cle | clea | clea | clear )
+ _Dbg_cmd_clear_brkpt $_Dbg_args
+ ;;
+
+ # Delete breakpoints by entry numbers. Note "d" is an alias for
+ # clear.
+ de | del | dele | delet | delete )
+ _Dbg_cmd_delete $_Dbg_args
+ ;;
+
+ # Set up a script for debugging into.
+ deb | debu | debug )
+ _Dbg_cmd_debug $_Dbg_args
+ # Skip over the execute statement which presumably we ran above.
+ _Dbg_cmd_next_step_skip "skip" 1
+ IFS="$_Dbg_old_IFS";
+ return 1
+ ;;
+
+ # Disable breakpoints
+ di | dis | disa | disab | disabl | disable )
+ _Dbg_cmd_disable $_Dbg_args
+ ;;
+
+ # Display expression
+ disp | displ | displa| display )
+ _Dbg_cmd_display $_Dbg_args
+ ;;
+
+ # Delete all breakpoints.
+ D | deletea | deleteal | deleteall )
+ _Dbg_clear_all_brkpt
+ ;;
+
+ # List stack 1 up
+ do | dow | down )
+ _Dbg_cmd_down $_Dbg_args
+ ;;
+
+ # evaluate as bash command
+ e | ev | eva | eval )
+ _Dbg_cmd_eval $_Dbg_args
+ ;;
+
+ # evaluate as bash command
+ en | ena | enab | enabl | enable )
+ _Dbg_cmd_enable $_Dbg_args
+ ;;
+
+ #
+ fi | fin | fini | finis | finish | r )
+
+ trap '_Dbg_debug_trap_handler 1 $LINENO "$@"' RETURN
+ return 0
+ ;;
+
+ # View source in file
+ fr | fra | fra | frame )
+ _Dbg_cmd_frame $_Dbg_args
+ ;;
+
+ # Set signal handle parameters
+ ha | han | hand | handl | handle )
+ _Dbg_cmd_handle $_Dbg_args
+ ;;
+
+ # Info subcommands
+ i | in | inf | info )
+ _Dbg_cmd_info $_Dbg_args
+ ;;
+
+ # List line.
+ # print lines in file
+ l | li | lis | list )
+ _Dbg_cmd_list $_Dbg_args
+ ;;
+
+ # next/single-step N times (default 1)
+ n | ne | nex | next | s | st | ste | step | sk | ski | skip )
+ _Dbg_last_next_step_cmd="$_Dbg_cmd"
+ _Dbg_last_next_step_args=$_Dbg_args
+ _Dbg_cmd_next_step_skip $_Dbg_cmd $_Dbg_args
+ if [[ $_Dbg_cmd == sk* ]] ; then
+ _Dbg_inside_skip=1
+ return 1
+ else
+ return 0
+ fi
+ ;;
+
+ # print globbed or substituted variables
+ p | pr | pri | prin | print )
+ _Dbg_cmd_print "$_Dbg_args"
+ ;;
+
+ # quit
+ q | qu | qui | quit )
+ _Dbg_cmd_quit $_Dbg_args
+ ;;
+
+ # Search backwards for pattern
+ rev | reve | rever | revers | reverse )
+ _Dbg_cmd_search_back $_Dbg_args
+ ;;
+
+ # return from function/source without finishing executions
+ ret | retu | retur | return )
+ _Dbg_steps=1
+ _Dbg_write_journal "_Dbg_steps=$_Dbg_steps"
+ IFS="$_Dbg_old_IFS";
+ return 2
+ ;;
+
+ # Run a debugger set command
+ se | set )
+ _Dbg_cmd_set $_Dbg_args
+ ;;
+
+ # Search forwards for pattern
+ sea | sear | searc | search | \
+ for | forw | forwa | forwar | forward )
+ _Dbg_cmd_search $_Dbg_args
+ ;;
+
+ # Run a debugger show command
+ sh | sho | show )
+ _Dbg_cmd_show $_Dbg_args
+ ;;
+
+ # Run a debugger comamnd file
+ so | sou | sour | sourc | source )
+ _Dbg_cmd_source $_Dbg_args
+ ;;
+
+ # toggle execution trace
+ t | to | tog | togg | toggl | toggle )
+ _Dbg_cmd_trace
+ ;;
+
+ # Set breakpoint on a line
+ tb | tbr | tbre | tbrea | tbreak )
+ _Dbg_cmd_break 1 $_Dbg_args ;;
+
+ # Set the output tty
+ tt | tty )
+ _Dbg_cmd_tty $_Dbg_args
+ _Dbg_prompt_output=${_Dbg_tty:-/dev/null}
+ ;;
+
+ # List call stack up
+ u | up )
+ _Dbg_cmd_up $_Dbg_args
+ ;;
+
+ # List call stack up
+ un | undi | undis | undisp | undispl | undispla | undisplay )
+ _Dbg_cmd_undisplay $_Dbg_args
+ ;;
+
+ # List window around line.
+ w | wi | win | wind | windo | window )
+ ((_startline=_curline - _Dbg_listsize/2))
+ (( $_startline <= 0 )) && _startline=1
+ _Dbg_list $_cur_source_file $_startline
+ ;;
+
+ # intelligent print of variable, function or expression
+ x | examine )
+ _Dbg_cmd_x "$_Dbg_args"
+ ;;
+
+ # List all breakpoints and actions.
+ L )
+ _Dbg_cmd_list_brkpt
+ _Dbg_list_watch
+ _Dbg_list_action
+ ;;
+
+ # print help command menu
+ '?' | h | he | hel | help )
+ _Dbg_cmd_help $_Dbg_args ;;
+
+ # run shell command. Has to come before ! below.
+ '!!' | sh | she | shell )
+ eval $_Dbg_args ;;
+
+ \!* | hi | his | hist | histo | histor | history )
+ _Dbg_remove_history_item
+ _Dbg_cmd_history_parse $_Dbg_args
+ if (( $history_num >= 0 )) ; then
+ if (( $history_num < ${#_Dbg_history[@]} )) ; then
+ set ${_Dbg_history[$history_num]}
+ _Dbg_cmd=$1
+ shift
+ _Dbg_args="$@"
+ _Dbg_redo=1;
+ else
+ _Dbg_msg \
+ "Number $history_num should be less than ${#_Dbg_history[@]}"
+ fi
+ fi
+ ;;
+
+ # Remove all actions
+ A )
+ _Dbg_cmd_clear_all_actions $_Dbg_args
+ ;;
+
+ # Run debugger command history
+ H )
+ _Dbg_remove_history_item
+ _Dbg_cmd_history_list $_Dbg_args
+ ;;
+
+ # restart debug session.
+ R | re | res | rest | resta | restar | restart | ru | run )
+ _Dbg_cmd_restart $_Dbg_args
+ ;;
+
+ # S List subroutine names
+ S )
+ _Dbg_cmd_list_subroutines $_Dbg_args
+ ;;
+
+ # Stack trace
+ T | wh | whe | wher | where | bt| back | backtrace )
+ _Dbg_cmd_stack_trace 1 $_Dbg_args;
+ ;;
+
+ # Dump variables
+ V )
+ _Dbg_cmd_list_variables "$_Dbg_args"
+ ;;
+
+ # Watch expression
+ We | watche )
+ _Dbg_cmd_watch 1 "$_Dbg_args"
+ ;;
+
+ # watch variable
+ W | wa | wat | watch )
+ local -a a=($_Dbg_args)
+ local first=${a[0]}
+ if [[ $first == '' ]] ; then
+ _Dbg_cmd_watch 0
+ else
+ if [[ 0 == `_Dbg_is_var $first` ]] ; then
+ _Dbg_msg "Can't set watch: no such variable $first."
+ else
+ unset a first
+ _Dbg_cmd_watch 0 "\$$_Dbg_args"
+ fi
+ fi
+ ;;
+
+ # Show version information
+ M | ve | ver | vers | versi | versio | version )
+ _Dbg_cmd_show_versions
+ ;;
+
+ * )
+ _Dbg_msg "Undefined command: \"$_Dbg_cmd\". Try \"help\"."
+ _Dbg_remove_history_item
+ ;;
+ esac
+ done
+
+ IFS=$_Dbg_space_IFS;
+ eval "_Dbg_prompt=$_Dbg_prompt_str"
+ done
+
+ ((_Dbg_input_desc--))
+ done
+
+ # EOF hit. Same as quit without arguments
+ _Dbg_msg "" # Cause <cr> since EOF may not have put in.
+ _Dbg_cmd_quit
+}
+
+# Set up to Debug into another script...
+# TODO: would work better if instead of using $source_line below
+# which might have several statements, we could just pick up the next
+# single statement.
+_Dbg_cmd_debug() {
+
+ # set -xv
+ local script_cmd=${@:-$_Dbg_bash_command}
+
+ # We need to expand variables that might be in $script_cmd.
+ # set_Dbg_nested_debug_cmd is set up to to be eval'd below.
+ local set_Dbg_debug_cmd="local _Dbg_debug_cmd=\"$script_cmd\"";
+
+ [ -z "$BASH" ] && BASH='bash'
+
+ eval "$_seteglob"
+ # Add appropriate bash debugging options
+ if [[ $_Dbg_script != 1 ]] ; then
+ # Running "bash --debugger", so prepend "bash --debugger"
+ set_Dbg_debug_cmd="local _Dbg_debug_cmd=\"$BASH --debugger $script_cmd\"";
+ elif [[ $0/// == *bashdb/// ]] ; then
+ # Running "bashdb", so prepend "bash bashdb .."
+ set_Dbg_debug_cmd="local _Dbg_debug_cmd=\"$BASH $0 -q -L $_Dbg_libdir $script_cmd\"";
+ fi
+ eval "$_resteglob"
+ eval $set_Dbg_debug_cmd
+
+ if (( _Dbg_basename_only )) ; then
+ _Dbg_msg "Debugging new script with $script_cmd"
+ else
+ _Dbg_msg "Debugging new script with $_Dbg_debug_cmd"
+ fi
+ local -r old_quit_on_quit=$BASHDB_QUIT_ON_QUIT
+ export BASHDB_QUIT_ON_QUIT=1
+ export BASHDB_BASENAME_ONLY="$_Dbg_basename_only"
+ ((BASHDB_LEVEL++))
+ $_Dbg_debug_cmd
+ ((BASHDB_LEVEL--))
+ export BASHDB_QUIT_ON_QUIT=$old_quit_on_quit
+}
+
+# V [![pat]] List variables and values for whose variables names which
+# match pat $1. If ! is used, list variables that *don't* match.
+# If pat ($1) is omitted, use * (everything) for the pattern.
+_Dbg_cmd_list_variables() {
+ local _Dbg_old_glob="$GLOBIGNORE"
+ GLOBIGNORE="*"
+
+ local _Dbg_match="$1"
+ _Dbg_match_inverted=no
+ case ${_Dbg_match} in
+ \!*)
+ _Dbg_match_inverted=yes
+ _Dbg_match=${_Dbg_match#\!}
+ ;;
+ "")
+ _Dbg_match='*'
+ ;;
+ esac
+ local _Dbg_list=`declare -p`
+ local _Dbg_old_ifs=${IFS}
+ IFS="
+"
+ local _Dbg_temp=${_Dbg_list}
+ _Dbg_list=""
+ local -i i=0
+ local -a _Dbg_list
+
+ # GLOBIGNORE protects us against using the result of
+ # a glob expansion, but it doesn't protect us from
+ # actually performing it, and this can bring bash down
+ # with a huge _Dbg_source_ variable being globbed.
+ # So here we disable globbing momentarily
+ set -o noglob
+ for _Dbg_item in ${_Dbg_temp}; do
+ _Dbg_list[${i}]="${_Dbg_item}"
+ i=${i}+1
+ done
+ set +o noglob
+ IFS=${_Dbg_old_ifs}
+ local _Dbg_item=""
+ local _Dbg_skip=0
+ local _Dbg_show_cmd=""
+ _Dbg_show_cmd=`echo -e "case \\${_Dbg_item} in \n${_Dbg_match})\n echo yes;;\n*)\necho no;; esac"`
+
+ for (( i=0; (( i < ${#_Dbg_list[@]} )) ; i++ )) ; do
+ _Dbg_item=${_Dbg_list[$i]}
+ case ${_Dbg_item} in
+ *\ \(\)\ )
+ _Dbg_skip=1
+ ;;
+ \})
+ _Dbg_skip=0
+ continue
+ esac
+ if [[ _Dbg_skip -eq 1 ]]; then
+ continue
+ fi
+
+ # Ignore all _Dbg_ variables here because the following
+ # substitutions takes a long while when it encounters
+ # a big _Dbg_source_
+ case ${_Dbg_item} in
+ _Dbg_*) # Hide/ignore debugger variables.
+ continue;
+ ;;
+ esac
+
+ _Dbg_item=${_Dbg_item/=/==/}
+ _Dbg_item=${_Dbg_item%%=[^=]*}
+ case ${_Dbg_item} in
+ _=);;
+ *=)
+ _Dbg_item=${_Dbg_item%=}
+ local _Dbg_show=`eval $_Dbg_show_cmd`
+ if [[ "$_Dbg_show" != "$_Dbg_match_inverted" ]]; then
+ if [[ -n ${_Dbg_item} ]]; then
+ local _Dbg_var=`declare -p ${_Dbg_item} 2>/dev/null`
+ if [[ -n "$_Dbg_var" ]]; then
+ # Uncomment the following 3 lines to use literal
+ # linefeeds
+# _Dbg_var=${_Dbg_var//\\\\n/\\n}
+# _Dbg_var=${_Dbg_var//
+#/\n}
+ # Comment the following 3 lines to use literal linefeeds
+ _Dbg_var=${_Dbg_var//\\\\n/\\\\\\n}
+ _Dbg_var=${_Dbg_var//
+/\\n}
+ _Dbg_var=${_Dbg_var#* * }
+ _Dbg_msg ${_Dbg_var}
+ fi
+ fi
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ done
+ GLOBIGNORE=$_Dbg_old_glob
+}
+
+_Dbg_cmd_eval() {
+
+ echo ". ${_Dbg_libdir}/dbg-set-d-vars.inc" > $_Dbg_evalfile
+ echo "$@" >> $_Dbg_evalfile
+ if [[ -n $_basdhb_tty ]] ; then
+ . $_Dbg_evalfile >>$_Dbg_tty
+ else
+ . $_Dbg_evalfile
+ fi
+}
+
+_Dbg_cmd_next_step_skip() {
+
+ local cmd=$1
+ local count=${2:-1}
+ # Do we step debug into functions called or not?
+ if [[ $cmd == n* ]] ; then
+ _Dbg_old_set_opts="$_Dbg_old_set_opts +o fntrace"
+ else
+ _Dbg_old_set_opts="$_Dbg_old_set_opts -o fntrace"
+ fi
+ _Dbg_write_journal "_Dbg_old_set_opts=\"$_Dbg_old_set_opts\""
+
+ if [[ $count == [0-9]* ]] ; then
+ let _Dbg_steps=${count:-1}
+ else
+ _Dbg_msg "Argument ($count) should be a number or nothing."
+ _Dbg_steps=1
+ fi
+ _Dbg_write_journal "_Dbg_steps=$_Dbg_steps"
+}
+
+_Dbg_cmd_print() {
+ local -r _Dbg_expr=${@:-"$_Dbg_last_print_args"}
+ local -r dq_expr=$(_Dbg_esc_dq "$_Dbg_expr")
+ . ${_Dbg_libdir}/dbg-set-d-vars.inc
+ eval "_Dbg_msg $_Dbg_expr"
+ _Dbg_last_print_args="$dq_expr"
+}
+
+# Restart script in same way with saved arguments (probably the same
+# ones as we were given before).
+_Dbg_cmd_restart() {
+
+ _Dbg_cleanup;
+
+ local script_args
+ if (( $# != 0 )) ; then
+ script_args="$@"
+ else
+ script_args="${_Dbg_script_args[@]}"
+ fi
+
+ local exec_cmd="$0 $script_args";
+ if [[ $_Dbg_script != 1 ]] ; then
+ [ -z "$BASH" ] && BASH='bash'
+ if [ $_cur_source_file == $_Dbg_bogus_file ] ; then
+ script_args="--debugger -c \"$BASH_EXECUTION_STRING\""
+ exec_cmd="$BASH --debugger -c \"$BASH_EXECUTION_STRING\"";
+ else
+ exec_cmd="$BASH --debugger $0 $script_args";
+ fi
+ fi
+
+ if (( _Dbg_basename_only )) ; then
+ _Dbg_msg "Restarting with: $script_args"
+ else
+ _Dbg_msg "Restarting with: $exec_cmd"
+ fi
+
+ # If we are in a subshell we need to get out of those levels
+ # first before we restart. The strategy is to write into persistent
+ # storage the restart command, and issue a "quit." The quit should
+ # discover the restart at the last minute and issue the restart.
+ if (( BASH_SUBSHELL > 0 )) ; then
+ _Dbg_msg "Note you are in a subshell. We will need to leave that first."
+ _Dbg_write_journal "BASHDB_RESTART_COMMAND=\"$exec_cmd\""
+ _Dbg_cmd_quit 0
+ fi
+ _Dbg_save_state
+ exec $exec_cmd
+}
+
+# Handle command-file source. If the filename's okay we just increase the
+# input-file descriptor by one and redirect input which will
+# be picked up in next debugger command loop.
+_Dbg_cmd_source() {
+ local filename
+ if [[ -z "$1" ]] ; then
+ _Dbg_msg "Need to give a filename for the source command"
+ return
+ fi
+ _Dbg_glob_filename $1
+ if [ "$filename" != '/dev/stdin' ] && [[ ! -f $filename ]] ; then
+ _Dbg_msg "Source file $filename does not exist as a regular file."
+ return
+ fi
+ if [[ -r $filename ]] ; then
+ ((_Dbg_input_desc++))
+ _Dbg_input[$_Dbg_input_desc]=$filename
+ local _Dbg_redirect_cmd="exec $_Dbg_input_desc<$filename"
+ eval $_Dbg_redirect_cmd
+ else
+ _Dbg_msg "Source file $filename is not readable."
+ fi
+}
+
+# toggle execution trace feature
+_Dbg_cmd_trace() {
+ ((_trace=!$_trace))
+
+ _Dbg_msg "Trace = \c"
+ let " $_trace" && _Dbg_msg "on" || _Dbg_msg "off"
+}
+
+# Set output tty
+_Dbg_cmd_tty() {
+ if [[ -z "$1" ]] ; then
+ _Dbg_msg "Argument required (terminal name for running target process)."
+ return 1
+ fi
+ if ! $(touch $1 >/dev/null 2>/dev/null); then
+ _Dbg_msg "Can't access $1 for writing."
+ return 1
+ fi
+ if [[ ! -w $1 ]] ; then
+ _Dbg_msg "tty $1 needs to be writable"
+ return 1
+ fi
+ _Dbg_tty=$1
+ return 0
+}
+
+_Dbg_cmd_x() {
+ local -r _Dbg_expr=${@:-"$_Dbg_last_x_args"}
+ local _Dbg_result
+ if (( `_Dbg_is_var $_Dbg_expr` )) ; then
+ _Dbg_result=`declare -p $_Dbg_expr`
+ _Dbg_msg "$_Dbg_result"
+ elif (( `_Dbg_is_function $_Dbg_expr` )) ; then
+ _Dbg_result=`declare -f $_Dbg_expr`
+ _Dbg_msg "$_Dbg_result"
+ else
+ local -i _Dbg_rc
+ eval let _Dbg_result=$_Dbg_expr 2>/dev/null; _Dbg_rc=$?
+ if (( $_Dbg_rc != 0 )) ; then
+ _Dbg_cmd_print "$_Dbg_expr"
+ else
+ _Dbg_msg "$_Dbg_result"
+ fi
+ fi
+ _Dbg_last_x_args="$_Dbg_x_args"
+}
+
+_Dbg_save_state() {
+ _Dbg_statefile=`_Dbg_tempname statefile`
+ echo "" > $_Dbg_statefile
+ _Dbg_save_breakpoints
+ _Dbg_save_actions
+ _Dbg_save_watchpoints
+ _Dbg_save_display
+ _Dbg_save_Dbg_set
+ echo "unset BASHDB_RESTART_FILE" >> $_Dbg_statefile
+ echo "rm $_Dbg_statefile" >> $_Dbg_statefile
+ export BASHDB_RESTART_FILE="$_Dbg_statefile"
+ _Dbg_write_journal "export BASHDB_RESTART_FILE=\"$_Dbg_statefile\""
+
+}
+
+
+_Dbg_save_Dbg_set() {
+ declare -p _Dbg_basename_only >> $_Dbg_statefile
+ declare -p _Dbg_debug_debugger >> $_Dbg_statefile
+ declare -p _Dbg_edit >> $_Dbg_statefile
+ declare -p _Dbg_listsize >> $_Dbg_statefile
+ declare -p _Dbg_prompt_str >> $_Dbg_statefile
+ declare -p _Dbg_show_command >> $_Dbg_statefile
+}
+
+_Dbg_restore_state() {
+ local statefile=$1
+ . $1
+}
+
+# ================== INITIALIZATION =====================================
+
+_Dbg_cmd_source '/dev/stdin'
+
+# List of command files to process
+typeset -a _Dbg_input
+
+# Have we already specified where to read debugger input from?
+# Note: index 0 is only set by bashdb. It is not used otherwise for I/O
+# like those indices >= _Dbg_input_start_desc are.
+if [ -n "$BASHDB_INPUT" ] ; then
+ _Dbg_input=($BASHDB_INPUT)
+ _Dbg_cmd_source ${_Dbg_input[0]}
+ _Dbg_no_init=1
+fi
+
+if [[ -z $_Dbg_no_init && -r ~/.bashdbinit ]] ; then
+ _Dbg_cmd_source ~/.bashdbinit
+fi
+
+# BASHDB_LEVEL is the number of times we are nested inside a debugger
+# by virtue of running "debug" for example.
+if [[ -z "${BASHDB_LEVEL}" ]] ; then
+ export BASHDB_LEVEL=1
+fi
+
+# temp file for internal eval'd commands
+typeset _Dbg_evalfile=`_Dbg_tempname eval`
+
+# File to save information that needs to be passed from a subshell
+# to a parent shell
+typeset _Dbg_journal=`_Dbg_tempname journal`
+if [ ! -f _Dbg_journal ] ; then
+ _Dbg_write_journal "BASHDB_QUIT_LEVELS=0"
+fi
+
+# This is put at the so we have something at the end to stop at
+# when we debug this. By stopping at the end all of the above functions
+# and variables can be tested.
+_Dbg_cmd_ver='$Id: dbg-cmds.inc,v 1.9 2003/08/06 14:21:55 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-file.inc cvs/debugger/dbg-file.inc
--- bash-2.05b/debugger/dbg-file.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-file.inc 2003-08-02 21:54:47.000000000 +0200
@@ -0,0 +1,227 @@
+# Things related to file handling.
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# Directory search patch for unqualified file names
+typeset -a _Dbg_dir=('\$cdir' '\$cwd' )
+
+# Directory in which the script is located
+typeset -r _Dbg_cdir=${_Dbg_source_file%/*}
+
+_Dbg_resolve_expand_filename() {
+ local find_file=$1
+
+ if [[ -z "$find_file" ]] ; then
+ _Dbg_msg "Internal debug error: null file to find"
+ echo ''
+ return 1
+ fi
+
+ if [[ ${find_file:0:1} == '/' ]] ; then
+ echo "$find_file"
+ return 0
+ elif [[ ${find_file:0:1} == '.' ]] ; then
+ # Relative file name
+ find_file=$(_Dbg_expand_filename $find_file)
+ echo "$find_file"
+ return 0
+ else
+ # Resolve file using _Dbg_dir
+ local -i n=${#_Dbg_dir[@]}
+ local -i i
+ for (( i=0 ; i < n; i++ )) ; do
+ local basename="${_Dbg_dir[i]}"
+ if [[ $basename == '$cdir' ]] ; then
+ basename=$_Dbg_cdir
+ elif [[ $basename == '$cwd' ]] ; then
+ basename=$(pwd)
+ fi
+ if [[ -f "$basename/$find_file" ]] ; then
+ echo "$basename/$find_file"
+ return 0
+ fi
+ done
+ fi
+ echo ""
+ return 1
+}
+
+# _Dbg_is_file echoes the full filename if $1 is a filename found in files
+# '' is echo'd if no file found.
+_Dbg_is_file() {
+ local find_file=$1
+
+ if [[ -z "$find_file" ]] ; then
+ _Dbg_msg "Internal debug error: null file to find"
+ echo ''
+ return
+ fi
+
+ if [[ ${find_file:0:1} == '/' ]] ; then
+ # Absolute file name
+ for try_file in ${_Dbg_filenames[@]} ; do
+ if [[ $try_file == $find_file ]] ; then
+ echo "$try_file"
+ return
+ fi
+ done
+ elif [[ ${find_file:0:1} == '.' ]] ; then
+ # Relative file name
+ find_file=$(_Dbg_expand_filename $find_file)
+ for try_file in ${_Dbg_filenames[@]} ; do
+ if [[ $try_file == $find_file ]] ; then
+ echo "$try_file"
+ return
+ fi
+ done
+ else
+ # Resolve file using _Dbg_dir
+ for try_file in ${_Dbg_filenames[@]} ; do
+ local pathname
+ local -i n=${#_Dbg_dir[@]}
+ local -i i
+ for (( i=0 ; i < n; i++ )) ; do
+ local basename="${_Dbg_dir[i]}"
+ if [[ $basename == '$cdir' ]] ; then
+ basename=$_Dbg_cdir
+ elif [[ $basename == '$cwd' ]] ; then
+ basename=$(pwd)
+ fi
+ if [[ "$basename/$find_file" == $try_file ]] ; then
+ echo "$try_file"
+ return
+ fi
+ done
+ done
+ fi
+ echo ""
+}
+
+# Turn filename $1 into something that is safe to use as a variable name
+_Dbg_file2var() {
+ local filename=$(_Dbg_expand_filename $1)
+ local varname=`builtin echo $filename | tr '=~+%* .?/"[]<>-' 'ETPpABDQSqLRlGM'`
+ builtin echo $varname
+}
+
+# $1 contains the name you want to glob. return 1 if exists and is
+# readible or 0 if not.
+# The result will be in variable $filename which is assumed to be
+# local'd by the caller
+_Dbg_glob_filename() {
+ local cmd="filename=`expr $1`"
+ eval $cmd
+}
+
+# Either fill out or strip filename as determined by "basename_only"
+# and annotate settings
+_Dbg_adjust_filename() {
+ local -r filename="$1"
+ if (( _Dbg_annotate == 1 )) ; then
+ echo `_Dbg_resolve_expand_filename $filename`
+ elif ((_Dbg_basename_only)) ; then
+ echo ${filename##*/}
+ else
+ echo $filename
+ fi
+}
+
+# Return the maximum line in $1
+_Dbg_get_maxline() {
+ # set -x
+ local -r filename=$1
+ local -r filevar=`_Dbg_file2var $filename`
+ local is_read=`_Dbg_get_assoc_scalar_entry "_Dbg_read_" $filevar`
+ [ $is_read ] || _Dbg_readin $filename
+ echo `_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $filevar`
+ # set +x
+}
+
+# Check that line $2 is not greater than the number of lines in
+# file $1
+_Dbg_check_line() {
+ local -ir line_number=$1
+ local filename=$2
+ local -i max_line=`_Dbg_get_maxline $filename`
+ if (( $line_number > max_line )) ; then
+ (( _Dbg_basename_only )) && filename=${filename##*/}
+ _Dbg_msg "Line $line_number is too large." \
+ "File $filename has only $max_line lines."
+ return 1
+ fi
+ return 0
+}
+
+# Create temporary file based on $1
+# file $1
+_Dbg_tempname() {
+ echo "$_Dbg_tmpdir/bashdb$1$$"
+}
+
+# append a command into journal file and then run the command.
+_Dbg_write_journal_eval() {
+ _Dbg_write_journal "$*"
+ eval "$*"
+}
+
+# append a command into journal file and then run the command.
+_Dbg_write_journal_var() {
+ local var_name=$1
+ local val
+ local val_cmd="$val=\${$var_name}"
+ eval $val_cmd
+ _Dbg_write_journal "${var_name}=${val}"
+}
+
+_Dbg_write_journal_avar() {
+ local decl_str=$(declare -p $1)
+ local -a decl_a=($decl_str)
+ local -a decl_a2=${decl_a[@]:2}
+ _Dbg_write_journal ${decl_a2[@]}
+}
+
+# Append a command into journal file. But we only need to do
+# if we are in a subshell.
+_Dbg_write_journal() {
+ if (( $BASH_SUBSHELL != 0 )) ; then
+ echo "$@" >> ${_Dbg_journal} 2>/dev/null
+ fi
+ # return $?
+}
+
+# Remove all journal files.
+_Dbg_erase_journals() {
+ rm ${_Dbg_journal} 2>/dev/null
+}
+
+# read in or "source" in journal file which will set variables.
+_Dbg_source_journal() {
+
+ if [ -r $_Dbg_journal ] ; then
+ . $_Dbg_journal
+ (( BASH_SUBSHELL == 0 )) && _Dbg_erase_journals
+ fi
+}
+
+# This is put at the so we have something at the end when we debug this.
+typeset -r _Dbg_file_ver=\
+'$Id: dbg-file.inc,v 1.11 2003/08/02 19:54:47 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-fns.inc cvs/debugger/dbg-fns.inc
--- bash-2.05b/debugger/dbg-fns.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-fns.inc 2003-04-30 02:22:55.000000000 +0200
@@ -0,0 +1,301 @@
+# dbg-fns.inc - Bourne Again Shell Debugger Utility Functions
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# Come here via DEBUG trap after each statement in script.
+# This determines if we need to stop and go into the debugger
+# command loop or not.
+
+# Add escapes to a string $1 so that when it is read back via "$1"
+# it is the same as $1.
+_Dbg_esc_dq() {
+ builtin echo $1 | sed -e 's/[`$\"]/\\\0/g'
+}
+
+# Set $? to $1 if supplied or the saved entry value of $?.
+_Dbg_set_dol_q () {
+ return ${1:-$_Dbg_debugged_exit_code}
+}
+
+# Split $2 using $1 as the split character. We accomplish this by
+# temporarily resetting the variable IFS (input field separator).
+#
+# Example:
+# local -a a=($(_Dbg_split ":" "file:line"))
+# a[0] will have file and a{1] will have line.
+
+_Dbg_split (){
+ local old_IFS=$IFS
+ local new_ifs=${1:-' '}
+ shift
+ local -r text=$*
+ local -a array
+ IFS="$new_ifs"
+ array=( $text )
+ echo ${array[@]}
+ IFS=$old_IFS
+}
+
+# Return value of eval($1$2). Until bash has associative arrays,
+# this is how we simulate such a datatype. In Perl this would be returning
+# the value of $1{$2}.
+
+_Dbg_get_assoc_scalar_entry() {
+# set -xv
+ local prefix=$1
+# echo "${BASH_SOURCE[1]}:${BASH_LINENO[1]} ${FUNCNAME[1]}"
+ local entry=$2
+ local cmd="echo \$${prefix}${entry}"
+ eval $cmd
+# set +xv
+}
+
+# Set eval($1$2)=$2. Until bash has associative arrays,
+# this is how we simulate such a datatype. In Perl this would be
+# $1{$2}=$3.
+
+_Dbg_set_assoc_scalar_entry() {
+# set -xv
+ local prefix=$1
+ local entry=$2
+ local value=$3
+ local cmd="${prefix}${entry}=$value"
+ eval $cmd
+
+ local dq_value=$(_Dbg_esc_dq "$value")
+ _Dbg_write_journal "${prefix}${entry}=\"$dq_value\""
+
+# set +xv
+}
+
+# Return value of eval($1[$2]). If $2 is omitted, use _curline. Until
+# bash has associative arrays which can contain array elements this is
+# how we simulate such a datatype.
+
+_Dbg_get_assoc_array_entry() {
+ local prefix=$1
+ local lineno=${2:-$_curline}
+
+ [[ -z $prefix ]] && _Dbg_msg "Internal debug error (gae) bad prefix"
+ local entry="$prefix[$lineno]"
+ local cmd="echo \"\${$entry}\""
+ eval $cmd
+}
+
+# Evaluate eval($1[$2]=$3). If $2 is omitted, use _curline. Until
+# bash has associative arrays cich can contain array elements this is
+# how we simulate such a datatype.
+
+_Dbg_set_assoc_array_entry() {
+# set -xv
+ local prefix=$1
+ local lineno=$2
+ shift; shift
+ local value=$*
+
+ [[ -z "$prefix" ]] && _Dbg_msg "Internal debug error (sae1) bad prefix"
+ [[ -z "$lineno" ]] && _Dbg_msg "Internal debug error (sae2) bad lineno"
+ [[ -z "$value" ]] && _Dbg_msg "Internal debug error (sae3) bad value"
+
+ local entry="$prefix[$lineno]"
+ local cmd="$entry=\"$value\""
+ eval $cmd
+
+ local dq_value=$(_Dbg_esc_dq "$value")
+ _Dbg_write_journal "$entry=\"$dq_value\""
+
+# set +xv
+}
+
+# _Dbg_is_var echoes 1 if $1 is a defined variable or 0 otherwise.
+_Dbg_is_var() {
+ declare -p $1 >/dev/null 2>&1
+ if [[ $? != 0 ]] ; then
+ echo 0
+ else
+ echo 1
+ fi
+}
+
+# _Dbg_is_function echoes 1 if $1 is a defined function or 0 otherwise.
+# if $2 is nonzero, system functions, i.e. those whose name starts with
+# an underscore (_), are included in the search.
+_Dbg_is_function() {
+ local needed_fn=$1
+ if [[ -z $needed_fn ]] ; then
+ echo 0
+ return;
+ fi
+ local -i include_system=$2
+ local -a fns_a=(`declare -F`)
+ local -i i
+
+ # Iterate skipping over consecutive single tokens "declare" and "-F"
+ for (( i=2; (( i < ${#fns_a[@]} )) ; i += 3 )) ; do
+ local fn="${fns_a[$i]}"
+ [[ $fn == _* ]] && (( ! $include_system )) && continue
+ if [[ $needed_fn == $fn ]] ; then
+ echo 1
+ return
+ fi
+ done
+ echo 0
+}
+
+# _get_function echoes a list of all of the functions.
+# if $1 is nonzero, system functions, i.e. those whose name starts with
+# an underscore (_), are included in the search.
+# FIXME add parameter search pattern.
+_Dbg_get_functions() {
+ local -i include_system=${1:-0}
+ local pat=${2:-*}
+ local -a fns_a=(`declare -F`)
+ local -a ret_fns=()
+ local -i i
+ local -i invert=0;
+
+ if [[ $pat == !* ]] ; then
+ # Remove leading !
+ pat=$(echo $pat | cut -c2-)
+ invert=1
+ fi
+
+ # Iterate skipping over consecutive single tokens "declare" and "-F"
+ for (( i=2; (( i < ${#fns_a[@]} )) ; i += 3 )) ; do
+ local fn="${fns_a[$i]}"
+ [[ $fn == _* ]] && (( ! $include_system )) && continue
+ if [[ $fn == $pat ]] ; then
+ [[ $invert == 0 ]] && ret_fns[${#ret_fns[@]}]=$fn
+ else
+ [[ $invert != 0 ]] && ret_fns[${#ret_fns[@]}]=$fn
+ fi
+
+ done
+ echo ${ret_fns[@]}
+}
+
+# Parse linespec in $1 which should be one of
+# int
+# file:line
+# function-num
+# Return tuple (line, filename)
+# We return the line number first since that can't have embedded blanks.
+_Dbg_parse_linespec() {
+ local linespec=$1
+ eval "$_seteglob"
+ case "$linespec" in
+
+ # line number only - use _cur_source_file for filename
+ $int_pat )
+ echo "$linespec $_cur_source_file"
+ ;;
+
+ # file:line
+ [^:][^:]*[:]$int_pat )
+ local -a word=($(_Dbg_split ":" $linespec))
+ echo "${word[1]} ${word[0]}"
+ ;;
+
+ # Function name or error
+ * )
+ if [[ 1 == `_Dbg_is_function $linespec $_Dbg_debug_debugger` ]]; then
+ local -a word=(`declare -F $linespec`)
+ echo "${word[1]} ${word[2]}"
+ else
+ echo ""
+ fi
+ ;;
+ esac
+}
+
+# usage _Dbg_set_ftrace [-u] funcname [funcname...]
+# Sets or unsets a function for stopping by setting
+# the -t or +t property to the function declaration.
+#
+_Dbg_set_ftrace() {
+ local opt=-t tmsg="enabled" func
+ if [[ $1 == -u ]]; then
+ opt=+t
+ tmsg="disabled"
+ shift
+ fi
+ for func; do
+ declare -f $opt $func
+ # _Dbg_msg "Tracing $tmsg for function $func"
+ done
+}
+
+# Do things for debugger entry. Set some global debugger variables
+# Remove trapping ourselves.
+# We assume that we are nested two calls deep from the point of debug
+# or signal fault. If this isn't the constant 2, then consider adding
+# a parameter to this routine.
+
+_Dbg_set_debugger_entry() {
+
+ # Nuke DEBUG trap
+ trap '' DEBUG
+
+ _cur_fn=${FUNCNAME[2]}
+ let _curline=${BASH_LINENO[1]}
+ ((_curline < 1)) && let _curline=1
+
+ _Dbg_old_IFS="$IFS"
+ IFS="$_Dbg_space_IFS";
+ _cur_source_file=${BASH_SOURCE[2]:-$_Dbg_bogus_file}
+ _cur_source_file="`_Dbg_expand_filename $_cur_source_file`"
+ _cur_filevar="`_Dbg_file2var $_cur_source_file`"
+ _Dbg_stack_pos=$_Dbg_stack_top
+ _Dbg_listline=_curline
+
+ # echo "-- ${_cur_source_file}:$_curline"
+
+ PS4=$_cur_source_file
+}
+
+# Does things to do just before leaving debugger command loop and
+# returning to the debugged program.
+# $1 is 1 if we have called bashdb_set_debugger_entry and saved various
+# variables.
+_Dbg_set_to_return_from_debugger() {
+ _Dbg_rc=$?
+
+ if (( $1 != 0 )) ; then
+ _Dbg_last_bash_command="$_Dbg_bash_command"
+ _Dbg_last_curline="$_curline"
+ _Dbg_last_source_file="$_cur_source_file"
+ else
+ _Dbg_last_curline==${BASH_LINENO[1]}
+ _Dbg_last_source_file=${BASH_SOURCE[2]:-$_Dbg_bogus_file}
+ _Dbg_last_bash_command="**unsaved _bashdb command**"
+ fi
+
+ trap '_Dbg_debug_trap_handler 0 "$BASH_COMMAND" "$@"' DEBUG
+
+ IFS="$_Dbg_space_IFS";
+ set -$_Dbg_old_set_opts
+ IFS="$_Dbg_old_IFS";
+}
+
+# This is put at the so we have something at the end when we debug this.
+typeset -r _Dbg_fns_ver=\
+'$Id: dbg-fns.inc,v 1.5 2003/04/30 00:22:55 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-help.inc cvs/debugger/dbg-help.inc
--- bash-2.05b/debugger/dbg-help.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-help.inc 2003-08-02 22:20:40.000000000 +0200
@@ -0,0 +1,713 @@
+# dbg-help.inc - Bourne Again Shell Debugger Help Routines
+
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# print help command
+_Dbg_cmd_help() {
+
+ local -r db_cmd=$1
+
+ if [[ -n "$db_cmd" ]] ; then
+ case $db_cmd in
+ !! | sh | she | shell )
+ _Dbg_msg \
+"!! cmd [args] Execute shell \"cmd\" \"args\". Alias: shell."
+ return ;;
+ '#' )
+ _Dbg_msg \
+"# Comment - ignore line. Maybe useful in command scripts."
+ return ;;
+ . )
+ _Dbg_msg \
+". List current window of lines."
+ return ;;
+ / )
+ _Dbg_msg \
+"/pat/ Search forward for pat. Trailing / is optional.
+ Long command name: search or forward."
+ return ;;
+ '?'/ )
+ _Dbg_msg \
+"?pat? Search backward for pat. Trailing ? is optional.
+ Long command name: rev or reverse"
+ return ;;
+ - )
+ _Dbg_msg \
+"- List previous window of lines."
+ return ;;
+ A )
+ _Dbg_msg \
+"A Delete all actions"
+ return ;;
+ D | deleteall )
+ _Dbg_msg \
+"D Delete all breakpoints"
+ return ;;
+ H )
+ _Dbg_msg \
+"H [from [to]] List debugger history. If no arguments given list all history.
+H -count If a single postive integer is given, then list starting from
+![-]num:p that number. If a single negative integer is given list that
+ many history items. If second argument is given then list down
+ to that history number.
+ An alternate form is !n:p or !-n:p where n is an
+ integer. If a minus sign is used, you go back num from the end
+ rather than specify an absolute history number"
+ return ;;
+ L )
+ _Dbg_msg \
+"L List all breakpoints."
+ return ;;
+ R | re | res | rest | resta | restar | restart )
+ _Dbg_msg \
+"R [args] Attempt to restart the program.
+ The source code is reread and breakpoint information is lost.
+ The command arguments used on the last invocation are used if
+ args is empty. If arguments were given, they are passed to the
+ program. If running via the bashdb script and you want to
+ change arguments you also need to include those arguments
+ to the bashdb script. Long command name: restart. Alias: run."
+ return ;;
+ S )
+ _Dbg_msg \
+"S [[!]pattern] List subroutine names [not] matching bash pattern. If no
+ pattern is given, all subroutines are listed. (The pattern
+ is *)."
+ return ;;
+ T | wh | whe | wher | where | bt| back | backtrace )
+ _Dbg_msg \
+"T [n] Stack trace of calling functions or sourced files,
+ line numbers, and files. If n is given, list only n lines.
+ Long command name: where or backtrace."
+ return ;;
+ a )
+ _Dbg_msg \
+"a [linespec] stmt Perform stmt on reaching linespec."
+ return ;;
+ b | br | bre | brea | break )
+ _Dbg_msg \
+"b [linespec] Break on linespec. If no argument is given, us the current
+ line. Long command name: break."
+ return ;;
+ c | cont | conti |contin |continu | continue )
+ _Dbg_msg \
+"c [linespec] Continue execution until the next breakpoint or end of
+ program or linespec. Long command name: continue."
+ return ;;
+ cond | condi |condit |conditi | conditio | condition )
+ _Dbg_msg \
+"cond N COND Specify breakpoint number N to break only if COND is true.
+N is an integer and COND is an expression to be evaluated whenever
+breakpoint N is reached. Long command name: condition."
+ return ;;
+ d | cl | cle | clea | clea | clear )
+ _Dbg_msg \
+"cl [linespec] Clear breakpoint at specified line-spec. If no line given, use
+ the current line. All breakpoints in that line are cleared.
+ Long command name: clear."
+ return ;;
+ de | del | dele | delet | delete )
+ _Dbg_msg \
+"d {num}.. Delete the breakpoint entry or entries.
+ Long command name: delete."
+ return ;;
+ deb | debu | debug )
+ _Dbg_msg \
+"deb [script] Set up [script] for debugging. If no script is given, take
+ the script name from the command to be executed.
+ Long command name: debug."
+ return ;;
+ di | dis | disa | disab | disabl | disable )
+ _Dbg_msg \
+"di {n}... Disable breakpoint entry/entries. Long command name: disable."
+ return ;;
+ disp | displ | displa | display )
+ _Dbg_msg \
+"disp {n} Set display expression or list all display expressions.
+ Long command name: display."
+ return ;;
+ do | dow | down )
+ _Dbg_msg \
+"down [count] Set file location for printing down the call stack by
+ count. If count is omitted use 1."
+ return ;;
+ e | ev | eva )
+ _Dbg_msg \
+"e bash-cmd Evaluate a bash command by sourcing it in a subshell. Long
+ command name: eval."
+ return ;;
+ en | ena | enab | enabl | enable )
+ _Dbg_msg \
+"en {n}... Enable breakpoint entry/entries. Long command name: enable."
+ return ;;
+ r | fi | fin| fini | finis | finish )
+ _Dbg_msg \
+"r Execute until the current function or source file returns.
+ Long command name: finish."
+ return ;;
+ ha | han | hand | handl | handle )
+ _Dbg_msg \
+"ha sig {stop|nostop|stack|nostack|print|noprint}
+ Specify how to handle a signal. Args are signals and
+ actions to apply to those signals. Symbolic signals
+ (e.g. SIGSEGV) are recommended but numeric signals are
+ allowed too. Recognized actions include \"stop\",
+ \"nostop\", \"print\", and \"noprint\". Stop means
+ reenter debugger if this signal happens. Print means
+ print a message if this signal happens. Long command
+ name: handle."
+ return ;;
+
+ hi | his | hist | histo | histor | history )
+ _Dbg_msg \
+"hi n Rerun a debugger command from the debugger history. See also
+![-]n H to list the history. An alternname form is !n or !-n. If
+ the minus sign is used you going back n from the end rather
+ than specifying an absolute history number.
+ Long command name: history."
+ return ;;
+ i | in | inf | info )
+ _Dbg_help_info $2
+ return ;;
+ l | li | lis | list )
+ _Dbg_msg \
+"l linespec List window lines starting at linespec.
+l min incr List incr lines starting at 'min' linespec.
+l List next window of lines.
+l . Same as above.
+ Long command name: list."
+ return ;;
+ n | ne | nex | next )
+ _Dbg_msg \
+"n [count] Single steps possibly skipping execution into subroutine calls
+ and sourced files. Performed [count] times default is 1 time.
+ Long command name: next."
+ return ;;
+ p | pr | pri | prin | print )
+ _Dbg_msg \
+"p string Print value of a substituted string via \`echo'. A variable
+ should have leading $ if its value is to be substituted.
+ Long command name: print."
+ return ;;
+ q | qu | qui | quit )
+ _Dbg_msg \
+"q [expr] [n] Terminate execution of the program with return code expr. If
+ expr is missing, use 0. If n is given then we terminate only
+ that many subshells or nested shells. Long name: quit."
+ return ;;
+ ret | retu | retur | return )
+ _Dbg_msg \
+"ret Skip completion of this function or sourced file.
+ Long name: return."
+ return ;;
+ se | set )
+ _Dbg_help_set $2
+ return ;;
+ s | st | ste | step )
+ _Dbg_msg \
+"s [count] Single steps possibly executing into subroutine calls
+ and sourced files. Performed [count] times default is 1 time."
+ return ;;
+ sh | sho | show )
+ _Dbg_help_show $2
+ return ;;
+ sk | ski | skip )
+ _Dbg_msg \
+"sk [count] Skip (don't run) the next [count] command(s) to be executed.
+ Long command name: skip."
+ return ;;
+ so | sou | sour | sourc | source )
+ _Dbg_msg \
+"source file Read in debugger command file."
+ return ;;
+ t | to | tog | togg | toggl | toggle )
+ _Dbg_msg \
+"t | trace Toggle line-execution tracing. Long command name: toggle."
+ return ;;
+ tb | tbr | tbre | tbrea | tbreak )
+ _Dbg_msg \
+"tb [linespec] Set a one-time break on linespec. If no argument is given,
+ us the current line. Long command name: tbreak."
+ return ;;
+ tt | tty )
+ _Dbg_msg \
+"tt tty-name Set the output device for debugger output
+ Long command name: tty."
+ return ;;
+ u | up )
+ _Dbg_msg \
+"u | up [count] Set file location for printing up the call stack by
+ count. If count is omitted use 1."
+ return ;;
+ v | ve | ver | vers | versi | versio | version )
+ _Dbg_msg \
+"M | version Show release version-control IDs of debugger scripts."
+ return ;;
+ w | window )
+ _Dbg_msg \
+"w [linespec] List window around line or current linespec. Long command
+ name: window."
+ return ;;
+ x | examine )
+ _Dbg_msg \
+"x expr Print value of an expression via \'declare', \`let' and then
+ failing these eval. Single variables and arithmetic expression
+ do not need leading $ for their value is to be substituted.
+ However if neither these, variables need $ to have their value
+ substituted. Long command name: examine"
+ return ;;
+ V )
+ _Dbg_msg \
+"V [!][pat] List variables and values for whose variables names which
+ match pat. If ! is used, list variables that *don't* match.
+ If pat is omitted, use * (everything) for the pattern."
+ return ;;
+ We | watche )
+ _Dbg_msg \
+"We [arith] Add watchpoint for expression expr. If no expression is given
+ all watchpoints are deleted. Long command name: watche."
+ return ;;
+ W | wa | wat | watch )
+ _Dbg_msg \
+"W [var] Add watchpoint for variable var. If no expression is given
+ all watchpoints are deleted. Long command name: watch."
+ return ;;
+ * )
+ _Dbg_msg "Undefined command: \"$db_cmd\". Try \"help\"."
+ return ;;
+ esac
+ fi
+
+ _Dbg_msg 'bashdb commands:
+List/search source lines: Control script execution:
+------------------------- -------------------------
+ l [start|.] [cnt] List cnt lines T [n] Stack trace
+ from line start s [n] Single step [n times]
+ l sub List source code fn n [n] Next, steps over subs
+ - or . List previous/current line <CR>/<Enter> Repeat last n or s
+ w [line] List around line c [linespec] Continue [to linespec]
+ f filename View source in file L List all breakpoints
+ /pat/ Search forward for pat b linespec Set breakpoint
+ ?pat? Search backward for pat del [n].. or D Delete a/all breaks
+ by entry number
+Debugger controls: skip skip execution of cmd
+------------------------- cl linespec Delete breakpoints by
+ H [num] Show last num commands line spec
+ q [exp] or ^D Quit returning exp R [args] Attempt a restart
+ info [cmd] Get info on cmd. u [n] Go up stack by n or 1.
+ !n or hi n Run debugger history n do [n] Go down stack by n or 1.
+ h or ? [cmd] Get help on command W [var] Add watchpoint. If no
+ info [cmd] Get info on cmd no expr, delete all
+ show [cmd] Show settings We [expr] Add Watchpoint arith
+ expr
+ so file read in dbg commands t Toggle trace
+ en/di n enable/disable brkpt,
+ set x y set a debugger variable watchpoint, or display
+ e bash-cmd evaluate a bash command tb linespec Add one-time break
+ disp expr add a display expr a linespec cmd eval "cmd" at linespec
+ M Show module versions A delete all actions
+ x expr evaluate expression ret jump out of fn or source
+ (via declare, let, eval) finish execute until return
+ deb debug into another cond n exp set breakpoint condition
+ shell script
+ !! cmd [args] execute shell command "cmd" with "args"
+
+Data Examination: also see e, t, x
+-------------------------
+ p variable Print variable
+ V [[!]pat] List variable(s) matching or not (!) matching pattern pat
+ S [[!]pat] List subroutine names [not] matching pattern pat
+
+Readline command line editing (emacs/vi mode) is available
+For more help, type h <cmd> or consult online-documentation.'
+
+}
+
+_Dbg_help_set() {
+ local -r set_cmd=$1
+ local label=$2
+ local -r subcmds="args annotate basename debugger editing listsize prompt showcommand"
+
+ if [[ -z $set_cmd ]] ; then
+ local thing
+ for thing in $subcmds ; do
+ _Dbg_help_set $thing 1
+ done
+ return
+ fi
+
+ case $set_cmd in
+ ar | arg | args )
+ [[ -n $label ]] && label='set args -- '
+ _Dbg_msg \
+"${label}Set argument list to give program being debugged when it is started.
+Follow this command with any number of args, to be passed to the program."
+ return 0
+ ;;
+ an | ann | anno | annot | annota | annotat | annotate )
+ if [[ -n $label ]] ; then
+ label='set annotate -- '
+ else
+ local post_label='
+0 == normal; 1 == fullname (for use when running under emacs)'
+ fi
+ _Dbg_msg \
+"${label}Set annotation level.$post_label"
+ return 0
+ ;;
+ b | ba | bas | base | basen | basena | basenam | basename )
+ [[ -n $label ]] && label='set basename -- '
+ local onoff="off."
+ (( $_Dbg_basename_only != 0 )) && onoff='on.'
+ _Dbg_msg \
+"${label}Set short filenames (the basename) in debug output is" $onoff
+ return 0
+ ;;
+ d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
+ local onoff=${1:-'on'}
+ [[ -n $label ]] && label='set debugger -- '
+ local onoff="off."
+ (( $_Dbg_debug_debugger )) && onoff='on.'
+ _Dbg_msg \
+"${label}Set debugging the debugger is" $onoff
+ return 0
+ ;;
+ e | ed | edi | edit | editi | editin | editing )
+ [[ -n $label ]] && label='set editing -- '
+ local onoff="off."
+ (( $_Dbg_edit )) && onoff='on.'
+ _Dbg_msg \
+"${label}Set editing of command lines as they are typed is" $onoff
+ ;;
+ l | li | lis | list | lists | listsi | listsiz | listsize )
+ [[ -n $label ]] && label='set listsize -- '
+ _Dbg_msg \
+"${label}Set number of source lines bashdb will list by default."
+ ;;
+ p | pr | pro | prom | promp | prompt )
+ [[ -n $label ]] && label='set prompt -- '
+ _Dbg_msg \
+"${label}bashdb's prompt is:\n" \
+" \"$_Dbg_prompt_str\"."
+ return 0
+ ;;
+ sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand )
+ [[ -n $label ]] && label='set showcommand -- '
+ _Dbg_msg \
+"${label}Set showing the command to execute is $_Dbg_show_command."
+ return 0
+ ;;
+ * )
+ _Dbg_msg \
+"There is no \"set $set_cmd\" command."
+ esac
+}
+
+_Dbg_help_show() {
+ local -r show_cmd=$1
+ local -r subcmds="args annotate basename debugger commands copying debugger directories listsize prompt warranty"
+
+ if [[ -z $show_cmd ]] ; then
+ local thing
+ for thing in $subcmds ; do
+ _Dbg_help_show $thing 1
+ done
+ return
+ fi
+
+ case $show_cmd in
+ ar | arg | args )
+ _Dbg_msg \
+"show args -- Show argument list to give program being debugged when it
+ is started"
+ return 0
+ ;;
+ an | ann | anno | annot | annota | annotat | annotate )
+ _Dbg_msg \
+"show annotate -- Show annotation_level"
+ return 0
+ ;;
+ b | ba | bas | base | basen | basena | basenam | basename )
+ _Dbg_msg \
+"show basename -- Show if we are are to short or long filenames"
+ return 0
+ ;;
+ com | comm | comma | comman | command | commands )
+ _Dbg_msg \
+"show commands -- Show the history of commands you typed"
+ ;;
+ cop | copy| copyi | copyin | copying )
+ _Dbg_msg \
+"show copying -- Conditions for redistributing copies of debugger"
+ ;;
+ d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
+ _Dbg_msg \
+"show debugger -- Show if we are set to debug the debugger"
+ return 0
+ ;;
+ di|dir|dire|direc|direct|directo|director|directori|directorie|directories)
+ _Dbg_msg \
+"show directories -- Show if we are set to debug the debugger"
+ ;;
+ l | li | lis | list | lists | listsi | listsiz | listsize )
+ _Dbg_msg \
+"show listsize -- Show number of source lines debugger will list by default"
+ ;;
+ p | pr | pro | prom | promp | prompt )
+ _Dbg_msg \
+"show prompt -- Show debugger's prompt"
+ return 0
+ ;;
+ w | wa | war | warr | warra | warran | warrant | warranty )
+ _Dbg_msg \
+"show warranty -- Various kinds of warranty you do not have"
+ return 0
+ ;;
+ * )
+ _Dbg_msg \
+ "Undefined show command: \"$show_cmd\". Try \"help show\"."
+ esac
+}
+
+_Dbg_help_info() {
+ local -r info_cmd=$1
+ local label=$2
+ local -r subcmds="args breakpoints display files functions signals source stack terminal variables warranty"
+
+ if [[ -z $info_cmd ]] ; then
+ local thing
+ _Dbg_msg \
+"List of info subcommands:
+"
+ for thing in $subcmds ; do
+ _Dbg_help_info $thing 1
+ done
+ return
+ fi
+
+ case $info_cmd in
+ ar | arg | args )
+ _Dbg_msg \
+"info args -- \$1, \$2, and so on"
+ return 0
+ ;;
+ b | br | bre | brea | 'break' | breakp | breakpo | breakpoints | \
+ w | wa | wat | watc | 'watch' | watchp | watchpo | watchpoints )
+ _Dbg_msg \
+"info breakpoints -- Status of user-settable breakpoints"
+ return 0
+ ;;
+ disp | displ | displa | display )
+ _Dbg_msg \
+"info display -- Show all display expressions"
+ return 0
+ ;;
+ fi | file| files | sources )
+ _Dbg_msg \
+"info files -- Source files in the program"
+ return 0
+ ;;
+ fu | fun| func | funct | functi | functio | function | functions )
+ _Dbg_msg \
+"info functions -- All function names"
+ return 0
+ ;;
+ h | ha | han | hand | handl | handle | \
+ si | sig | sign | signa | signal | signals )
+ _Dbg_msg \
+"info signals -- What debugger does when program gets various signals"
+ return 0
+ ;;
+ so | sou | sourc | source )
+ _Dbg_msg \
+"info source -- Information about the current source file"
+ return 0
+ ;;
+ st | sta | stac | stack )
+ _Dbg_msg \
+"info stack -- Backtrace of the stack"
+ return 0
+ ;;
+ te | ter | term | termi | termin | termina | terminal | tt | tty )
+ _Dbg_msg \
+"info terminal -- Print terminal device"
+ return 0
+ ;;
+ tr|tra|trac|trace|tracep | tracepo | tracepoi | tracepoint | tracepoints )
+ _Dbg_msg \
+"info tracepoints -- Status of tracepoints"
+ return 0
+ ;;
+ v | va | var | vari | varia | variab | variabl | variable | variables )
+ _Dbg_msg \
+"info variables -- All global and static variable names"
+ return 0
+ ;;
+ w | wa | war | warr | warra | warran | warrant | warranty )
+ _Dbg_msg \
+"info warranty -- Various kinds of warranty you do not have"
+ return 0
+ ;;
+ * )
+ _Dbg_msg \
+ "Undefined info command: \"$info_cmd\". Try \"help info\"."
+ esac
+}
+_Dbg_cmd_info() {
+ local -r info_cmd=$1
+ local -ar subcmds=( args breakpoints display files functions source sources \
+ stack terminal variables watchpoints )
+
+ if [[ $info_cmd != '' ]] ; then
+ shift
+ case $info_cmd in
+ a | ar | arg | args )
+ local -i i
+ for (( i=1 ; i<=${#ARG[@]} ; i++ )) ; do
+ _Dbg_printf "$%d = %s" $i ${ARG[$i]}
+ done
+ return
+ ;;
+ b | br | bre | brea | 'break' | breakp | breakpo | breakpoints | \
+ w | wa | wat | watc | 'watch' | watchp | watchpo | watchpoints )
+ _Dbg_cmd_list_brkpt $*
+ _Dbg_list_watch $*
+ return
+ ;;
+
+ d | di | dis| disp | displ | displa | display )
+ _Dbg_cmd_list_display $*
+ return
+ ;;
+
+ fi | file| files | sources )
+ for file in ${_Dbg_filenames[@]} ; do
+ (( _Dbg_basename_only )) && file=${file##*/}
+ _Dbg_msg "$file" ;
+ done
+ return
+ ;;
+
+ fu | fun| func | funct | functi | functio | function | functions )
+ _Dbg_cmd_list_subroutines $*
+ return
+ ;;
+
+ h | ha | han | hand | handl | handle | \
+ si | sig | sign | signa | signal | signals )
+ _Dbg_info_signals
+ return
+ ;;
+
+ so | sou | sourc | source )
+ _Dbg_msg "Current script file is $_cur_source_file"
+ local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $_cur_filevar`
+ _Dbg_msg "Contains $max_line lines." ;
+ return
+ ;;
+
+ st | sta | stac | stack )
+ _Dbg_cmd_stack_trace 1 $*
+ return
+ ;;
+ te | ter | term | termi | termin | termina | terminal | tt | tty )
+ _Dbg_msg "tty: $_Dbg_tty"
+ return;
+ ;;
+ v | va | var | vari | varia | variab | variabl | variable | variables )
+ _Dbg_cmd_list_variables "$1"
+ return
+ ;;
+ w | wa | war | warr | warra | warran | warrant | warranty )
+ _Dbg_msg "
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+"
+ return
+ ;;
+ *)
+ _Dbg_msg "Unknown subcommand: $info_cmd"
+ esac
+ fi
+ _Dbg_msg "Info subcommands are: ${subcmds[@]}"
+}
+
+# List signal handlers in effect.
+_Dbg_info_signals() {
+ local -i i=0
+ local signal_name
+ local handler
+ local stop_flag
+ local print_flag
+
+ _Dbg_msg "Signal Stop Print Stack Value"
+ _Dbg_printf_nocr "%-12s %-6s %-7s %-9s " EXIT \
+ ${_Dbg_sig_stop[0]:-nostop} ${_Dbg_sig_print[0]:-noprint} \
+ ${_Dbg_sig_show_stack[0]:-nostack}
+
+ # This is a horrible hack, but I can't figure out how to get
+ # trap -p 0 into a variable; handler=`trap -p 0` doesn't work.
+ if [[ -n $_Dbg_tty ]] ; then
+ builtin trap -p 0 >>$_Dbg_tty
+ else
+ builtin trap -p 0
+ fi
+
+ while [ 1 ] ; do
+ signal_name=`builtin kill -l $i 2>/dev/null`
+ if (( $? != 0 )) ; then
+ break
+ fi
+ handler=`builtin trap -p $i`
+ if [[ -n $handler ]] ; then
+ _Dbg_printf "%-12s %-6s %-7s %-9s %-6s" $signal_name \
+ ${_Dbg_sig_stop[$i]:-nostop} ${_Dbg_sig_print[$i]:-noprint} \
+ ${_Dbg_sig_show_stack[$i]:-nostack} "$handler"
+ fi
+ ((i++))
+ done
+}
+
+# This is put at the so we have something at the end to stop at
+# when we debug this. By stopping at the end all of the above functions
+# and variables can be tested.
+typeset -r _Dbg_help_ver=\
+'$Id: dbg-help.inc,v 1.9 2003/08/02 20:20:40 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-hist.inc cvs/debugger/dbg-hist.inc
--- bash-2.05b/debugger/dbg-hist.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-hist.inc 2003-02-27 08:27:46.000000000 +0100
@@ -0,0 +1,127 @@
+# dbg-hist.inc - Bourne Again Shell Debugger history routines
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# Remove the last command from the history list.
+_Dbg_remove_history_item() {
+ _Dbg_hi=${#_Dbg_history[@]}-1
+ unset _Dbg_history[$_Dbg_hi]
+}
+
+# Set to rerun history item, or print history if command is of the form
+# !n:p. If command is "history" then $1 is number of history item.
+# the history command index to run is returned or $_Dbg_hi if
+# there's nothing to run.
+# Return value in $history_num
+_Dbg_cmd_history_parse() {
+
+ history_num=$1
+
+ _Dbg_hi=${#_Dbg_history[@]}
+ [[ -z $history_num ]] && let history_num=$_Dbg_hi-1
+
+ eval "$_seteglob"
+ if [[ $_Dbg_cmd == h* ]] ; then
+ if [[ $history_num != $int_pat ]] ; then
+ if [[ $history_num == -$int_pat ]] ; then
+ history_num=$_Dbg_hi+$history_num
+ else
+ _Dbg_msg "Invalid history number skipped: $history_num"
+ history_num=-1
+ fi
+ fi
+ else
+ # Handle ! form. May need to parse number out number and modifier
+ case $_Dbg_cmd in
+ \!\-${int_pat}:p )
+ local -a word1=($(_Dbg_split "!" $_Dbg_cmd))
+ local -a word2=($(_Dbg_split ":" ${word1[0]}))
+ local -i num=_Dbg_hi+${word2[0]}
+ _Dbg_cmd_history_list $num $num
+ history_num=-1
+ ;;
+ [!]${int_pat}:p )
+ local -a word1=($(_Dbg_split "!" $_Dbg_cmd))
+ local -a word2=($(_Dbg_split ":" ${word1[0]}))
+ _Dbg_cmd_history_list ${word2[0]} ${word2[0]}
+ history_num=-1
+ ;;
+ \!\-$int_pat )
+ local -a word=($(_Dbg_split "!" $_Dbg_cmd))
+ history_num=$_Dbg_hi+${word[0]}
+ ;;
+ \!$int_pat )
+ local -a word=($(_Dbg_split "!" $_Dbg_cmd))
+ history_num=${word[0]}
+ ;;
+ '!' )
+ if [[ $history_num != $int_pat ]] ; then
+ if [[ $history_num == -$int_pat ]] ; then
+ history_num=$_Dbg_hi+$history_num
+ else
+ _Dbg_msg "Invalid history number skipped: $history_num"
+ history_num=-1
+ fi
+ fi
+ ;;
+ * )
+ _Dbg_msg "Invalid history number skipped: $_Dbg_cmd"
+ history_num=-1
+ esac
+ fi
+ eval "$_resteglob"
+}
+
+# Print debugger history $1 is where to start or highest number if not given.
+# If $1 is negative, it is how many history items.
+# $2 is where to stop or 0 if not given.
+_Dbg_cmd_history_list() {
+
+ eval "$_seteglob"
+ if [[ $1 != $int_pat ]] && [[ $1 != -$int_pat ]] && [[ -n $1 ]] ; then
+ _Dbg_msg "Invalid history number: $1"
+ eval "$_resteglob"
+ return 1
+ fi
+ eval "$_resteglob"
+
+ _Dbg_hi=${#_Dbg_history[@]}
+ local -i n=${1:-$_Dbg_hi-1}
+ local -i stop=${2:0}
+ local -i i
+
+ # Were we given a count rather than a starting history number?
+ if (( n<0 )) ; then
+ ((stop=_Dbg_hi+n))
+ ((n=_Dbg_hi-1))
+ elif (( n > _Dbg_hi-1 )) ; then
+ ((n=_Dbg_hi-1))
+ fi
+
+ for (( i=n ; (( i >= stop && i >= 0 )) ; i-- )) ; do
+ _Dbg_msg "${i}: ${_Dbg_history[$i]}"
+ done
+}
+
+# This is put at the so we have something at the end when we debug this.
+typeset -r _Dbg_hist_ver=\
+'$Id: dbg-hist.inc,v 1.2 2003/02/27 07:27:46 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: **
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-init.inc cvs/debugger/dbg-init.inc
--- bash-2.05b/debugger/dbg-init.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-init.inc 2003-05-20 20:02:42.000000000 +0200
@@ -0,0 +1,107 @@
+# dbg-init.inc - Bourne Again Shell Debugger Global Variablesa
+
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# Note: the trend now is to move initializations which are generally
+# used in only one sub-part (e.g. variables for break/watch/actions) to
+# the corresponding file.
+
+typeset _cur_fn # current function of debugged program
+typeset -i _cur_line # current line number of debugged program
+typeset -i _trace=0 # init execution trace flag to on
+typeset -i _Dbg_steps=1 # No. of statements to run after setting trap
+
+if [[ -n $_Dbg_script ]] ; then
+ _Dbg_steps=4
+else
+ . ${_Dbg_libdir}/dbg-pre.inc
+ typeset -r _Dbg_source_file=$(_Dbg_expand_filename $0)
+ typeset -i _Dbg_n=$#
+ typeset -i _Dbg_i
+ typeset -i _Dbg_basename_only=${BASHDB_BASENAME_ONLY:-0}
+ declare -a _Dbg_script_args
+ for (( _Dbg_i=0; _Dbg_i<_Dbg_n ; _Dbg_i++ )) ; do
+ _Dbg_script_args[$_Dbg_i]=$1
+ shift
+ done
+ # Now that we've trashed the script parameters above, restore them.
+ _Dbg_set_str="set --"
+ for (( _Dbg_i=0; _Dbg_i<_Dbg_n ; _Dbg_i++ )) ; do
+ _Dbg_set_str="$_Dbg_set_str \"${_Dbg_script_args[$_Dbg_i]}\""
+ done
+ eval $_Dbg_set_str
+fi
+
+# Current next history entry to store into.
+typeset -i _Dbg_hi=0
+
+# How many lines in a listing?
+typeset -i _Dbg_listsize=10
+
+# Annotation level.
+typeset -i _Dbg_annotate=0
+
+typeset -i _Dbg_need_input=1 # True if we need to reassign input.
+
+typeset last_next_step_cmd='s' # Default is step.
+typeset _Dbg_last_print='' # expression on last print command
+typeset _Dbg_last_printe='' # expression on last print expression command
+
+
+# strings to save and restore the setting of `extglob' in debugger functions
+# that need it
+typeset -r _seteglob='local __eopt=-u ; shopt -q extglob && __eopt=-s ; shopt -s extglob'
+typeset -r _resteglob='shopt $__eopt extglob'
+
+typeset -r int_pat="[0-9]*([0-9])"
+
+# If called from bashdb script rather than via "bash --debugger", skip
+# over some initial setup commands, like the initial "source" function
+# of debugged shell script.
+
+# Set tty to use for output.
+if [[ -z $_Dbg_tty ]] ; then
+ typeset _Dbg_tty;
+ _Dbg_tty=$(tty)
+ [[ $? != 0 ]] && _Dbg_tty=''
+fi
+
+# Equivalent to basename $0 -- the short program name
+typeset _Dbg_pname=${0##*/}
+
+# $_Dbg_tmpdir could have been set by bashdb script rather than
+# bash --debugger
+[[ -z $_Dbg_tmpdir ]] && declare _Dbg_tmpdir=/tmp
+
+# Known normal IFS consisting of a space, tab and newline
+typeset -r _Dbg_space_IFS="
+"
+
+# If BASHDB_QUIT_LEVELS is set to a positive number, this is the number
+# of levels (subshell or shell nestings) or we should exit out of.
+[ "X$BASHDB_QUIT_LEVELS" = "X" ] && BASHDB_QUIT_LEVELS=0
+
+# This is put at the so we have something at the end to stop at
+# when we debug this. By stopping at the end all of the above functions
+# and variables can be tested.
+typeset -r _Dbg_init_ver=\
+'$Id: dbg-init.inc,v 1.6 2003/05/20 18:02:42 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-io.inc cvs/debugger/dbg-io.inc
--- bash-2.05b/debugger/dbg-io.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-io.inc 2003-08-02 21:54:47.000000000 +0200
@@ -0,0 +1,143 @@
+# dbg-io.inc - Bourne Again Shell Debugger Input/Output routines
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# ==================== VARIABLES =======================================
+
+# _source_mungedfilename is array which contains source_lines.
+# _read_mungedfilename is array which is 1 filename has been read in.
+
+# Filename that's used when no source file is around. In particular
+# if bash --debugger -c 'string' was used to invoke us.
+typeset -r _Dbg_bogus_file='*BOGUS*'
+
+typeset -a _Dbg_filenames # names of all source files read
+typeset _cur_source_file # current source file of debugged program
+typeset _cur_filevar # source file mangled so it can be used in a variable
+typeset -i _curline # current line number of debugged program
+
+# ===================== FUNCTIONS =======================================
+
+# print message to output device
+_Dbg_msg() {
+ if [[ -n $_Dbg_tty ]] ; then
+ builtin echo -e "$@" >>$_Dbg_tty
+ else
+ builtin echo -e "$@"
+ fi
+}
+
+# print message to output device without a carriage return at the end
+_Dbg_msg_nocr() {
+ if [[ -n $_Dbg_tty ]] ; then
+ builtin echo -n -e "$@" >>$_Dbg_tty
+ else
+ builtin echo -n -e "$@"
+ fi
+}
+
+# print message to output device
+_Dbg_printf() {
+ local format=$1
+ shift
+ if [[ -n $_Dbg_tty ]] ; then
+ builtin printf "$format" "$@" >>$_Dbg_tty
+ else
+ builtin printf "$format" "$@"
+ fi
+ _Dbg_msg ""
+}
+
+# print message to output device without a carriage return at the end
+_Dbg_printf_nocr() {
+ local format=$1
+ shift
+ if [[ -n $_Dbg_tty ]] ; then
+ builtin printf "$format" "$@" >>$_Dbg_tty
+ else
+ builtin printf "$format" "$@"
+ fi
+}
+
+# Return text for source line for line $1 of filename $2 in variable
+# $source_line. The hope is that this has been declared "local" in the
+# caller.
+
+# If $2 is omitted, # use _cur_source_file, if $1 is omitted use _curline.
+_Dbg_get_source_line() {
+ local lineno=${1:-$_curline}
+ local filename=${2:-$_cur_source_file}
+ local filevar=`_Dbg_file2var $filename`
+ local is_read=`_Dbg_get_assoc_scalar_entry "_Dbg_read_" $filevar`
+ [ $is_read ] || _Dbg_readin $filename
+
+ source_line=`_Dbg_get_assoc_array_entry _Dbg_source_${filevar} $lineno`
+}
+
+# Read $1 into _source_$1 array.
+# Variable _read_$1 will be set to 1 to note that the file has been read.
+
+_Dbg_readin() {
+ # set -xv
+ local filename=${1:-$_cur_source_file}
+
+ local -i i=0
+ local filevar
+
+ if [ $filename == $_Dbg_bogus_file ] ; then
+ filevar='ABOGUSA'
+ local cmd="_Dbg_source_${filevar}[1]=\"$BASH_EXECUTION_STRING\""
+ eval $cmd
+ i=1
+ else
+ local fullname=$(_Dbg_resolve_expand_filename $filename)
+ filevar=`_Dbg_file2var $filename`
+ if [[ -r $fullname ]] ; then
+ for (( i=1; 1 ; i++ )) ; do
+ local source_entry="_Dbg_source_${filevar}[$i]"
+ local readline_cmd="read -r $source_entry; rc=\$?";
+ local -i rc=1
+ if (( i % 1000 == 0 )) ; then
+ (( i==1000 )) && _Dbg_msg_nocr "Reading $filename "
+ _Dbg_msg_nocr "${i}... "
+ fi
+ eval $readline_cmd
+ if [[ $rc != 0 ]] ; then
+ break;
+ fi
+ done < $fullname
+ fi
+ fi
+
+ (( i >= 1000 )) && _Dbg_msg "done."
+
+ _Dbg_set_assoc_scalar_entry "_Dbg_read_" $filevar 1
+ _Dbg_set_assoc_scalar_entry "_Dbg_maxline_" $filevar $i
+
+ # Add $filename to list of all filenames
+ _Dbg_filenames[${#_Dbg_filenames[@]}]=$fullname;
+ # set +xv
+}
+
+# This is put at the so we have something at the end when we debug this.
+typeset -r _Dbg_io_ver=\
+'$Id: dbg-io.inc,v 1.6 2003/08/02 19:54:47 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-list.inc cvs/debugger/dbg-list.inc
--- bash-2.05b/debugger/dbg-list.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-list.inc 2003-08-02 21:54:47.000000000 +0200
@@ -0,0 +1,230 @@
+# bashdb-list.inc - Bourne Again Shell Debugger list/search commands
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# List search commands/routines
+
+# Last search pattern used.
+typeset _Dbg_last_search_pat
+
+# current line to be listed
+typeset -i _Dbg_listline
+
+# Print source line in standard format for line $1 of filename $2. If
+# $2 is omitted, use _cur_source_file, if $1 is omitted use _curline.
+
+_Dbg_print_source_line() {
+ local line_number=${1:-$_curline}
+ local filename=${2:-$_cur_source_file}
+ local source_line
+ _Dbg_get_source_line $line_number $filename
+ filename=$(_Dbg_adjust_filename "$filename")
+ _Dbg_msg "(${filename}:${line_number}):
+${line_number}:\t${source_line}"
+
+ # If we are at the same place in the file but the command has changed,
+ # then we have multiple commands on the line. So print which one we are
+ # currently at.
+ if [[ $_Dbg_show_command == "on" ]] ; then
+ _Dbg_msg "$_Dbg_bash_command"
+ elif [[ $_Dbg_last_curline == $_curline ]] \
+ && [[ $_Dbg_last_source_file == $_cur_source_file ]] \
+ && [[ $_Dbg_last_bash_command != $_Dbg_bash_command \
+ && $_Dbg_show_command == "auto" ]] ; then
+ _Dbg_msg "$_Dbg_bash_command"
+ fi
+}
+
+
+# l [start|.] [cnt] List cnt lines from line start.
+# l sub List source code fn
+_Dbg_cmd_list() {
+ if [[ -n $1 ]] ; then
+ first_arg=$1
+ shift
+ else
+ first_arg=.
+ fi
+
+ if [ $first_arg == '.' ] ; then
+ _Dbg_list $_cur_source_file $*
+ return
+ fi
+
+ local -a word=($(_Dbg_parse_linespec "$first_arg"))
+ if [[ ${#word[@]} == 0 ]] ; then
+ _Dbg_msg "Invalid linespec $n"
+ return
+ fi
+
+ local -i line_number=${word[0]}
+ local filename=${word[1]}
+ local full_filename=`_Dbg_is_file $filename`
+ if [[ -n $full_filename ]] ; then
+ (( $line_number == 0 )) && line_number=1
+ _Dbg_check_line $line_number "$full_filename"
+ (( $? == 0 )) && \
+ _Dbg_list "$full_filename" "$line_number" $*
+ else
+ _Dbg_msg "File $filename not found in read-in files."
+ _Dbg_msg "See 'info files' for a list of known files."
+ fi
+}
+
+# /search/
+_Dbg_cmd_search_back() {
+ local delim_search_pat=$1
+ if [[ -z "$1" ]] ; then
+ _Dbg_msg "Need a search pattern"
+ return 1
+ fi
+ shift
+
+ case "$delim_search_pat" in
+ [?] )
+ ;;
+ [?]* )
+ local -a word=($(_Dbg_split '?' $delim_search_pat))
+ _Dbg_last_search_pat=${word[0]}
+ ;;
+ # Error
+ * )
+ _Dbg_last_search_pat=$delim_search_pat
+ esac
+ local -i i
+ local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $_cur_filevar`
+ for (( i=_Dbg_listline-1; i > 0 ; i-- )) ; do
+ local source_line
+ _Dbg_get_source_line $i
+ eval "$_seteglob"
+ if [[ $source_line == *$_Dbg_last_search_pat* ]] ; then
+ eval "$_resteglob"
+ _Dbg_cmd_list $i 1
+ _Dbg_listline=$i
+ return 0
+ fi
+ eval "$_resteglob"
+ done
+ _Dbg_msg "search pattern: $_Dbg_last_search_pat not found."
+ return 1
+
+}
+
+# /search/
+_Dbg_cmd_search() {
+ local delim_search_pat=${1}
+ if [[ -z "$1" ]] ; then
+ _Dbg_msg "Need a search pattern"
+ return 1
+ fi
+ shift
+ local search_pat
+ case "$delim_search_pat" in
+ / )
+ ;;
+ /* )
+ local -a word=($(_Dbg_split "/" $delim_search_pat))
+ _Dbg_last_search_pat=${word[0]}
+ ;;
+ * )
+ _Dbg_last_search_pat=$delim_search_pat
+ esac
+ local -i i
+ local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $_cur_filevar`
+ for (( i=_Dbg_listline+1; i < max_line ; i++ )) ; do
+ local source_line
+ _Dbg_get_source_line $i
+ eval "$_seteglob"
+ if [[ $source_line == *$_Dbg_last_search_pat* ]] ; then
+ eval "$_resteglob"
+ _Dbg_cmd_list $i 1
+ _Dbg_listline=$i
+ return 0
+ fi
+ eval "$_resteglob"
+ done
+ _Dbg_msg "search pattern: $_Dbg_last_search_pat not found."
+ return 1
+
+}
+
+# S [[!]pat] List Subroutine names [not] matching a pattern
+# Pass along whether or not to print "system" functions?
+_Dbg_cmd_list_subroutines() {
+
+ local pat=$1
+
+ local -a fns_a=(`_Dbg_get_functions 0 "$pat"`)
+ local -i i
+ for (( i=0; (( i < ${#fns_a[@]} )) ; i++ )) ; do
+ _Dbg_msg ${fns_a[$i]}
+ done
+}
+
+# list $3 lines starting at line $2 of file $1. If $1 is '', use
+# $_cur_source_file value. If $3 is ommited, print $_Dbg_listsize
+# lines. if $2 is omitted, use global variable $_curline.
+
+_Dbg_list() {
+ local filename=${1:-$_cur_source_file}
+
+ if [[ $2 = . ]]; then
+ _Dbg_listline=$_curline
+ elif [[ -n $2 ]] ; then
+ _Dbg_listline=$2
+ fi
+ (( _Dbg_listline==0 && _Dbg_listline++))
+
+ local -ir cnt=${3:-$_Dbg_listsize}
+ local -ir n=$((_Dbg_listline+cnt-1))
+
+ local source_line
+
+ local filevar=`_Dbg_file2var $filename`
+ local is_read
+ is_read=`_Dbg_get_assoc_scalar_entry "_Dbg_read_" $filevar`
+ [ $is_read ] || _Dbg_readin $filename
+ local -i max_line=`_Dbg_get_assoc_scalar_entry "_Dbg_maxline_" $filevar`
+ # echo "debug: -- max_line: $max_line --"
+
+ if (( _Dbg_listline > max_line )) ; then
+ _Dbg_msg \
+ "Line number $_Dbg_listline out of range;" \
+ "$filename has $max_line lines."
+ return 1
+ fi
+
+ for (( ; (( _Dbg_listline <= n && _Dbg_listline <= max_line )) \
+ ; _Dbg_listline++ )) ; do
+ local prefix=" "
+ local source_line
+ _Dbg_get_source_line $_Dbg_listline $filename
+
+ (( _Dbg_listline == _curline )) \
+ && [[ $filename == $_cur_source_file ]] && prefix="==>"
+ _Dbg_printf "%3d:%s%s" $_Dbg_listline "$prefix" "$source_line"
+ done
+ (( _Dbg_listline > max_line && _Dbg_listline-- ))
+ return 0
+}
+
+# This is put at the so we have something at the end when we debug this.
+_Dbg_list_ver='$Id: dbg-list.inc,v 1.5 2003/08/02 19:54:47 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-main.inc.in cvs/debugger/dbg-main.inc.in
--- bash-2.05b/debugger/dbg-main.inc.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-main.inc.in 2003-08-25 18:34:35.000000000 +0200
@@ -0,0 +1,55 @@
+# dbg-main.inc - Bourne Again Shell Debugger Main Include
+
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+typeset -r _Dbg_main_ver=\
+'$Id: dbg-main.inc.in,v 1.1 2003/08/25 16:34:35 snikkt Exp $'
+
+# Are we using a debugger-enabled bash? If not let's stop right here.
+if [[ -z "${BASH_SOURCE[0]}" ]] ; then
+ echo "Sorry, you need to use a debugger-enabled version of bash." 2>&1
+ exit 2
+fi
+
+# $_Dbg_libdir could have been set by bashdb script.
+# If not, set if "bash --debugger"
+[ -z $_Dbg_libdir ] && typeset _Dbg_libdir=@PKGDATADIR@
+
+. ${_Dbg_libdir}/dbg-init.inc # Initializations - put sooner
+. ${_Dbg_libdir}/dbg-brk.inc # Breakpoints, watchpoints, actions
+. ${_Dbg_libdir}/dbg-file.inc # File functions
+. ${_Dbg_libdir}/dbg-fns.inc # Miscellaneous helper functions
+. ${_Dbg_libdir}/dbg-help.inc # Help routines
+. ${_Dbg_libdir}/dbg-hist.inc # History routines
+. ${_Dbg_libdir}/dbg-io.inc # I/O routines - has to come before
+ # cmds
+. ${_Dbg_libdir}/dbg-cmds.inc # Debugger commands
+. ${_Dbg_libdir}/dbg-list.inc # List/search commands
+. ${_Dbg_libdir}/dbg-stack.inc # Call-stack routines
+. ${_Dbg_libdir}/dbg-set.inc # set/show routines
+. ${_Dbg_libdir}/dbg-sig.inc # signal-handling routines
+
+[ -n "$BASHDB_RESTART_FILE" ] \
+ && [ -r "$BASHDB_RESTART_FILE" ] && source $BASHDB_RESTART_FILE
+
+trap '_Dbg_debug_trap_handler 0 "$BASH_COMMAND" "$@"' DEBUG
+# echo '*** we were here***' # uncomment to test that we were run.
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-pre.inc.in cvs/debugger/dbg-pre.inc.in
--- bash-2.05b/debugger/dbg-pre.inc.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-pre.inc.in 2003-03-27 06:34:12.000000000 +0100
@@ -0,0 +1,79 @@
+# dbg-pre.inc - Bourne Again Shell Debugger Global Variables
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# We put definiitions common to both the script debugger and bash
+# --debugger. In contrast to other routines this is sourced early --
+# before most of the bashdb script is run. The other routines are
+# done near the end of the bashdb script. In this way the script can
+# has access to definitions that --debugger has without duplicating code.
+
+# Note: the trend now is to move initializations which are generally
+# used in only one sub-part (e.g. variables for break/watch/actions) to
+# the corresponding file.
+
+typeset -r _Dbg_release='bash-@BASHVERS@-@RELSTATUS@'
+
+# This is put at the so we have something at the end to stop at
+# when we debug this. By stopping at the end all of the above functions
+# and variables can be tested.
+typeset -r _Dbg_pre_ver=\
+'$Id: dbg-pre.inc.in,v 1.3 2003/03/27 05:34:12 rockyb Exp $'
+
+# Expand filename given as $1.
+# we echo the expanded name or return $1 unchanged if a bad filename.
+# Return is 0 if good or 1 if bad.
+# File globbing is handled.
+# Note we don't check that the file exists, just that the format is
+# valid; we do check that we can "search" the directory implied in the
+# filename.
+
+_Dbg_expand_filename() {
+ local -r filename="$1"
+
+ # Break out basename and dirname
+ local -r basename=${filename##*/}
+ local dirname=${filename%/*}
+
+ # No slash given in filename? Then use . for dirname
+ [[ $dirname == $basename ]] && dirname="."
+
+ # Dirname is ''? Then use / for dirname
+ dirname=${dirname:-/}
+
+ # Handle tilde expansion in dirname
+ local glob_cmd="dirname=`expr $dirname`"
+ eval $glob_cmd 2>/dev/null
+
+ local long_path;
+ long_path=`(cd $dirname && pwd) 2>/dev/null`
+ if (( $? == 0 )) ; then
+ if [[ $long_path == '/' ]] ; then
+ echo "/$basename"
+ else
+ echo "$long_path/$basename"
+ fi
+ return 0
+ else
+ echo $filename
+ return 1
+ fi
+}
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-set-d-vars.inc cvs/debugger/dbg-set-d-vars.inc
--- bash-2.05b/debugger/dbg-set-d-vars.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-set-d-vars.inc 2003-02-27 08:27:46.000000000 +0100
@@ -0,0 +1,34 @@
+#$Id: dbg-set-d-vars.inc,v 1.2 2003/02/27 07:27:46 rockyb Exp $
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# set dollar variables ($1, $2, ... $?)
+# to their values in the debugged environment before we entered the debugger.
+
+local _Dbg_set_str="set --"
+local -i _Dbg__i
+for (( _Dbg__i=1 ; _Dbg__i<=${#_Dbg_arg[@]}; _Dbg__i++ )) ; do
+ local dq_argi=$(_Dbg_esc_dq "${_Dbg_arg[$_Dbg__i]}")
+ _Dbg_set_str="$_Dbg_set_str \"$dq_argi\""
+done
+eval $_Dbg_set_str
+
+_Dbg_set_dol_q
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-set.inc cvs/debugger/dbg-set.inc
--- bash-2.05b/debugger/dbg-set.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-set.inc 2003-03-22 01:16:31.000000000 +0100
@@ -0,0 +1,525 @@
+# dbg-set.inc - Bourne Again Shell Debugger Set Routines
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# Sets whether or not to display command to be executed in debugger prompt.
+# If yes, always show. If auto, show only if the same line is to be run
+# but the command is different.
+typeset _Dbg_show_command="auto"
+
+_Dbg_cmd_set() {
+ local set_cmd=$1
+ if [[ $set_cmd == '' ]] ; then
+ _Dbg_msg "Argument required (expression to compute)."
+ return;
+ fi
+ shift
+ case $set_cmd in
+ ar | arg | args )
+ # We use the loop below rather than _Dbg_set_args="(@)" because
+ # we want to preserve embedded blanks in the arguments.
+ _Dbg_script_args=()
+ local -i i
+ local -i n=$#
+ for (( i=0; i<n ; i++ )) ; do
+ _Dbg_write_journal_eval "_Dbg_script_args[$i]=$1"
+ shift
+ done
+ ;;
+ an | ann | anno | annot | annota | annotat | annotate )
+ eval "$_seteglob"
+ if [[ $1 == $int_pat ]] ; then
+ if (( $1 > 1 )) ; then
+ _Dbg_msg "annotation level must be 0 or 1"
+ else
+ _Dbg_write_journal_eval "_Dbg_annotate=$1"
+ fi
+ else
+ eval "$_resteglob"
+ _Dbg_msg "Integer argument expected; got: $1"
+ return 1
+ fi
+ eval "$_resteglob"
+ return 0
+ ;;
+ b | ba | bas | base | basen | basena | basenam | basename )
+ local onoff=${1:-'off'}
+ case $onoff in
+ on )
+ _Dbg_write_journal_eval "_Dbg_basename_only=1"
+ ;;
+ off )
+ _Dbg_write_journal_eval "_Dbg_basename_only=0"
+ ;;
+ * )
+ _Dbg_msg "\"on\" or \"off\" expected."
+ esac
+ ;;
+ e | ed | edi | edit | editi | editin | editing )
+ local onoff=${1:-'on'}
+ case $onoff in
+ on )
+ _Dbg_edit='-e'
+ ;;
+ off )
+ _Dbg_edit=''
+ ;;
+ * )
+ _Dbg_msg "\"on\" or \"off\" expected."
+ esac
+ ;;
+ d|de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
+ local onoff=${1:-'on'}
+ case $onoff in
+ on )
+ _Dbg_write_journal_eval "_Dbg_debug_debugger=1"
+ ;;
+ off )
+ _Dbg_write_journal_eval "_Dbg_debug_debugger=0"
+ ;;
+ * )
+ _Dbg_msg "\"on\" or \"off\" expected."
+ esac
+ ;;
+ li | lis | list | lists | listsi | listsiz | listsize )
+ eval "$_seteglob"
+ if [[ $1 == $int_pat ]] ; then
+ _Dbg_write_journal_eval "_Dbg_listsize=$1"
+ else
+ eval "$_resteglob"
+ _Dbg_msg "Integer argument expected; got: $1"
+ return 1
+ fi
+ eval "$_resteglob"
+ return 0
+ ;;
+ p | pr | pro | prom | promp | prompt )
+ _Dbg_prompt_str="$1"
+ ;;
+ sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand )
+ case $1 in
+ on | off | auto )
+ _Dbg_write_journal_eval "_Dbg_show_command=$1"
+ ;;
+ * )
+ _Dbg_msg "\"on\", \"off\" or \"auto\" expected."
+ esac
+ return 0
+ ;;
+ *)
+ _Dbg_msg "Unknown subcommand: $set_cmd"
+ return 1
+ esac
+}
+
+_Dbg_cmd_show() {
+ local show_cmd=$1
+ local label=$2
+
+ # Warranty, copying and directories are omitted below.
+ local -r subcmds="args basename debugger editing listsize prompt"
+
+ if [[ -z $show_cmd ]] ; then
+ local thing
+ for thing in $subcmds ; do
+ _Dbg_cmd_show $thing 1
+ done
+ return
+ fi
+
+ case $show_cmd in
+ ar | arg | args )
+ [[ -n $label ]] && label='args: '
+ _Dbg_msg \
+"${label}Argument list to give script when debugged program starts is:\n" \
+" \"${_Dbg_script_args[@]}\"."
+ return 0
+ ;;
+ an | ann | anno | annot | annota | annotat | annotate )
+ [[ -n $label ]] && label='annotate: '
+ _Dbg_msg \
+"${label}Annotation_level is" \
+ "$_Dbg_annotate."
+ return 0
+ ;;
+ b | ba | bas | base | basen | basena | basenam | basename )
+ [[ -n $label ]] && label='basename: '
+ local onoff="off."
+ (( $_Dbg_basename_only != 0 )) && onoff='on.'
+ _Dbg_msg \
+"${label}Show short filenames (the basename) in debug output is" $onoff
+ return 0
+ ;;
+ com | comm | comma | comman | command | commands )
+ local -i hi_start=_Dbg_hi-1
+ local -i hi_stop=hi_start-10
+ _Dbg_cmd_history_list $hi_start $hi_stop
+ return 0
+ ;;
+ cop | copy| copyi | copyin | copying )
+ _Dbg_msg \
+"
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The \"Program\", below,
+refers to any such program or work, and a \"work based on the Program\"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term \"modification\".) Each licensee is addressed as \"you\".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and \"any
+later version\", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+"
+ return 0
+ ;;
+ e | ed | edi | edit | editi | editin | editing )
+ [[ -n $label ]] && label='editing: '
+ local onoff="on."
+ [[ -z $_Dbg_edit ]] && onoff='off.'
+ _Dbg_msg \
+"${label}Editing of command lines as they are typed is" $onoff
+ return 0
+ ;;
+ de|deb|debu|debug|debugg|debugger|debuggi|debuggin|debugging )
+ local onoff=${1:-'on'}
+ [[ -n $label ]] && label='debugger: '
+ local onoff="off."
+ (( $_Dbg_debug_debugger )) && onoff='on.'
+ _Dbg_msg \
+"${label}Allow debugging the debugger is" $onoff
+ return 0
+ ;;
+ di|dir|dire|direc|direct|directo|director|directori|directorie|directories)
+ local list=${_Dbg_dir[0]}
+ local -i n=${#_Dbg_dir[@]}
+ local -i i
+ for (( i=1 ; i < n; i++ )) ; do
+ list="${list}:${_Dbg_dir[i]}"
+ done
+
+ _Dbg_msg "Source directories searched: $list"
+ return 0
+ ;;
+ li | lis | list | lists | listsi | listsiz | listsize )
+ [[ -n $label ]] && label='listsize: '
+ _Dbg_msg \
+"${label}Number of source lines bashdb will list by default is" \
+ "$_Dbg_listsize."
+ return 0
+ ;;
+ p | pr | pro | prom | promp | prompt )
+ [[ -n $label ]] && label='prompt: '
+ _Dbg_msg \
+"${label}bashdb's prompt is:\n" \
+" \"$_Dbg_prompt_str\"."
+ return 0
+ ;;
+ sho|show|showc|showco|showcom|showcomm|showcomma|showcomman|showcommand )
+ [[ -n $label ]] && label='showcommand: '
+ _Dbg_msg \
+"${label}Show commands in debugger prompt is" \
+ "$_Dbg_show_command."
+ return 0
+ ;;
+ v | ve | ver | vers | versi | versio | version )
+ _Dbg_cmd_show_versions
+ return 0
+ ;;
+ w | wa | war | warr | warra | warran | warrant | warranty )
+ _Dbg_cmd_info warranty
+ return 0
+ ;;
+ *)
+ _Dbg_msg "Don't know how to show $show_cmd."
+ return 1
+ esac
+}
+
+_Dbg_cmd_show_versions()
+{
+ _Dbg_msg "Release => $_Dbg_release"
+ [[ -n $_Dbg_script ]] &&
+ _Dbg_msg "'bashdb' => $_Dbg_ver"
+ _Dbg_msg "'brk' => $_Dbg_brk_ver"
+ _Dbg_msg "'cmds' => $_Dbg_cmd_ver"
+ _Dbg_msg "'file' => $_Dbg_file_ver"
+ _Dbg_msg "'fns' => $_Dbg_fns_ver"
+ _Dbg_msg "'help' => $_Dbg_help_ver"
+ _Dbg_msg "'hist' => $_Dbg_hist_ver"
+ _Dbg_msg "'init' => $_Dbg_init_ver"
+ _Dbg_msg "'io' => $_Dbg_io_ver"
+ _Dbg_msg "'list' => $_Dbg_list_ver"
+ _Dbg_msg "'main' => $_Dbg_main_ver"
+ _Dbg_msg "'sig' => $_Dbg_sig_ver"
+ _Dbg_msg "'set' => $_Dbg_set_ver"
+ _Dbg_msg "'stack' => $_Dbg_stack_ver"
+}
+
+# This is put at the so we have something at the end when we debug this.
+typeset -r _Dbg_set_ver=\
+'$Id: dbg-set.inc,v 1.5 2003/03/22 00:16:31 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-sig-ret.inc cvs/debugger/dbg-sig-ret.inc
--- bash-2.05b/debugger/dbg-sig-ret.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-sig-ret.inc 2003-02-27 08:27:46.000000000 +0100
@@ -0,0 +1,52 @@
+# dbg-sig-ret.inc - Bourne Again Shell Debugger Signal handling routines
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+if [[ $_Dbg_old_ERR_handler != '' ]] ; then
+ eval $_Dbg_old_ERR_handler
+else
+ trap '' ERR
+fi
+
+## Should make sure we are not using our own return handler...
+#if [[ $_Dbg_old_RETURN_handler != '' ]] ; then
+# eval $_Dbg_old_RETURN_handler
+#else
+# trap '' RETURN
+#fi
+
+if [[ $_Dbg_old_INT_handler != '' ]] ; then
+ eval $_Dbg_old_INT_handler
+else
+ trap '' INT
+fi
+
+# if [[ $_Dbg_old_EXIT_handler != '' ]] ; then
+# eval $_Dbg_old_EXIT_handler
+# else
+# trap '' EXIT
+# fi
+
+local _Dbg_old_IFS="$IFS"
+IFS="$_Dbg_space_IFS";
+set -$_Dbg_old_set_opts
+IFS="$_Dbg_old_IFS";
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-sig.inc cvs/debugger/dbg-sig.inc
--- bash-2.05b/debugger/dbg-sig.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-sig.inc 2003-03-21 18:59:57.000000000 +0100
@@ -0,0 +1,573 @@
+# dbg-sig.inc - Bourne Again Shell Debugger Signal handling routines
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+# ==================== VARIABLES =======================================
+
+# The "set" options in effect ($-) before debugger was invoked.
+typeset _Dbg_old_setopts
+
+# Return code that debugged program reports
+typeset -i _Dbg_program_exit_code=0
+
+# This is set to 1 if you want to debug debugger routines, i.e. routines
+# which start _Dbg_. But you better should know what you are doing
+# if you do this or else you may get into a recursive loop.
+typeset -i _Dbg_debug_debugger=0
+
+############################################################
+## Signal arrays: These are indexed by the signal number. ##
+############################################################
+
+# Should we print that a signal was intercepted?
+# Each entry is "print" or "noprint" or null.
+typeset -a _Dbg_sig_print=()
+
+# Should we reentry the debugger command loop on receiving the signal?
+# Each entry is "stop" or "nostop" or null.
+typeset -a _Dbg_sig_stop=()
+
+# Should we show a traceback on receiving the signal?
+# Each entry is "stack" or "nostack" or null.
+typeset -a _Dbg_sig_show_stack=()
+# Should pass the signal to the user program??
+# Each entry is the trap handler with some variables substituted.
+typeset -a _Dbg_sig_passthrough=()
+
+# ===================== FUNCTIONS =======================================
+
+# We come here after before statement is run. This is the function named
+# in trap SIGDEBUG.
+
+# Note: We have to be careful here in naming "local" variables. In contrast
+# to other places in the debugger, because of the read/eval loop, they are
+# in fact seen by those using the debugger. So in contrast to other "local"s
+# in the debugger, we prefer to preface these with _Dbg_.
+
+_Dbg_debug_trap_handler() {
+
+ ### The below is also copied below in _Dbg_sig_handler...
+ ### Should put common stuff into a function.
+
+ # Consider putting the following line(s) in a routine.
+ # Ditto for the restore environment
+ local -i _Dbg_debugged_exit_code=$?
+ _Dbg_old_set_opts=$-
+
+ # Turn off line and variable trace listing if were not in our own debug
+ # mode
+ (( !_Dbg_debug_debugger )) && set +x +v
+
+ # If we are in our own routines -- these start with _bashdb -- then
+ # return.
+ if [[ ${FUNCNAME[1]} == _Dbg_* ]] && (( !_Dbg_debug_debugger )); then
+ _Dbg_set_to_return_from_debugger 0
+ return 0
+ fi
+
+ _Dbg_set_debugger_entry
+
+ local -i _Dbg_rc=0
+
+ # Were we called because of "trap fn ... RETURN"?
+ local -i _Dbg_is_return=$1
+ shift
+
+ _Dbg_bash_command=$1
+ shift
+
+ # Save values of $1 $2 $3 when debugged program was stopped
+ # We use the loop below rather than _Dbg_set_args="(@)" because
+ # we want to preserve embedded blanks in the arguments.
+ local -i _Dbg_n=${#@}
+ local -i _Dbg_i=1
+ for (( ; _Dbg_n > 0; _Dbg_n-- )) ; do
+ _Dbg_arg[$_Dbg_i]=$1
+ ((_Dbg_i++))
+ shift
+ done
+ unset _Dbg_arg[0] # Get rid of line number; makes array count
+ # correct; also listing all _Dbg_arg works
+ # like $*.
+
+ # Read in the journal to pick up variable settings that might have
+ # been left from a subshell.
+ _Dbg_source_journal
+
+ if (( $BASHDB_QUIT_LEVELS > 0 )) ; then
+ _Dbg_cmd_quit $_Dbg_debugged_exit_code
+ fi
+
+ # if in step mode, decrement counter
+ if ((_Dbg_steps >= 0)) ; then
+ ((_Dbg_steps--))
+ _Dbg_write_journal "_Dbg_steps=$_Dbg_steps"
+ fi
+
+ # look for watchpoints.
+ local -i _Dbg_i
+ for (( _Dbg_i=0; _Dbg_i < _Dbg_watch_max ; _Dbg_i++ )) ; do
+ if [ -n "${_Dbg_watch_exp[$_Dbg_i]}" ] \
+ && [[ ${_Dbg_watch_enable[_Dbg_i]} != 0 ]] ; then
+ local new_val=`_Dbg_get_watch_exp_eval $_Dbg_i`
+ local old_val=${_Dbg_watch_val[$_Dbg_i]}
+ if [ $old_val != $new_val ] ; then
+ ((_Dbg_watch_count[_Dbg_i]++))
+ _Dbg_msg "Watchpoint $i: ${_Dbg_watch_exp[$_Dbg_i]} changed:"
+ _Dbg_msg " old value: '$old_val'"
+ _Dbg_msg " new value: '$new_val'"
+ _Dbg_print_source_line
+ _Dbg_watch_val[$_Dbg_i]=$new_val
+ _Dbg_cmdloop
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_rc
+ fi
+ fi
+ done
+
+ # Run applicable action statement
+ local entries=`_Dbg_get_assoc_array_entry "_Dbg_action_$_cur_filevar" $_curline`
+ if [[ $entries != "" ]] ; then
+ local -i _Dbg_i
+ for _Dbg_i in $entries ; do
+ if [[ ${_Dbg_action_enable[_Dbg_i]} != 0 ]] ; then
+ . ${_Dbg_libdir}/dbg-set-d-vars.inc
+ eval "${_Dbg_action_stmt[$_Dbg_i]}"
+ fi
+ done
+ fi
+
+ # check if breakpoint reached
+ local -r entries=`_Dbg_get_assoc_array_entry "_brkpt_$_cur_filevar" $_curline`
+ if [[ $entries != "" ]] ; then
+ local -i _Dbg_i
+ for _Dbg_i in $entries ; do
+ if [[ ${_brkpt_enable[_Dbg_i]:0} != 0 ]] ; then
+ local -i cond
+ . ${_Dbg_libdir}/dbg-set-d-vars.inc
+ eval let cond=${_brkpt_cond[$_Dbg_i]:0}
+ if [[ $cond != 0 ]] ; then
+ ((_brkpt_count[_Dbg_i]++))
+ if [[ ${_brkpt_onetime[_Dbg_i]:0} == 1 ]] ; then
+ _Dbg_delete_brkpt_entry $_Dbg_i
+ else
+ _Dbg_msg \
+ "Breakpoint $_Dbg_i hit (${_brkpt_count[$_Dbg_i]} times)."
+ fi
+ _Dbg_print_source_line
+ _Dbg_cmdloop # enter debugger
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_rc
+ fi
+ fi
+
+ done
+ fi
+
+ # next, check if step mode and no. of steps is up
+ if ((_Dbg_steps == 0)); then
+ _Dbg_print_source_line
+ # _Dbg_msg "Stopped at line $_curline"
+ _Dbg_cmdloop # enter debugger
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_rc
+ elif (( _Dbg_is_return == 1 )) ; then
+ # here because a trap RETURN
+ _Dbg_print_source_line
+ _Dbg_cmdloop # enter debugger
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_rc
+ elif (( _Dbg_is_return == 2 )) ; then
+ # here because we are fielding a signal.
+ _Dbg_print_source_line
+ _Dbg_cmdloop # enter debugger
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_rc
+ else
+ ((_trace==1)) && _Dbg_print_source_line
+ fi
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_inside_skip
+}
+
+# Cleanup routine: erase temp files before exiting.
+_Dbg_cleanup() {
+ rm $_Dbg_evalfile 2>/dev/null
+ _Dbg_erase_journals
+ # This is needed sometimes, and sometimes _Dbg_cleanup2 works.
+ # figure out why...
+ if (( BASHDB_QUIT_LEVELS < 1 )) ; then
+ rm $_Dbg_persistent 2>/dev/null
+ fi
+}
+
+# Somehow we can't put this in _Dbg_cleanup and have it work.
+# I am not sure why.
+_Dbg_cleanup2() {
+ _Dbg_erase_journals
+ trap - EXIT
+}
+
+# The real way to leave this program.
+_Dbg_cmd_quit() {
+ local -i return_code=${1:-$_Dbg_program_exit_code}
+
+ local -i desired_quit_levels=${2:-0}
+
+ if (( desired_quit_levels == 0 \
+ || desired_quit_levels > BASH_SUBSHELL+1)) ; then
+ ((desired_quit_levels=BASH_SUBSHELL+1))
+ fi
+
+ ((BASHDB_QUIT_LEVELS+=desired_quit_levels))
+
+ # Reduce the number of recorded levels that we need to leave by
+ # if BASHDB_QUIT_LEVELS is numeric and greater than 0.
+ ((BASHDB_QUIT_LEVELS--))
+
+ ## write this to the next level up can read it.
+ _Dbg_write_journal "BASHDB_QUIT_LEVELS=$BASHDB_QUIT_LEVELS"
+
+ # Reset signal handlers to their default but only if
+ # we are not in a subshell.
+ if (( BASH_SUBSHELL == 0 )) ; then
+
+ # If we were told to restart from deep down, restart instead of quit.
+ if [ -n "$BASHDB_RESTART_COMMAND" ] ; then
+ _Dbg_erase_journals
+ _Dbg_save_state
+ exec $BASHDB_RESTART_COMMAND
+ fi
+
+ _Dbg_cleanup
+ trap - DEBUG
+ # This is a hack we need. I am not sure why.
+ trap "_Dbg_cleanup2" EXIT
+ fi
+
+ # And just when you thought we'd never get around to it...
+ exit $return_code
+}
+
+# Save value of handler variable _Dbg_old_$sig
+_Dbg_save_handler() {
+ local -r sig=$1
+ local old_handler='#unset#';
+ if [[ `trap -p $sig` ]] ; then
+ old_handler=`trap -p $sig`
+ fi
+ if [[ $old_handler != '#unset#' ]] ; then
+ local -a old_hand_a=($old_handler)
+ old_handler=`_Dbg_subst_handler_var ${old_hand_a[2]}`
+ local -r decl_cmd="typeset -r _Dbg_old_${sig}_handler='$old_handler'"
+ eval $decl_cmd
+ fi
+
+}
+
+# Adjust handler variables to take into account the fact that when we
+# call the handler we will have added another call before the user's
+# handler.
+_Dbg_subst_handler_var() {
+ local -i i
+ local result=''
+ for arg in $* ; do
+ case $arg in
+ '$LINENO' )
+ arg='${BASH_LINENO[0]}'
+ ;;
+ '${BASH_SOURCE[0]}' )
+ arg='${BASH_SOURCE[1]}'
+ ;;
+ '${FUNCNAME[0]}' )
+ arg='${FUNCNAME[1]}'
+ ;;
+ '${BASH_LINENO[0]}' )
+ arg='${BASH_LINENO[1]}'
+ ;;
+ esac
+ if [[ $result == '' ]] ; then
+ result=$arg
+ else
+ result="$result $arg"
+ fi
+ done
+ echo $result
+}
+
+# Debugger exit handler. Don't really exit - but go back the debugger
+# command loop
+_Dbg_exit_handler() {
+
+ # Consider putting the following line(s) in a routine.
+ # Ditto for the restore environment
+ local -i _Dbg_debugged_exit_code=$?
+
+ # Turn off line and variable trace listing.
+ set +x +v
+
+ if [[ ${_Dbg_sig_print[0]} == "print" ]] ; then
+ # Note: use the same message that gdb does for this.
+ _Dbg_msg "Program received signal EXIT (0)..."
+ if [[ ${_Dbg_sig_show_stack[0]} == "showstack" ]] ; then
+ _Dbg_cmd_stack_trace 0
+ fi
+ fi
+
+ if [[ $_Dbg_old_EXIT_handler != '' ]] ; then
+ eval $_Dbg_old_EXIT_handler
+ fi
+
+ # If we've set the QUIT signal handler not to stop, or we've in the
+ # middle of leaving so many (subshell) levels or we have set to
+ # leave quietly on termination, then do it!
+
+ if [[ ${_Dbg_sig_stop[0]} != "stop" ]] \
+ || [[ $BASHDB_QUIT_LEVELS != 0 ]] \
+ || [ -n "$BASHDB_QUIT_ON_QUIT" ] ; then
+ _Dbg_cmd_quit
+ # We don't return from here.
+ fi
+
+ # We've tested for all the quitting conditions above.
+ # Even though this is an exit handler, don't exit!
+
+ local term_msg="normally"
+ if [[ $_Dbg_debugged_exit_code != 0 ]] ; then
+ term_msg="with code $_Dbg_debugged_exit_code"
+ fi
+
+ # If we tried to exit from inside a subshell, we only want to enter
+ # the command loop if don't have any pending subshells.
+ if (( BASH_SUBSHELL == 0 )) ; then
+ _Dbg_msg \
+ "Debugged program terminated $term_msg. Use q to quit or R to restart."
+
+ while [[ 1 ]] ; do
+ _Dbg_cmdloop
+ done
+ fi
+}
+
+# Generic signal handler for bashdb. We consult global array
+# _Dbg_sig_* for how to handle this signal.
+
+# Since the command loop may be called we need to be careful about
+# using variable names that would be exposed to the user.
+_Dbg_sig_handler() {
+
+ # Consider putting the following line(s) in a routine.
+ # Ditto for the restore environment
+ local -i _Dbg_debugged_exit_code=$?
+ _Dbg_old_set_opts=$-
+
+ # Turn off line and variable trace listing.
+ set +x +v
+
+ local -i _Dbg_rc=0
+
+ # This is the signal number. E.g. 15 is SIGTERM
+ local -r -i _Dbg_signum=$1
+
+ if [[ ${_Dbg_sig_print[$_Dbg_signum]} == "print" ]] || \
+ [[ ${_Dbg_sig_stop[$_Dbg_signum]} == "stop" ]] ; then
+ local -r name=`_Dbg_signum2name $_Dbg_signum`
+ # Note: use the same message that gdb does for this.
+ _Dbg_msg "Program received signal $name ($_Dbg_signum)..."
+ if [[ ${_Dbg_sig_show_stack[$_Dbg_signum]} == "showstack" ]] ; then
+ _Dbg_cmd_stack_trace 0
+ fi
+ fi
+ if [[ ${_Dbg_sig_stop[$_Dbg_signum]} == "stop" ]] ; then
+
+ ### The below duplicates what is above in _Dbg_debug_trap handler
+ ### Should put common stuff into a function.
+
+ shift # signum
+
+ _Dbg_bash_command=$1
+ shift
+
+ # Save values of $1 $2 $3 when debugged program was stopped
+ # We use the loop below rather than _Dbg_set_args="(@)" because
+ # we want to preserve embedded blanks in the arguments.
+ local -i _Dbg_n=${#@}
+ local -i _Dbg_i=1
+ for (( ; _Dbg_n > 0; _Dbg_n-- )) ; do
+ _Dbg_arg[$_Dbg_i]=$1
+ ((_Dbg_i++))
+ shift
+ done
+ unset _Dbg_arg[0] # Get rid of line number; makes array count
+ # correct; also listing all _Dbg_arg works
+ # like $*.
+
+ _Dbg_set_debugger_entry
+ _Dbg_cmdloop # enter debugger
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_rc
+
+ elif (( _Dbg_sig_old_handler[_Dbg_signum] )) ; then
+ eval ${_Dbg_sig_old_handler[$_Dbg_signum]}
+ fi
+ _Dbg_set_to_return_from_debugger 1
+ return $_Dbg_debugged_exit_code
+}
+
+_Dbg_err_handler() {
+ if [[ $_Dbg_old_ERR_handler != '' ]] ; then
+ eval $_Dbg_old_ERR_handler
+ fi
+ _Dbg_msg "Error occured at ${BASH_SOURCE[1]}:${BASH_LINENO[1]}"
+ _Dbg_cmdloop
+}
+
+# Echo the name for a given signal number $1. The resulting name
+# is in _Dbg_return
+_Dbg_signum2name() {
+ local -i -r signum=$1;
+ builtin kill -l $signum 2>/dev/null
+ return $?
+}
+
+# Return the signal number for a given signal name $1. The resulting number
+# is in _Dbg_return
+_Dbg_name2signum() {
+ local -r signame=$1;
+ builtin kill -l $signame 2>/dev/null
+ return $?
+}
+
+# Process debugger "handle" command.
+_Dbg_cmd_handle() {
+ local sig=$1
+ local cmd=$2
+ local -i signum
+ if [[ -z $sig ]] ; then
+ _Dbg_msg "Missing signal name or signal number."
+ return 1
+ fi
+
+ eval "$_seteglob"
+ if [[ $sig == $int_pat ]]; then
+ eval "$_resteglob"
+ signame=`_Dbg_signum2name $sig`
+ if (( $? != 0 )) ; then
+ _Dbg_msg "Bad signal number: $sig"
+ return 1
+ fi
+ signum=sig
+ else
+ eval "$_resteglob"
+ local signum;
+ signum=`_Dbg_name2signum $sig`
+ if (( $? != 0 )) ; then
+ _Dbg_msg "Bad signal name: $sig"
+ return 1
+ fi
+ fi
+
+ case $cmd in
+ nop | nopr | nopri | noprin | noprint )
+ _Dbg_sig_print[signum]='noprint'
+ ;;
+
+ nosta | nostac | nostack )
+ _Dbg_sig_show_stack[signum]='nostack'
+ ;;
+
+ nosto | nostop )
+ _Dbg_sig_stop[signum]='nostop'
+ ;;
+
+ p | pr | pri | prin | print )
+ _Dbg_sig_print[signum]='print'
+ ;;
+
+ sta | stac | stack )
+ _Dbg_sig_show_stack[signum]='showstack'
+ ;;
+
+ sto | stop )
+ _Dbg_sig_stop[signum]='stop'
+ ;;
+ * )
+ if (( !cmd )) ; then
+ _Dbg_msg \
+ "Need to give a command: stop, nostop, stack, nostack, print, noprint"
+ else
+ _Dbg_msg "Invalid handler command $cmd"
+ fi
+ ;;
+ esac
+
+}
+
+_Dbg_subexit_handler() {
+ # Read in the journal to pick up variable settings that might have
+ # been left from a subshell.
+ if [[ ${FUNCNAME[1]} == _Dbg_* ]] && (( !_Dbg_debug_debugger )); then
+ return 0
+ fi
+ _Dbg_source_journal
+ if (( $BASHDB_QUIT_LEVELS > 0 )) ; then
+ _Dbg_cmd_quit $_Dbg_debugged_exit_code
+ fi
+}
+
+# Set up generic trap handler. Arguments are:
+# NAME print showstack stop passthrough
+_Dbg_init_trap() {
+ local -r name=$1
+ local -i -r signum=`_Dbg_name2signum $name`
+
+ _Dbg_sig_print[$signum]=$2;
+ _Dbg_sig_show_stack[$signum]=$3;
+ _Dbg_sig_stop[$signum]=$4;
+
+ # Work out passthrough later...
+ # if [[ $5 == "pass*" ]] ; then
+ # get existing trap from env.
+ # _Dbg_sig_show_passthrough[$signum]=....;
+ #
+
+ if (( signum == 0 )) ; then
+ trap '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
+ else
+ local trap_cmd="trap '_Dbg_sig_handler $signum \"\$BASH_COMMAND\" \"\$@\"' $name"
+ eval $trap_cmd
+ fi
+}
+
+_Dbg_init_trap EXIT "noprint" "nostack" "stop"
+_Dbg_init_trap INT "print" "showstack" "stop"
+_Dbg_init_trap TRAP "print" "showstack" "stop"
+_Dbg_init_trap TERM "print" "showstack" "stop"
+_Dbg_init_trap QUIT "print" "showstack" "stop"
+_Dbg_init_trap TRAP "print" "showstack" "stop"
+_Dbg_init_trap ILL "print" "showstack" "stop"
+
+# This is put at the so we have something at the end to stop at
+# when we debug this. By stopping at the end all of the above functions
+# and variables can be tested.
+typeset -r _Dbg_sig_ver=\
+'$Id: dbg-sig.inc,v 1.4 2003/03/21 17:59:57 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/dbg-stack.inc cvs/debugger/dbg-stack.inc
--- bash-2.05b/debugger/dbg-stack.inc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/dbg-stack.inc 2003-02-27 08:27:46.000000000 +0100
@@ -0,0 +1,178 @@
+# dbg-stack.inc - Bourne Again Shell Debugger Call Stack routines
+#
+# Copyright (C) 2002,2003 Rocky Bernstein
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+
+#================ VARIABLE INITIALIZATIONS ====================#
+
+# The top number items on the FUNCNAME stack are debugging routines
+# Set the index in FUNCNAME that should be reported as index 0 (or top).
+typeset -ir _Dbg_stack_top=2
+typeset -i _Dbg_stack_pos # Where are we in stack?
+
+#======================== FUNCTIONS ============================#
+
+# Move default values down $1 or one in the stack.
+
+_Dbg_cmd_down() {
+ local -i count=${1:-1}
+
+ if (( _Dbg_stack_pos-count < _Dbg_stack_top )) ; then
+ _Dbg_msg "Would be beyond bottom-most entry."
+ return
+ fi
+ ((_Dbg_stack_pos -= $count))
+ local -i j=_Dbg_stack_pos+1
+ _Dbg_listline=${BASH_LINENO[$_Dbg_stack_pos]}
+ _cur_source_file=${BASH_SOURCE[$j]}
+ _Dbg_print_source_line $_Dbg_listline
+}
+
+_Dbg_cmd_frame() {
+ eval "$_seteglob"
+ if [[ $1 != '' && $1 != $int_pat ]] ; then
+ _Dbg_msg "Bad integer parameter: $1"
+ eval "$_resteglob"
+ return
+ fi
+ eval "$_resteglob"
+ local -i pos=${1:-0}
+ if (( _Dbg_stack_top+pos+1 >= ${#FUNCNAME[@]} )) ; then
+ _Dbg_msg "Would be beyond top-most entry."
+ return
+ fi
+ _Dbg_stack_pos=$_Dbg_stack_top+$pos
+ _Dbg_cmd_stack_trace 2 1 $pos
+ local -i k=_Dbg_stack_pos+1
+ _Dbg_listline=${BASH_LINENO[$_Dbg_stack_pos]}
+ _cur_source_file=${BASH_SOURCE[$k]}
+ _Dbg_print_source_line
+}
+
+# Print a stack trace.
+# $1 is an additional offset correction - this routine is called from two
+# different places and one routine has one more additional call on top.
+# $2 is the maximum number of entries to include.
+# This code assumes the's debugger version of
+# bash where FUNCNAME is an array, not a variable.
+
+_Dbg_cmd_stack_trace() {
+
+ local -i n=${#FUNCNAME[@]}-1
+
+ eval "$_seteglob"
+ if [[ $1 != $int_pat ]] ; then
+ _Dbg_msg "Bad integer parameter: $1"
+ eval "$_resteglob"
+ return 1
+ fi
+ if [[ $2 != '' && $2 != $int_pat ]] ; then
+ _Dbg_msg "Bad integer parameter: $2"
+ eval "$_resteglob"
+ return 1
+ fi
+ eval "$_resteglob"
+
+ local prefix='##'
+ local -i count=${2:-$n}
+ local -i k=${3:-0}
+ local -i i=_Dbg_stack_top+k+$1
+ local -i j=i
+
+ (( j > n )) && return 1
+ (( i == _Dbg_stack_pos+$1 )) && prefix='->'
+ if (( k == 0 )) ; then
+ local filename=${BASH_SOURCE[$i]}
+ (( _Dbg_basename_only )) && filename=${filename##*/}
+ _Dbg_msg "$prefix$k in file \`$filename' at line $_curline"
+
+ ((count--)) ; ((k++))
+ fi
+
+ # Figure out the index in BASH_ARGV is position "i" (the place where
+ # we start our stack trace from). variable "r" will be that place.
+
+ local -i q
+ local -i r=0
+ for (( q=0 ; q<i ; q++ )) ; do
+ (( r = r + ${BASH_ARGC[$q]} ))
+ done
+
+ # Loop which dumps out stack trace.
+ for (( ; (( i <= n && count > 0 )) ; i++ )) ; do
+ local -i arg_count=${BASH_ARGC[$i]}
+ ((j++)) ; ((count--))
+ prefix='##'
+ (( i == _Dbg_stack_pos )) && prefix='->'
+ if (( i == n )) ; then
+ # main()'s file is the same as the first caller
+ j=i
+ fi
+
+ _Dbg_msg_nocr "$prefix$k ${FUNCNAME[$i]}("
+
+ local parms=''
+
+ # Print out parameter list.
+ if (( 0 != ${#BASH_ARGC[@]} )) ; then
+ local -i s
+ for (( s=0; s < arg_count; s++ )) ; do
+ if (( s != 0 )) ; then
+ parms="\"${BASH_ARGV[$r]}\", $parms"
+ elif [[ ${FUNCNAME[$i]} == "source" ]] \
+ && (( _Dbg_basename_only )); then
+ local filename=${BASH_ARGV[$r]}
+ filename=${filename##*/}
+ parms="\"$filename\""
+ else
+ parms="\"${BASH_ARGV[$r]}\""
+ fi
+ ((r++))
+ done
+ fi
+
+ local filename=${BASH_SOURCE[$j]}
+ (( _Dbg_basename_only )) && filename=${filename##*/}
+ _Dbg_msg "$parms) called from file \`$filename'" \
+ "at line ${BASH_LINENO[$i]}"
+ ((k++))
+ done
+ return 0
+}
+
+# Move default values up $1 or one in the stack.
+
+_Dbg_cmd_up() {
+ local -i count=${1:-1}
+
+ if (( _Dbg_stack_pos+count+1 >= ${#FUNCNAME[@]} )) ; then
+ _Dbg_msg "Would be beyond top-most entry."
+ return
+ fi
+ ((_Dbg_stack_pos += $count))
+ local -i k=_Dbg_stack_pos+1
+ _Dbg_listline=${BASH_LINENO[$_Dbg_stack_pos]}
+ _cur_source_file=${BASH_SOURCE[$k]}
+ _Dbg_print_source_line $_Dbg_listline
+}
+
+# This is put at the so we have something at the end when we debug this.
+_Dbg_stack_ver='$Id: dbg-stack.inc,v 1.2 2003/02/27 07:27:46 rockyb Exp $'
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/.#bashdb.texi.1.5 cvs/debugger/doc/.#bashdb.texi.1.5
--- bash-2.05b/debugger/doc/.#bashdb.texi.1.5 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/.#bashdb.texi.1.5 2003-08-30 08:09:04.000000000 +0200
@@ -0,0 +1,3754 @@
+\input texinfo @c -*-texinfo-*-
+@c Copyright 2002, 2003
+@c Rocky Bernstein for the Free Software Foundation
+@c
+@c TODO:
+@c - add examples for commands
+@c - clean up/improve sample session
+@c - help text is inaccurate and formatted too much to right.
+@c
+
+@c Sets version and release names and dates. Frees us from changing
+@c this file when a new release comes along.
+
+@c %**start of header
+@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
+@c of @set vars. However, you can override filename with makeinfo -o.
+@setfilename bashdb.info
+@c
+@c Name of Bash program. Used in running text.
+@set BASH @acronym{BASH}
+
+@c
+@c Name of debugger program. Used also for prompt string.
+@set DBG the @value{BASH} debugger
+@set dBGP The @value{BASH} debugger
+@set DDD @acronym{DDD}
+
+@settitle @value{BASH} Debugger
+@setchapternewpage odd
+@setcontentsaftertitlepage
+
+@c %**end of header
+
+@include version.texi
+
+@c A simple macro for optional variables.
+@macro ovar{varname}
+@r{[}@var{\varname\}@r{]}
+@end macro
+
+@macro DDD {}
+@acronym{DDD}
+@end macro
+
+@macro BASH {}
+@acronym{@value{BASH}}
+@end macro
+
+@macro DBG {}
+@value{DBG}
+@end macro
+
+@iftex
+@c @smallbook
+@c @cropmarks
+@end iftex
+
+@finalout
+
+@c readline appendices use @vindex, @findex and @ftable,
+@c annotate.texi and gdbmi use @findex.
+@c @syncodeindex vr cp
+@c @syncodeindex fn cp
+
+@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
+
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* @value{DBG}: (@value{DBG}). The @sc{bash} debugger.
+@end direntry
+
+@ifinfo
+This file documents the @sc{bash} debugger @value{BASH}.
+
+
+This is the @value{EDITION} Edition, @value{UPDATED-MONTH},
+of @cite{Debugging with BASHDB: the @sc{gnu} Source-Level Debugger}
+for REBASH
+
+Copyright (C) 2002,2003 Rocky Bernstein for the Free Software Foundation.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+@ifset DEBIANHASBECOMEREASONABLE
+@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on
+@c Sat, 23 Aug 2003 14:24:44 +0200
+@c
+@c I personally see the invariant sections as the thing in the
+@c GFDL, which hinders me in uploading the package to the archives.
+@c I don't have any problem, if some other Debian developer makes a
+@c bashdb package built from separate sources.
+@c
+@c I am aware that Debian ships other packages containing documentation
+@c covered by the GFDL (and one of them for which I do the packaging as
+@c well), but I won't add a new package, which I maintain. So before an
+@c upload of a bashdb package built from the bash sources either
+@c
+@c
+@c - Debian has a position on the GFDL, which allows inclusion
+@c
+@c - the bashdb manual does not have invariant sections, or is
+@c relicensed, or dual licensed.
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Free Software'' and ``Free Software Needs
+Free Documentation'', with the Front-Cover Texts being ``A GNU
+Manual,'' and with the Back-Cover Texts as in (a) below.
+
+(a) The Free Software Foundation's Back-Cover Text is: ``You have
+freedom to copy and modify this GNU Manual, like GNU software. Copies
+published by the Free Software Foundation raise funds for GNU
+development.''
+@else
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@end ifset
+@end ifinfo
+
+@titlepage
+@title Debugging with BASHDB
+@sp 1
+@subtitle @value{EDITION} Edition, for BASH
+@subtitle @value{UPDATED-MONTH}
+@author Rocky Bernstein
+@page
+@tex
+{\parskip=0pt
+\hfill (Send bugs and comments on bashdb to bug-bashdb\@sourceforge.net.)\par
+\hfill {\it Debugging with BASH}\par
+\hfill \TeX{}info \texinfoversion\par
+}
+@end tex
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2002,2003 Rocky Bernstein for the Free Software
+Foundation.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+@ifset DEBIANHASBECOMEREASONABLE
+@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on
+@c Sat, 23 Aug 2003 14:24:44 +0200
+@c
+@c I personally see the invariant sections as the thing in the
+@c GFDL, which hinders me in uploading the package to the archives.
+@c I don't have any problem, if some other Debian developer makes a
+@c bashdb package built from separate sources.
+@c
+@c I am aware that Debian ships other packages containing documentation
+@c covered by the GFDL (and one of them for which I do the packaging as
+@c well), but I won't add a new package, which I maintain. So before an
+@c upload of a bashdb package built from the bash sources either
+@c
+@c
+@c - Debian has a position on the GFDL, which allows inclusion
+@c
+@c - the bashdb manual does not have invariant sections, or is
+@c relicensed, or dual licensed.
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Free Software'' and ``Free Software Needs
+Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below.
+
+(a) The Free Software Foundation's Back-Cover Text is: ``You have
+freedom to copy and modify this GNU Manual, like GNU software. Copies
+published by the Free Software Foundation raise funds for GNU
+development.''
+@else
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@end ifset
+@end titlepage
+@page
+
+@ifnottex
+@node Top, Summary, (dir), (dir)
+
+@top Debugging with @DBG
+
+This file describes @value{DBG}, the @sc{bash} symbolic debugger.
+
+This is the @value{EDITION} Edition, @value{UPDATED-MONTH}, for REBASH.
+
+Copyright (C) 2002,2003 Rocky Bernstein
+
+@menu
+* Summary:: Overview of Debugger with a sample session
+
+* Invocation:: Getting in and out
+* Running:: Script setup inside the BASH debugger
+* Debugger Command Reference:: BASH debugger command reference
+
+* Front Ends:: Using @DBG from a front-end user interface
+
+* BASH Debugger Bugs:: Reporting bugs
+* History and Acknowledgments:: History and Acknowledgments
+
+Appendices
+* Formatting Documentation:: How to format and print @DBG documentation
+
+* Installing bashdb:: Installing bashdb
+* Copying:: GNU General Public License says
+ how you can copy and share bashdb
+* GNU Free Documentation License:: The license for this documentation
+
+Indexes (nodes containing large menus)
+* Function Index:: An item for each function name.
+* Command Index:: An item for each command name.
+* Variable Index:: An item for each documented variable.
+* General Index:: An item for each concept.
+@end menu
+
+@end ifnottex
+
+@contents
+
+@node Summary
+@chapter Summary of the BASH Debugger
+
+The purpose of a debugger such as @DBG is to allow you to see what is
+going on ``inside'' a bash script while it executes.
+
+@DBG can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+@itemize @bullet
+@item
+Start your script, specifying anything that might affect its behavior.
+
+@item
+Make your script stop on specified conditions.
+
+@item
+Examine what has happened, when your script has stopped.
+
+@item
+Change things in your script, so you can experiment with correcting the
+effects of one bug and go on to learn about another.
+@end itemize
+
+Although you can use the BASH debugger to debug scripts written in
+BASH, it can also be used just as a front-end for learning more
+about programming in BASH. As an additional aid, the debugger can
+be used within the context of an existing script with its functions
+and variables that have already been initialized; fragments of the
+existing can be experimented with by entering them inside the debugger.
+
+@menu
+* Sample Session:: A Sample BASH Debugger session
+* Free Software:: Freely redistributable software
+@end menu
+
+@node Sample Session
+@section A Sample BASH Debugger Session
+
+You can use this manual at your leisure to read all about @value{DBG}.
+However, a handful of commands are enough to get started using the
+debugger. This chapter illustrates those commands.
+
+@iftex
+In this sample session, we emphasize user input like this: @b{input},
+to make it easier to pick out from the surrounding output.
+@end iftex
+
+Below we will debug a script that contains a function to compute the
+factorial of a number: fact(0) is 1 and fact(n) is n*fact(n-1).
+
+@smallexample
+$ @b{bashdb -L . fact.sh}
+Bourne-Again Shell Debugger, release bash-@value{BASHRELEASE}
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+(fact.sh:9):
+9: echo fact 0 is: `fact 0`
+bashdb<0> @b{-}
+ 1: #!/usr/local/bin/bash
+ 2: fact() @{
+ 3: ((n==0)) && echo 1 && return
+ 4: ((nm1=n-1))
+ 5: ((result=n*`fact $nm1`))
+ 6: return $result
+ 7: @}
+ 8:
+ 9:==> echo fact 0 is: `fact 0`
+bashdb<1> @b{l}
+ 10: echo fact 3 is: $(fact 3)
+@end smallexample
+
+@noindent
+
+The command invocation uses the option ``-L .'' Here we assume that
+the @command{bashdb} script and the debugger files are in the same
+location. If you are running from the source code, this will be the
+case. However if bashdb has been installed this probably won't be true
+and here you probably don't need to use ``-L .'' Instead you would
+type simply @code{bashdb fact.sh}.
+
+The first debugger command we gave @kbd{-}, we listed a window of
+lines @emph{before} where we were executing. Because the window, 10
+lines, is larger than the number of lines to the top of the file we
+printed only 9 lines here. The next command list starting from the
+current line and again wants to print 10 lines but because there are
+only one remaining line, that is what is printed.
+
+@smallexample
+bashdb<2> @b{step}
+(fact.sh:9):
+9: echo fact 0 is: `fact 0`
+bashdb<3> @b{@key{RET}}
+2: fact() @{
+bashdb<4> @b{@key{RET}}
+3: ((n==0)) && echo 1 && return
+bashdb<5> @b{print $n}
+
+@end smallexample
+
+Ooops... The variable @kbd{n} isn't initialized.
+
+The first @kbd{step} command steps the script one instruction. It may
+seem odd that the line printed is exactly the same one as before. What
+has happened though is that we've ``stepped'' into the subshell needed
+to run @kbd{`fact 0`}; we haven't however started running anything
+inside that subshell yet though---the function call.
+
+The first @kbd{step} command steps the script one instruction; it
+didn't advance the line number at all. That is because we were
+stopping before the command substitution or backtick is to take
+place. The second command we entered was just hitting the return key;
+bashdb remembers that you entered @code{step} previously, so it runs
+the step rather than @kbd{next}, the other alternative when you hit
+@key{RET}. Step one more instruction and we are just before running
+the first statement of the function.
+
+Next, we print the value of the variable @kbd{n}. Notice we need to add
+a preceding dollar simple to get the substitution or value of n. As we
+will see later, if the @kbd{pe} command were used this would not be
+necessary.
+
+We now modify the file to add an assignment to local variable @kbd{n} and
+restart.
+
+@smallexample
+bashdb<6> @b{restart}
+Restarting with: /usr/local/bin/bashdb -L . fact.sh
+(fact.sh:10):
+10: echo fact 0 is: `fact 0`
+bashdb<0> @b{list 1}
+ 1: #!/usr/local/bin/bash
+ 2: fact() @{
+ 3: local -i n=$@{1:0@}
+ 4: ((n==0)) && echo 1 && return
+ 5: ((nm1=n-1))
+ 6: ((result=n*`fact $nm1`))
+ 7: return $result
+ 8: @}
+ 9:
+ 10:==> echo fact 0 is: `fact 0`
+bashdb<1> @b{s 3}
+(fact.sh:3):
+3: local -i n=$@{1:0@}
+bashdb<2> @b{step}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+bashdb<3> @b{print $n}
+print $n
+0
+@end smallexample
+
+@noindent
+This time we use the @code{list} debugger command to list the lines in
+the file. From before we know it takes three @code{steps} commands
+before we get into the fact() function, so we add a count onto the
+@code{step} command. Notice we abbreviate @code{step} with @code{s};
+we could have done likewise and abbreviated @code{list} with @code{l}.
+
+@smallexample
+bashdb<4> @b{@key{RET}}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+echo 1
+bashdb<5> @b{@key{RET}}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+return
+@end smallexample
+
+@noindent
+Again we just use @key{RET} to repeat the last @code{step}
+commands. And again the fact that we are staying on the same line 4
+means that the next condition in the line is about to be
+executed. Notice that we see the command (@code{echo 1} or
+@code{return}) listed when we stay on the same line which has multiple
+stopping points in it. Given the information above, we know that the
+value echo'ed on return will be 1.
+
+@smallexample
+bashdb<6> @b{@key{RET}}
+fact 0 is: 1
+(fact.sh:12):
+12: echo fact 3 is: $(fact 3)
+bashdb<7> @b{break 5}
+Breakpoint 1 set in file fact.sh, line 5.
+bashdb<8> @b{continue}
+@end smallexample
+
+@noindent
+We saw that we could step with a count into the function
+fact(). However above took another approach: we set a stopping point or
+``breakpoint'' at line 5 to get us a little ways into the fact()
+subroutine. Just before line 5 is to executed, we will get back into
+the debugger. The @code{continue} command just resumes execution until
+the next stopping point which has been set up in some way.
+
+@smallexample
+(fact.sh:5):
+5: ((nm1=n-1))
+Breakpoint 1 hit(1 times).
+bashdb<8> @b{x n-1}
+2
+bashdb<9> @b{s}
+(fact.sh:5):
+6: ((result=n*`fact $nm1`))
+bashdb<10> @b{c}
+fact.sh: line 6: ((: result=n*: syntax error: operand expected (error token is "*")
+bashdb<7> @b{R}
+Restarting with: bash --debugger fact.sh
+11: echo fact 0 is: `fact 0`
+bashdb<0> @b{l fact}
+ 2: fact ()
+ 3: @{
+ 4: local -i n=$@{1:0@};
+ 5: (( "n==0" )) && echo 1 && return;
+ 6: (( nm1=n-1 ));
+ 7: ((fact_nm1=`fact $nm1`))
+ 8: (( "result=n*fact_nm1" ));
+ 9: echo $result
+10: @}
+@end smallexample
+
+@noindent
+In addition to listing by line numbers, we can also list giving a
+function name. Below, instead of setting a breakpoint at line 5 and
+running ``continue'' as we did above, we try something slightly shorter
+and slightly different. We give the line number on the ``continue''
+statement. This is a little different in that a one-time break is made
+on line 5. Once that statement is reached the breakpoint is removed.
+
+@smallexample
+bashdb<1> @b{continue 5}
+One-time breakpoint 1 set in file fact.sh, line 5.
+fact 0 is: 1
+(fact.sh:5):
+5: ((nm1=n-1))
+bashdb<2> @b{s}
+6: ((fact_nm1=`fact $nm1`))
+bashdb<2> @b{s}
+2: fact() @{
+bashdb<3> @b{T}
+->0 in file `fact.sh' at line 2
+##1 fact("3") called from file `fact.sh' at line 12
+##2 source("fact.sh") called from file `/usr/local/bin/bashdb' at line 154
+##3 main("fact.sh") called from file `/usr/local/bin/bashdb' at line 0
+bashdb<4> @b{c}
+fact 3 is: 6
+Debugged program terminated normally. Use q to quit or R to restart.
+@end smallexample
+
+@noindent
+When we stop at line 5 above, we have already run fact(0) and output
+the correct results. The output from the program ``fact 0 is: 1'' is
+intermixed with the debugger output. The @code{T} command above
+requests call stack output and this confirms that we are not in the
+fact(0) call but in the fact(3) call. There are 4 lines listed in the
+stack trace even though there is just one call from the main
+program. The top line of the trace doesn't really represent a call,
+it's just where we currently are in the program. That last line is an
+artifact of invoking bash from the bashdb script rather than running
+@code{bash --debugger}.
+
+The last message in the output above @samp{Debugged program exited
+normally.} is from @value{DBG}; it indicates script has finished
+executing. We can end our @value{DDGP} session with the @value{GDBP}
+@code{quit} command.
+
+Above we did our debugging session on the command line. If you are a
+GNU Emacs user, you can do your debugging inside that. Also there is
+a(nother) GUI interface called DDD that supports @value{DBG}.
+
+@node Free Software
+@unnumberedsec Free software
+
+@DBG is @dfn{free software}, protected by the @sc{gnu}
+General Public License
+(GPL). The GPL gives you the freedom to copy or adapt a licensed
+program---but every person getting a copy also gets with it the
+freedom to modify that copy (which means that they must get access to
+the source code), and the freedom to distribute further copies.
+Typical software companies use copyrights to limit your freedoms; the
+Free Software Foundation uses the GPL to preserve these freedoms.
+
+Fundamentally, the General Public License is a license which says that
+you have these freedoms and that you cannot take these freedoms away
+from anyone else.
+
+@unnumberedsec Free Software Needs Free Documentation
+
+The biggest deficiency in the free software community today is not in
+the software---it is the lack of good free documentation that we can
+include with the free software. Many of our most important
+programs do not come with free reference manuals and free introductory
+texts. Documentation is an essential part of any software package;
+when an important free software package does not come with a free
+manual and a free tutorial, that is a major gap. We have many such
+gaps today.
+
+Consider Perl, for instance. The tutorial manuals that people
+normally use are non-free. How did this come about? Because the
+authors of those manuals published them with restrictive terms---no
+copying, no modification, source files not available---which exclude
+them from the free software world.
+
+That wasn't the first time this sort of thing happened, and it was far
+from the last. Many times we have heard a GNU user eagerly describe a
+manual that he is writing, his intended contribution to the community,
+only to learn that he had ruined everything by signing a publication
+contract to make it non-free.
+
+Free documentation, like free software, is a matter of freedom, not
+price. The problem with the non-free manual is not that publishers
+charge a price for printed copies---that in itself is fine. (The Free
+Software Foundation sells printed copies of manuals, too.) The
+problem is the restrictions on the use of the manual. Free manuals
+are available in source code form, and give you permission to copy and
+modify. Non-free manuals do not allow this.
+
+The criteria of freedom for a free manual are roughly the same as for
+free software. Redistribution (including the normal kinds of
+commercial redistribution) must be permitted, so that the manual can
+accompany every copy of the program, both on-line and on paper.
+
+Permission for modification of the technical content is crucial too.
+When people modify the software, adding or changing features, if they
+are conscientious they will change the manual too---so they can
+provide accurate and clear documentation for the modified program. A
+manual that leaves you no choice but to write a new manual to document
+a changed version of the program is not really available to our
+community.
+
+Some kinds of limits on the way modification is handled are
+acceptable. For example, requirements to preserve the original
+author's copyright notice, the distribution terms, or the list of
+authors, are ok. It is also no problem to require modified versions
+to include notice that they were modified. Even entire sections that
+may not be deleted or changed are acceptable, as long as they deal
+with nontechnical topics (like this one). These kinds of restrictions
+are acceptable because they don't obstruct the community's normal use
+of the manual.
+
+However, it must be possible to modify all the @emph{technical}
+content of the manual, and then distribute the result in all the usual
+media, through all the usual channels. Otherwise, the restrictions
+obstruct the use of the manual, it is not free, and we need another
+manual to replace it.
+
+Please spread the word about this issue. Our community continues to
+lose manuals to proprietary publishing. If we spread the word that
+free software needs free reference manuals and free tutorials, perhaps
+the next person who wants to contribute by writing documentation will
+realize, before it is too late, that only free manuals contribute to
+the free software community.
+
+If you are writing documentation, please insist on publishing it under
+the GNU Free Documentation License or another free documentation
+license. Remember that this decision requires your approval---you
+don't have to let the publisher decide. Some commercial publishers
+will use a free license if you insist, but they will not propose the
+option; it is up to you to raise the issue and say firmly that this is
+what you want. If the publisher you are dealing with refuses, please
+try other publishers. If you're not sure whether a proposed license
+is free, write to @email{licensing@@gnu.org}.
+
+You can encourage commercial publishers to sell more free, copylefted
+manuals and tutorials by buying them, and particularly by buying
+copies from the publishers that paid for their writing or for major
+improvements. Meanwhile, try to avoid buying non-free documentation
+at all. Check the distribution terms of a manual before you buy it,
+and insist that whoever seeks your business must respect your freedom.
+Check the history of the book, and try to reward the publishers that
+have paid or pay the authors to work on it.
+
+The Free Software Foundation maintains a list of free documentation
+published by other publishers, at
+@url{http://www.fsf.org/doc/other-free-books.html}.
+
+@node Invocation
+@chapter Getting in and out
+
+This chapter discusses how to start @value{DBG}, and how to get out of it.
+The essentials are:
+@itemize @bullet
+@item
+type @samp{bash --debugger @emph{script-name}} or @samp{bashdb
+@emph{script-name}} to start @value{DBG}.
+@item
+type @kbd{quit} or @kbd{C-d} inside the debugger to exit.
+@end itemize
+
+But also note there are two front-ends available as well. One can also
+enter the debugger inside emacs via the command @code{M-x bashdb}
+after loading Emacs' Grand Unified Debugger, @code{gud}. See
+@ref{Emacs,,Using the BASH debugger from @sc{gnu} Emacs}. And there is
+support in a @value{DDD} for bash.
+
+@menu
+* Starting the BASH debugger:: How to enter the BASH debugger
+* Quitting the BASH debugger:: How to leave the BASH debugger
+@end menu
+
+@node Starting the BASH debugger
+@section Starting the BASH debugger
+
+@emph{Note: it is important to use a debugger-enabled bash. You wil
+get an error message if the debugger is run under a version of BASH
+that does not have debugging support.}
+
+As mentioned above, one can enter @DBG via Emacs or
+DDD. However you don't have to use either of these. And these still
+need a way on their own to get things started.
+
+There are in fact two @emph{other} ways to start @value{DBG}. The
+first way is to pass the @samp{--debugger} option to bash with the
+name of your script the scripts arguments following that, or with a
+command string (@code{-c}).
+
+@example
+bash --debugger @var{script} @var{script-arguments...}
+bash --debugger -c @var{command-string}...
+@end example
+
+This calls a debugger initialization script. It works much like a
+@BASH login profile which may set variables and define
+functions. But this shell profile is customized for debugging and as
+such arranges for itself to get called before each statement is
+executed. Although there are some problems at present in I/O
+redirection that the method described next doesn't have, it is
+expected that over time more features will be enabled in bash when the
+@samp{--debugger} option is in effect. By default, both debugging in
+Emacs via GUD (@ref{Emacs,,Using the BASH debugger under Emacs}) and
+debugging via @value{DDD} work via this method.
+
+The form @samp{bash --debugger -c ...} can be used to get into the
+debugger without having to give a script name to debug. Sometimes you
+may want to do this just to see how the debugger works: try some
+debugger commands or maybe get online help. If you run @code{ddd
+--bash} without giving a script name, it in fact uses this form.
+
+In order for the @samp{--debugger} option to work however, you must
+have the debugger scripts installed in a place where @DBG can
+find them. For this reason, in developing @value{DBG}, I use a second
+method more often; it doesn't require the bash debugger to be
+installed. This method uses another script called @code{bashdb} which
+after taking its own options takes the name of the script to debugged
+and the arguments to pass to that script. Using this method, one
+would start the debugger like this:
+
+@example
+bash @var{path-to-bashdb}/bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
+@end example
+
+As with the first method, @code{bash} should be a debugger-enabled
+bash. If @code{bashdb} has the path to bash in it at the top (e.g. via
+@code{#!}), and @code{bashdb} can be found in your program-search
+path, then this might be equivalent to the above:
+
+@example
+bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
+@end example
+
+There are two or three disadvantages however of running a debugger
+this way. First @code{$0} will have the value @code{bashdb} rather
+than the script you are trying to run. For some scripts this may
+change the behavior of the debugged script. Second a traceback will
+contain additional lines showing the ``source''-ing of the debugged
+script from @code{bashdb}. And third, although this way works better
+than the first method, over time this way may come into disuse.
+
+An option that you'll probably need to use if bashdb isn't installed
+but run out of the source code directory is @samp{-L} which specifies
+the directory that contains the debugger script files.
+
+You can further control how bashdb starts up by using command-line
+options. bashdb itself can remind you of the options available.
+
+@noindent
+Type
+
+@example
+bashdb -h
+@end example
+
+@noindent
+to display all available options and briefly describe their use.
+
+When the bash debugger is invoked either by the @code{bashdb}
+front-end script or @code{bash --debugging}, the first argument that
+does not have an associated option flag for @code{bashdb} or
+@code{bash} (as the case may be) is used as the name a the script file
+to be debugged, and any following options get passed the debugged
+script.
+
+Options for the @code{bashdb} front-end are shown in the
+following list.
+
+@menu
+* Options for the bashdb script:: Options you can pass in starting bashdb
+@end menu
+
+@node Options for the bashdb script
+@subsection Command-line options for @code{bashdb} script
+
+You can run @DBG in various alternative modes---for example, in
+batch mode or quiet mode.
+
+@table @code
+@item -h
+@cindex @code{-h}
+This option causes @value{DBG} to print some basic help and exit.
+
+@item -V
+@cindex @code{-V}
+This option causes @DBG to print its version number and
+no-warranty blurb, and exit.
+
+@item -n
+@cindex @code{-n}
+Do not execute commands found in any initialization files. Normally,
+@BASH executes the commands in these files after all the command
+options and arguments have been processed. @xref{Command Files,,Command
+files}.
+
+@item -q
+@cindex @code{-q}
+``Quiet''. Do not print the introductory and copyright messages. These
+messages are also suppressed in batch mode.
+
+@item -t
+@cindex @code{-t}
+``Terminal output''. Set the file or terminal that you want debugger command
+output to go to. Note that the debugger output is independent of the
+debugged script output.
+
+@item -L @var{directory}
+@cindex @code{-L}
+Set directory where debugger files reside to @var{directory}. The
+default location is @code{../lib/bashdb} relative to the place that
+the bashdb script is located. For example if bashdb is located in
+@code{/usr/local/bin/bashdb}, the default library location will be
+@code{/usr/local/lib/bashdb} which may or may not exist. If it doesn't
+you'll get an error when you run bashdb. Only if the default location
+is incorrect, should you need to use the @code{-L} option.
+
+@item -T @var{directory}
+@cindex @code{-T}
+Set directory to use for writing temporary files.
+
+@end table
+
+@node Quitting the BASH debugger
+@section Quitting the BASH debugger
+
+@cindex interrupt
+An interrupt (often @kbd{C-c}) does not exit from @value{DBG}, but
+rather terminates the action of any @DBG command that is in
+progress and returns to @value{DBG} command level. Inside a debugger
+command interpreter, use @code{quit} command (@pxref{Quit, ,Quitting
+the BASH debugger}).
+
+@node Running
+@chapter Script Setup inside the BASH Debugger
+
+@menu
+* Starting:: Starting your script
+* Command Files:: Command files
+* Arguments:: Your script's arguments
+* Input/Output:: Your script's input and output
+* Script/Debugger Interaction:: Keeping out of each other's harm
+@end menu
+
+@need 2000
+@node Starting
+@section Starting your script
+@cindex starting
+@cindex running
+
+@table @code
+@kindex restart
+@kindex run @r{(@code{restart})}
+@kindex R @r{(@code{restart})}
+@item restart @ovar{options to debugged script}
+@itemx run
+@itemx R
+Use the @code{restart} command to restart your script under
+@value{DBG}. Without any arguments, the script name and parameters
+from the last invocation are used. @value{dBGP} tries to maintain the
+settings, watchpoints, breakpoints, actions and so on. Internally it
+uses line numbers and filenames to record he position of interesting
+places in your porgram; so if your program changes some or all of
+these numbers may be off. Environment variable
+@code{BASHDB_RESTART_FILE} is and a temporary file are used to signal
+a restart, so you shouldn't uset @code{BASHDB_RESTART_FILE} (or any
+environment variable starting with @code{BASHDB_}.
+
+@end table
+
+@node Command Files
+@section Command files
+
+@cindex command files
+A command file for @DBG is a file of lines that are @DBG
+commands. Comments (lines starting with @kbd{#}) may also be included.
+An empty line in a command file does nothing; it does not mean to repeat
+the last command, as it would from the terminal.
+
+@cindex init file
+@cindex @file{.bashdbinit}
+@cindex @file{bashdb.ini}
+When you start @value{DBG}, it automatically executes commands from its
+@dfn{init files}, normally called @file{.bashdbinit}@footnote{The DJGPP
+port of @DBG uses the name @file{bashdb.ini} instead, due to the
+limitations of file names imposed by DOS filesystems.}.
+During startup, @DBG does the following:
+
+@enumerate
+@item
+Reads the init file (if any) in your home directory@footnote{On
+DOS/Windows systems, the home directory is the one pointed to by the
+@code{HOME} environment variable.}.
+
+@item
+Processes command line options and operands.
+
+@item
+Reads the init file (if any) in the current working directory.
+
+@item
+Reads command files specified by the @samp{-x} option.
+@end enumerate
+
+The init file in your home directory can set options (such as @samp{set
+complaints}) that affect subsequent processing of command line options
+and operands. Init files are not executed if you use the @samp{-x}
+option (@pxref{Options for the bashdb script, ,bashdb script options}).
+
+@cindex init file name
+On some configurations of @value{DBG}, the init file is known by a
+different name (these are typically environments where a specialized
+form of @DBG may need to coexist with other forms, hence a
+different name for the specialized version's init file). These are the
+environments with special init file names:
+
+You can also request the execution of a command file with the
+@code{source} command:
+
+@table @code
+@kindex source
+@item source @var{filename}
+Execute the command file @var{filename}.
+@end table
+
+The lines in a command file are executed sequentially. They are not
+printed as they are executed. If there is an error, execution
+proceeds to the next command in the file.
+
+@node Arguments
+@section Your script's arguments
+
+@cindex arguments (to your script)
+The arguments to your script can be specified by the arguments of the
+@code{restart} command.
+They are passed to a shell, which expands wildcard characters and
+performs redirection of I/O, and thence to your script.
+
+@code{restart} with no arguments uses the same arguments used by the previous
+@code{restart}, or those set by the @code{set args} command..
+
+@table @code
+@kindex set args
+@item set args
+Specify the arguments to be used the next time your program is run. If
+@code{set args} has no arguments, @code{restart} executes your program
+with no arguments. Once you have run your program with arguments,
+using @code{set args} before the next @code{restart} is the only way to run
+it again without arguments.
+
+@kindex show args
+@item show args
+Show the arguments to give your program when it is started.
+@end table
+
+@node Input/Output
+@section Your script's input and output
+
+@cindex redirection
+@cindex I/O
+@cindex terminal
+By default, the script you run under the BASH debugger does input and
+output to the same terminal that BASH uses. Before running the script
+to be debugged, the debugger records the tty that was in effect. All
+of its output is then written to that. However you can change this
+when using the @samp{bashdb} script using the @samp{-t} option.
+
+
+@table @code
+@kindex info terminal
+@item info terminal
+Displays information recorded by @DBG about the terminal modes your
+program is using.
+@end table
+
+@kindex tty
+@cindex controlling terminal
+Another way to specify where your script should do input and output is
+with the @code{tty} command. This command accepts a file name as
+argument, and causes this file to be the default for future @code{restart}
+commands. It also resets the controlling terminal for the child
+process, for future @code{restart} commands. For example,
+
+@example
+tty /dev/ttyb
+@end example
+
+@noindent
+directs that processes started with subsequent @code{restart} commands
+default to do input and output on the terminal @file{/dev/ttyb} and have
+that as their controlling terminal.
+
+An explicit redirection in @code{restart} overrides the @code{tty} command's
+effect on the input/output device, but not its effect on the controlling
+terminal.
+
+When you use the @code{tty} command or redirect input in the @code{restart}
+command, only the input @emph{for your script} is affected. The input
+for @DBG still comes from your terminal.
+
+@node Script/Debugger Interaction
+@section Script/Debugger Interaction
+
+@value{dBGP} and your program live in the same variable space so
+to speak. @BASH does not have a notion of module scoping or lexical
+hiding (yet) and this then imposes some additional care and awareness.
+
+Most of the variables and functions used inside @DBG start
+@code{_Dbg_}, so please don't use variables or functions with these
+names in your program.
+
+@emph{Note: there are some other variables that begin with just an
+underscore (@code{_}); over time these will be phased out. But until
+then, avoid those or consult what is used by the debugger. Run
+@samp{bashdb --debugger -c 'declare -p'} to list all the variables in
+use including those used by the debugger.}
+
+A number of @DBG environment variables are also reserved for
+use; these start with @code{BASHDB_}. For example:
+@env{BASHDB_INPUT}, @env{BASHDB_LEVEL} and,
+@env{BASHDB_QUIT_ON_QUIT} (@pxref{Debug, ,Debug}),
+@env{BASHDB_RESTART_FILE} (@pxref{Starting, ,Starting}), to name a
+few. Finally, there are some @BASH environment dynamic
+variables and these start with @env{BASH_}. For example
+@env{BASH_SUBSHELL} (@pxref{Debug, ,Debug}), @env{BASH_COMMAND}
+(@pxref{Command Display, ,Command Display}), @env{BASH_LINENO}, and
+@env{BASH_SOURCE} to name a few.
+
+In order to do its work @value{dBGP} sets up a @code{DEBUG}
+trap. Consequently a script shouldn't reset this or the debugger will
+lose control. @value{dBGP} also sets up an @code{EXIT} handler so that
+it can gain control after the script finishes. Another signal
+intercepted is the an interrupt or @code{INT} signal. For more
+information about signal handling, @pxref{Signals, ,Signals}
+
+@node Debugger Command Reference
+@chapter BASH Debugger Command Reference
+
+You can abbreviate the long name of @DBG command to the first
+few letters of the command name, if that abbreviation is unambiguous;
+and you can repeat the @code{next} o r@code{step} commands by typing
+just @key{RET}. Some commands which require a parameter, such as
+@code{print} remember the argument that was given to them.
+
+@menu
+* Command Syntax:: How to give commands to the BASH debugger
+* Help:: How to ask for help (help)
+* Quit:: Leaving the debugger (quit)
+* Information:: Status and Debugger settings (info, show)
+* Stopping:: Stopping and continuing (break, watch, step, cont...)
+* Stack:: Examining the stack (where, up, down, frame)
+* List:: Printing source files (list)
+* Search:: Searching source files (/pat/ ?pat?)
+* Data:: Examining data (print, examine, info variables)
+* Evaluation/Execution:: Arbitrary execution (eval, shell)
+* Auto Display:: Executing expressions on stop (display, undisplay)
+* Controlling bashdb:: Controlling bashdb (set, history)
+@end menu
+
+@node Command Syntax
+@section Command syntax
+
+A BASH debugger command is a single line of input. There is no limit on
+how long it can be. It starts with a command name, which is followed by
+arguments whose meaning depends on the command name. For example, the
+command @code{step} accepts an argument which is the number of times to
+step, as in @samp{step 5}. You can also use the @code{step} command
+with no arguments. Some commands do not allow any arguments.
+
+@cindex repeating next/step commands
+@kindex RET @r{(repeat last command)}
+A blank line as input to @DBG (typing just @key{RET}) means to
+repeat the previous next or step command.
+
+@kindex # @r{(a comment)}
+@cindex comment
+Any text from a @kbd{#} to the end of the line is a comment; it does
+nothing. This is useful mainly in command files (@pxref{Command
+Files,,Command files}).
+
+@node Help
+@section Getting help (@samp{help})
+@cindex online documentation
+
+Once inside the BASH debugger, you can always ask it for information on its
+commands, using the command @code{help}.
+
+@table @code
+@kindex h @r{(@code{help})}
+@item help
+@itemx h
+You can use @code{help} (abbreviated @code{h}) with no arguments to
+display a short list of named classes of commands:
+@end table
+
+@flushleft
+@smallexample
+bashdb<0> @b{help}
+bashdb commands:
+List/search source lines: Control script execution:
+------------------------- -------------------------
+ l [start|.] [cnt] List cnt lines T [n] Stack trace
+ from line start s [n] Single step [n times]
+ l sub List source code fn n [n] Next, steps over subs
+ - or . List previous/current line <CR>/<Enter> Repeat last n or s
+ w [line] List around line c [linespec] Continue [to linespec]
+ f filename View source in file L List all breakpoints
+ /pat/ Search forward for pat b linespec Set breakpoint
+ ?pat? Search backward for pat del [n].. or D Delete a/all breaks
+ by entry number
+Debugger controls: skip skip execution of cmd
+------------------------- cl linespec Delete breakpoints by
+ H [num] Show last num commands line spec
+ q [exp] or ^D Quit returning exp R [args] Attempt a restart
+ info [cmd] Get info on cmd. u [n] Go up stack by n or 1.
+ !n or hi n Run debugger history n do [n] Go down stack by n or 1.
+ h or ? [cmd] Get help on command W [var] Add watchpoint. If no
+ info [cmd] Get info on cmd no expr, delete all
+ show [cmd] Show settings We [expr] Add Watchpoint arith
+ expr
+ so file read in dbg commands t Toggle trace
+ en/di n enable/disable brkpt,
+ set x y set a debugger variable watchpoint, or display
+ e bash-cmd evaluate a bash command tb linespec Add one-time break
+ disp expr add a display expr a linespec cmd eval "cmd" at linespec
+ M Show module versions A delete all actions
+ x expr evaluate expression ret jump out of fn or source
+ (via declare, let, eval) finish execute until return
+ deb debug into another cond n exp set breakpoint condition
+ shell script
+ !! cmd [args] execute shell command "cmd" with "args"
+
+Data Examination: also see e, t, x
+-------------------------
+ p variable Print variable
+ V [[!]pat] List variable(s) matching or not (!) matching pattern pat
+ S [[!]pat] List subroutine names [not] matching pattern pat
+
+Readline command line editing (emacs/vi mode) is available
+For more help, type h <cmd> or consult online-documentation.
+@end smallexample
+@end flushleft
+@c the above line break eliminates huge line overfull...
+
+@table @code
+@item help @var{command}
+With a command name as @code{help} argument, the BASH debugger displays
+short information on how to use that command.
+
+@example
+bashdb<0> @b{help list}
+l linespec List window lines starting at linespec.
+l min incr List incr lines starting at 'min' linespec.
+l List next window of lines.
+l . Same as above.
+ Long command name: list.
+@end example
+
+In addition to @code{help}, you can use the debugger command
+@code{info} to inquire about the state of your script, or the state of
+@DBG itself. The listings under @code{info} in the Index
+point to all the sub-commands. @xref{Command Index}.
+@end table
+
+@c @group
+@table @code
+@kindex info
+@kindex i @r{(@code{info})}
+@item info
+This command (abbreviated @code{i}) is for describing the state of
+your program. For example, you can list the arguments given to your
+script with @code{info args}, or list the breakpoints you have set
+with @code{info breakpoints}. You can get a complete list of the
+@code{info} sub-commands with @w{@code{help info}}.
+
+@example
+bashdb<0> @b{info}
+Info subcommands are: args breakpoints display files source sources stack terminal variables watchpoints
+bashdb<1> @b{info source}
+Current script file is parm.sh
+Contains 34 lines.
+@end example
+@end table
+
+
+@node Quit
+@section Quitting the BASH debugger (@samp{quit})
+
+@table @code
+@kindex quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
+@kindex q @r{(@code{quit})}
+@item quit @ovar{expression}
+@item quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
+@itemx q
+
+To exit @value{DBG}, use the @code{quit} command (abbreviated
+@code{q}), or type an end-of-file character (usually @kbd{C-d}). If
+you do not supply @var{expression}, @DBG will try to terminate
+normally or with exit code 0. Otherwise it will terminate using the
+result of @var{expression} as the exit code.
+
+A simple @code{quit} tries to terminate all nested subshells that may
+be in effect. If you are nested a subshell, this is normally
+indicated in a debugger prompt by the number of parentheses that the
+history number is inside --- no parenthesis means there is no subshell
+in effect. The dynamic variable @env{BASH_SUBSHELL} also contains the
+number of subshells in effect.
+
+If you want only to terminate some number of subshells but not all of
+them, you can give a count of the number of subshells to leave after
+the return-code expression. To leave just one level of subshell
+@code{return} does almost the same thing. (See @pxref{Returning,
+,Returning}) There is a subtle difference between the two though:
+@code{return} will leave you at the beginning of the next statement
+while @code{quit} may leave you at the place the subshell was invoked
+which may be in the middle of another command such as an assingment
+statement or condition test.
+
+If the environment variable @code{BASHDB_QUIT_ON_QUIT} is set, when the
+program terminates, the debugger will also terminate too. This may be
+useful if you are debugging a script which calls another script and
+you want this inner script just to return to the outer script.
+@end table
+
+@node Stopping
+@section Stopping and Resuming Execution (@samp{break}, @samp{watch}, @samp{step}, @samp{cont})
+
+One important use of a debugger is to stop your program before it
+terminates so that, if your script might run into trouble, you can
+investigate and find out why. However should your script accidently
+continue to termination, @DBG has arranged for it not to leave the
+debugger without your explicit instruction. That way, you can restart
+the program using the same command arguments.
+
+Inside @value{DBG}, your script may stop for any of several reasons,
+such as a signal, a breakpoint, or reaching a new line after a
+debugger command such as @code{step}. You may then examine and
+change variables, set new breakpoints or remove old ones, and then
+continue execution.
+
+@menu
+* Breakpoints:: Breakpoints, watchpoints (break, watch, clear)
+* Resuming Execution:: Resuming execution (continue, step, next, skip, debug)
+* Signals:: Signals
+@end menu
+
+@node Breakpoints
+@subsection Breakpoints, watchpoints
+
+@cindex breakpoints
+A @dfn{breakpoint} makes your script stop whenever a certain point in
+the program is reached. For each breakpoint, you can add conditions to
+control in finer detail whether your script stops.
+
+You can set breakpoints with the @code{break} command and its variants
+(@pxref{Set Breaks, ,Setting breakpoints}), to specify the place where
+your script should stop by line number. or function name in the
+debugged script.
+
+@cindex watchpoints
+@cindex breakpoint on variable modification
+A @dfn{watchpoint} is a special breakpoint that stops your script when
+the value of an expression changes. There is a different command to
+set watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}).
+
+But aside from that, you can manage a watchpoint like any other
+breakpoint: you delete enable, and disable both breakpoints and
+watchpoints using the same commands.
+
+You can arrange to have values from your program displayed automatically
+whenever @value{BASH} stops at a breakpoint. @xref{Auto Display,,
+Automatic display}.
+
+@cindex breakpoint numbers
+@cindex numbers for breakpoints
+@DBG assigns a number to each breakpoint and watchpoint when
+you create it; these numbers are successive integers starting with
+one. In many of the commands for controlling various features of
+breakpoints you use the breakpoint number to say which breakpoint you
+want to change. Each breakpoint may be @dfn{enabled} or
+@dfn{disabled}; if disabled, it has no effect on your script until you
+enable it again.
+
+@cindex watchpoints numbers
+@cindex numbers for watchpoints
+Watchpoint numbers however are distiguished from breakpoint numbers by
+virtue of their being suffixed with the either an upper- or lower-case
+`W'. For example, to enable breakpoint entry 0 along with watchpoint
+entry 1 you would write @samp{enable 1 2w}, the ``2w'' refers to the
+watchpoint; ``2W'' would work just as well.
+
+@ifset FINISHED
+@cindex breakpoint ranges
+@cindex ranges of breakpoints
+Some @DBG commands accept a range of breakpoints on which to
+operate. A breakpoint range is either a single breakpoint number, like
+@samp{5}, or two such numbers, in increasing order, separated by a
+hyphen, like @samp{5-7}. When a breakpoint range is given to a command,
+all breakpoint in that range are operated on.
+@end ifset
+
+@menu
+* Set Breaks:: Setting breakpoints (break, tbreak)
+* Set Watchpoints:: Setting watchpoints (watch, watche)
+* Delete Breaks:: Deleting breakpoints (delete, clear)
+* Disabling:: Disabling breakpoints (disable, enable)
+* Conditions:: Break conditions (condition)
+@end menu
+
+@node Set Breaks
+@subsubsection Setting breakpoints (@samp{break} @samp{tbreak})
+
+@kindex break
+@kindex b @r{(@code{break})}
+@cindex latest breakpoint
+Breakpoints are set with the @code{break} command (abbreviated
+@code{b}).
+
+@table @code
+@item break @var{function}
+Set a breakpoint at entry to function @var{function}.
+
+@item break @var{linenum}
+Set a breakpoint at line @var{linenum} in the current source file.
+The current source file is the last file whose source text was printed.
+The breakpoint will stop your script just before it executes any of the
+code on that line.
+
+@item break @var{filename}:@var{linenum}
+Set a breakpoint at line @var{linenum} in source file @var{filename};
+@var{filename} has to be one of the files previously read in and has
+to be specified exactly as the name used when read in. For a list of
+read-in files, use the @samp{info files} command.
+
+@ifset FINISHED
+@item break
+When called without any arguments, @code{break} sets a breakpoint at
+the next instruction to be executed in the selected stack frame
+(@pxref{Stack, ,Examining the Stack}). In any selected frame but the
+innermost, this makes your script stop as soon as control returns to
+that frame. If you use @code{break} without an argument in the
+innermost frame, @DBG stops the next time it reaches the
+current location; this may be useful inside loops.
+@end ifset
+
+@item break @dots{} if @var{cond}
+Set a breakpoint with condition @var{cond}; evaluate the expression
+@var{cond} each time the breakpoint is reached, and stop only if the
+value is nonzero---that is, if @var{cond} evaluates as true. The
+expression is evaluated via the @code{let} builtin funtion.
+@samp{@dots{}} stands for one of the possible arguments described
+above (or no argument) specifying where to break. The word ``if'' is
+often optional and is necessary only @samp{@dots{}} is
+omitted. @xref{Conditions, ,Break conditions}, for more information on
+breakpoint conditions.
+
+Examples:
+@example
+bashdb<0> @b{break fn1}
+Breakpoint 1 set in file parm.sh, line 3.
+bashdb<1> @b{break 28}
+Breakpoint 2 set in file parm.sh, line 28.
+bashdb<2> @b{break parm.sh:29}
+Breakpoint 3 set in file parm.sh, line 29.
+bashdb<3> @b{break 28 if x==5}
+Breakpoint 4 set in file parm.sh, line 28.
+@end example
+
+@kindex tbreak
+@item tbreak @var{args}
+Set a breakpoint enabled only for one stop. @var{args} are the
+same as for the @code{break} command, and the breakpoint is set in the same
+way, but the breakpoint is automatically deleted after the first time your
+program stops there. @xref{Disabling, ,Disabling breakpoints}.
+
+@kindex info breakpoints
+@cindex @code{$_} and @code{info breakpoints}
+@item info breakpoints @ovar{n}
+@itemx info break @ovar{n}
+@itemx info watchpoints @ovar{n}
+Print a table of all breakpoints, watchpoints set and not deleted,
+with the following columns for each breakpoint:
+
+@table @emph
+@item Breakpoint Numbers (@samp{Num})
+@item Enabled or Disabled (@samp{Enb})
+Enabled breakpoints are marked with @samp{1}. @samp{0} marks breakpoints
+that are disabled (not enabled).
+@item Count
+The number of times that breakpoint or watchpoint has been hit.
+@item Condition
+The arithmetic expression
+@item File and Line (@samp{file:line})
+The filename and line number inside that file where of breakpoint in
+the script. The file and line are separated with a colon.
+@end table
+
+@noindent
+If a breakpoint is conditional, @code{info break} shows the condition on
+the line following the affected breakpoint; breakpoint commands, if any,
+are listed after that.
+
+@noindent
+@code{info break} displays a count of the number of times the breakpoint
+has been hit.
+
+@code{info break} with a breakpoint number @var{n} as argument lists
+only that breakpoint.
+
+Examples:
+@example
+bashdb<4> @b{info break}
+Breakpoints at following places:
+Num Type Disp Enb What
+1 breakpoint keep y parm.sh:3
+2 breakpoint keep y parm.sh:28
+3 breakpoint keep y parm.sh:29
+4 breakpoint keep y parm.sh:28
+No watch expressions have been set.
+bashdb<5> @b{info break 4}
+Num Type Disp Enb What
+4 breakpoint keep y parm.sh:28
+No watch expressions have been set.
+@end example
+@end table
+
+
+@ifset FINISHED
+This is especially useful in conjunction with the
+@code{ignore} command. You can ignore a large number of breakpoint
+hits, look at the breakpoint info to see how many times the breakpoint
+was hit, and then run again, ignoring one less than that number. This
+will get you quickly to the last hit of that breakpoint.
+@end ifset
+
+@DBG allows you to set any number of breakpoints at the same place in
+your script. There is nothing silly or meaningless about this. When
+the breakpoints are conditional, this is even useful
+(@pxref{Conditions, ,Break conditions}).
+
+@node Set Watchpoints
+@subsubsection Setting watchpoints (@samp{watch}, @samp{watche})
+
+@cindex setting watchpoints
+You can use a watchpoint to stop execution whenever the value of an
+expression changes, without having to predict a particular place where
+this may happen. As with the @code{print} (@pxref{Data,,Examining
+Data}), the idiosyncracies of a BASH or any POSIX shell derivative
+suggest using two commands. The @code{watch} command is just for a
+single variables; the @code{watche} command uses the builtin ``let''
+command to evaluate an expression. If the variable you are tracking
+can take a string value, issuing something like @samp{watch foo} will
+not have the desired effect---any string assignment to @code{foo} will
+have a value 0 when it is assigned via ``let.''
+
+@table @code
+@kindex watch
+@item watch @var{var}
+Set a watchpoint for a variable. @DBG will break when the
+value of @var{var} changes. In this command do not add a leading
+dollar symbol to @var{var}.
+
+@item watche @var{expr}
+Set a watchpoint for an expression via the builtin ``let'' command.
+@DBG will break when @var{expr} is written into by the program
+and its value changes. Not that this may not work for tracking
+arbitrary string value changes. For that use @code{watch} described
+earlier.
+@end table
+
+@node Delete Breaks
+@subsubsection Deleting breakpoints (@samp{clear}, @samp{delete})
+
+@cindex clearing breakpoints, watchpoints
+@cindex deleting breakpoints, watchpoints
+It is often necessary to eliminate a breakpoint or watchpoint once it
+has done its job and you no longer want your script to stop there.
+This is called @dfn{deleting} the breakpoint. A breakpoint that has
+been deleted no longer exists; it is forgotten.
+
+With the @code{clear} command you can delete breakpoints according to
+where they are in your script. With the @code{delete} command you can
+delete individual breakpoints, or watchpoints by specifying their
+breakpoint numbers. @emph{Note: as described below under the ``clear''
+command, ``d'' is an alias for ``clear'', not ``delete''. }
+
+It is not necessary to delete a breakpoint to proceed past it. @DBG
+automatically ignores breakpoints on the first instruction to be executed
+when you continue execution.
+
+@table @code
+@kindex clear
+@kindex d @r{(@code{clear})}
+@item clear
+Delete any breakpoints at the next instruction to be executed in the
+selected stack frame (@pxref{Selection, ,Selecting a frame}). When
+the innermost frame is selected, this is a good way to delete a
+breakpoint where your script just stopped.
+
+It may seem odd that we have an alias ``d'' for ``clear.'' It so
+happens that Perl's debugger use ``d'' for its delete command and the
+delete concept in Perl's debugger corresponds to ``clear'' in
+GDB. (Perl doesn't have a notion of breakpoint entry numbers). So in
+order to be compatible with both debugger interfaces, ``d'' is used as
+an alias for ``clear.'' Clear?
+
+@item clear @var{function}
+@itemx clear @var{filename}:@var{function}
+Delete any breakpoints set at entry to the function @var{function}.
+
+@item clear @var{linenum}
+@itemx d @var{linenum}
+@ifset FINISHED
+@itemx clear @var{filename}:@var{linenum}
+@end ifset
+Delete any breakpoints set at or within the code of the specified line.
+
+@cindex delete breakpoints
+@kindex delete
+@kindex de @r{(@code{delete})}
+@item delete @ovar{breakpoints}
+Delete the breakpoints, watchpoints specified as arguments.
+
+If no argument is specified, delete all breakpoints (@DBG asks
+confirmation, unless you have @code{set confirm off}). You can
+abbreviate this command as @code{de}.
+
+
+Note that for compatibility with Perl's debugger, @code{d} means
+something else: @code{clear}.
+
+@end table
+
+@node Disabling
+@subsubsection Disabling breakpoints (@samp{disable}, @samp{enable})
+
+Rather than deleting a breakpoint or watchpoint, you might
+prefer to @dfn{disable} it. This makes the breakpoint inoperative as if
+it had been deleted, but remembers the information on the breakpoint so
+that you can @dfn{enable} it again later.
+
+You disable and enable breakpoints, watchpoints, and catchpoints with
+the @code{enable} and @code{disable} commands, optionally specifying one
+or more breakpoint numbers as arguments. Use @code{info break} or
+@code{info watch} to print a list of breakpoints, watchpoints, and
+catchpoints if you do not know which numbers to use.
+
+A breakpoint, watchpoint, or catchpoint can have any of four different
+states of enablement:
+
+@itemize @bullet
+@item
+Enabled. The breakpoint stops your program. A breakpoint set
+with the @code{break} command starts out in this state.
+@item
+Disabled. The breakpoint has no effect on your program.
+@item
+Enabled once. The breakpoint stops your program, but then becomes
+disabled.
+@item
+Enabled for deletion. The breakpoint stops your program, but
+immediately after it does so it is deleted permanently. A breakpoint
+set with the @code{tbreak} command starts out in this state.
+@end itemize
+
+You can use the following commands to enable or disable breakpoints,
+watchpoints, and catchpoints:
+
+@table @code
+@kindex disable breakpoints
+@kindex disable
+@kindex dis @r{(@code{disable})}
+@item disable @ovar{breakpoints}
+Disable the specified breakpoints---or all breakpoints, if none are
+listed. A disabled breakpoint has no effect but is not forgotten. All
+options such as ignore-counts, conditions and commands are remembered in
+case the breakpoint is enabled again later. You may abbreviate
+@code{disable} as @code{dis}.
+
+@kindex enable breakpoints
+@kindex enable
+@item enable @ovar{breakpoints}
+Enable the specified breakpoints (or all defined breakpoints). They
+become effective once again in stopping your program.
+@end table
+
+@c FIXME: I think the following ``Except for [...] @code{tbreak}'' is
+@c confusing: tbreak is also initially enabled.
+Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks,
+,Setting breakpoints}), breakpoints that you set are initially enabled;
+subsequently, they become disabled or enabled only when you use one of
+the commands above. (The command @code{until} can set and delete a
+breakpoint of its own, but it does not change the state of your other
+breakpoints; see @ref{Resuming Execution, ,Resuming Execution}.)
+
+@node Conditions
+@subsubsection Break conditions (@samp{condition})
+@cindex conditional breakpoints
+@cindex breakpoint conditions
+
+The simplest sort of breakpoint breaks every time your script reaches
+a specified place. You can also specify a @dfn{condition} for a
+breakpoint. A condition is just a BASH expression.
+
+Break conditions can be specified when a breakpoint is set, by using
+@samp{if} in the arguments to the @code{break} command. @xref{Set
+Breaks, ,Setting breakpoints}. A breakpoint with a condition
+evaluates the expression each time your script reaches it, and your
+script stops only if the condition is @emph{true}.
+
+@cindex one-time breakpoints
+There is also a notion of a ``one-time'' breakpoint which gets deleted
+as soon as it is hit, so that that breakpoint is executed once only.
+
+Conditions are also accepted for watchpoints; you may not need them,
+since a watchpoint is inspecting the value of an expression anyhow---but
+it might be simpler, say, to just set a watchpoint on a variable name,
+and specify a condition that tests whether the new value is an interesting
+one.
+
+Break conditions can be specified when a breakpoint is set, by using
+@samp{if} in the arguments to the @code{break} command. @xref{Set
+Breaks, ,Setting breakpoints}. They can also be changed at any time
+with the @code{condition} command.
+
+@ifset FINISHED
+You can also use the @code{if} keyword with the @code{watch} command.
+The @code{catch} command does not recognize the @code{if} keyword;
+@code{condition} is the only way to impose a further condition on a
+catchpoint.
+@end ifset
+
+@table @code
+@kindex condition
+@item condition @var{bnum} @var{expression}
+Specify @var{expression} as the break condition for breakpoint
+@var{bnum}. After you set a condition, breakpoint @var{bnum} stops
+your program only if the value of @var{expression} is true (nonzero).
+
+@item condition @var{bnum}
+Remove the condition from breakpoint number @var{bnum}. It becomes
+an ordinary unconditional breakpoint.
+@end table
+
+@ifset FINISHED
+When you use @code{condition}, @DBG checks @var{expression}
+immediately for syntactic correctness, and to determine whether
+symbols in it have referents in the context of your breakpoint. If
+@var{expression} uses symbols not referenced in the context of the
+breakpoint, @DBG prints an error message:
+
+@example
+No symbol "foo" in current context.
+@end example
+@end ifset
+
+@noindent
+@BASH does
+not actually evaluate @var{expression} at the time the @code{condition}
+command (or a command that sets a breakpoint with a condition, like
+@code{break if @dots{}}) is given, however.
+
+Examples;
+@example
+condition 1 x>5 # Stop on breakpoint 0 only if x>5 is true.
+condition 1 # Change that! Unconditinally stop on breakpoint 1.
+@end example
+
+@node Resuming Execution
+@subsection Resuming Execution
+
+@cindex stepping
+@cindex continuing
+@cindex resuming execution
+@dfn{Continuing} means resuming program execution until your script
+completes normally. In contrast, @dfn{stepping} means executing just
+one more ``step'' of your script, where ``step'' may mean either one
+line of source code. Either when continuing or when stepping,
+your script may stop even sooner, due to a breakpoint or a signal.
+
+@menu
+* Step:: running the next statement (step)
+* Next:: running the next statement skipping over functions (skip)
+* Finish:: running until the return of a function or ``source'' (finish)
+* Skip:: skipping the next statement (skip)
+* Continue:: continuing execution (continue)
+* Debug:: debugging into another program (debug)
+* Returning:: returning
+@end menu
+
+@node Step
+@subsubsection Step (@samp{step})
+@table @code
+@kindex step
+@kindex s @r{(@code{step})}
+@item step
+Continue running your script until control reaches a different source
+line, then stop it and return control to @value{DBG}. This command is
+abbreviated @code{s}.
+
+The @code{step} command only stops at the first instruction of a source
+line. This prevents the multiple stops that could otherwise occur in
+@code{switch} statements, @code{for} loops, etc. @code{step} continues
+to stop if a function that has debugging information is called within
+the line. In other words, @code{step} @emph{steps inside} any functions
+called within the line.
+
+@item step @ovar{count}
+Continue running as in @code{step}, but do so @var{count} times. If a
+breakpoint is reached, or a signal not related to stepping occurs before
+@var{count} steps, stepping stops right away.
+@end table
+
+@node Next
+@subsubsection Next (@samp{next})
+@table @code
+@kindex next
+@kindex n @r{(@code{next})}
+@item next @ovar{count}
+Continue to the next source line in the current (innermost) stack frame.
+This is similar to @code{step}, but function calls that appear within
+the line of code are executed without stopping. Execution stops when
+control reaches a different line of code at the original stack level
+that was executing when you gave the @code{next} command. This command
+is abbreviated @code{n}.
+
+An argument @var{count} is a repeat count, as for @code{step}.
+@end table
+
+@node Finish
+@subsubsection Finish (@samp{finish})
+@table @code
+@kindex finish
+@item finish
+Continue running until just after function returns. @emph{Currently,
+the line shown on a return is the function header, unless the
+@code{return} builtin function is executed in which case it is the
+line number of the @code{return} function.}
+
+Contrast this with the @code{return} command (@pxref{Returning,
+,Returning from a function}) and the @code{quit} (@pxref{Quitting the
+BASH debugger, ,Quitting the BASH debugger}).
+
+@end table
+
+@node Skip
+@subsubsection Skip (@samp{skip})
+@table @code
+@kindex skip
+@item skip @ovar{count}
+Skip exection of the next source line.
+This may be useful if you have an action that ``fixes'' existing code in
+the script. The @code{debug} command internally uses the @code{skip} command
+to skip over existing non-debugged invocation that was presumably just
+run.
+@end table
+
+@node Continue
+@subsubsection Continue (@samp{continue})
+@table @code
+@kindex continue
+@kindex c @r{(@code{continue})}
+@item continue @ovar{linespec}
+@itemx c @ovar{line-number}
+Resume program execution, at the address where your script last
+stopped; any breakpoints set at that address are bypassed. The
+optional argument @var{linespec} allows you to specify a linespec (a
+line number, function, or filename linenumber combination) to set. A
+one-time breakpoint is deleted when that breakpoint is reached. Should
+the program stop before that breakpoint is reached, for example,
+perhaps another breakpoint or watchpoint is reached first, in a
+listing of the breakpoints you will see this entry with the condition
+9999 which indicates a one-time breakpoint.
+@end table
+
+To resume execution at a different place, you can use @code{return}
+(@pxref{Returning, ,Returning from a function}) to go back to the
+calling function or sourced script. If you are nested inside a
+subshell, @code{quit} with a value for the number of subshells to
+exit also functions like a return.
+
+A typical technique for using stepping is to set a breakpoint
+(@pxref{Breakpoints, ,Breakpoints; watchpoints}) at the
+beginning of the function or the section of your script where a problem
+is believed to lie, run your script until it stops at that breakpoint,
+and then step through the suspect area, examining the variables that are
+interesting, until you see the problem happen.
+
+@node Debug
+@subsubsection Debug (@samp{debug})
+@table @code
+@kindex debug
+@item debug @ovar{script-name}
+Debug into @var{script-name}. If no name is given the current source line
+is used. In either case the options are prepended to cause the
+debugger to run.
+
+The nesting level of the debugger is saved inside environment variable
+@code{BASHDB_LEVEL}. The debugger prompt indicates the level of nesting
+by enclosing the history in that many nestings of @code{<>} symbols.
+
+@end table
+
+@node Returning
+@subsubsection Returning from a function, sourced file, or subshell (@samp{return})
+
+@table @code
+@cindex returning from a function, sourced file or subshell
+@kindex return
+@item return
+@itemx return
+You can cancel execution of a function call or a subshell with the
+@code{return} command.
+@end table
+
+The @code{return} command does not resume execution; it leaves the
+program stopped in the state that would exist if the function had just
+returned. See also the @code{quit} command (@ref{Quit, ,Quitting the
+BASH debugger}). In some situations @code{return} is similar to
+@code{quit}: in particular when the script is @emph{not} currenlty
+inside in a function and the number of subshells in effect is 0, or
+when a subshell count of 1 is given on the @code{quit} command.
+
+@ifset FINISHED
+In contrast, the @code{finish} command (@pxref{Continuing
+and Stepping, ,Continuing and stepping}) resumes execution until the
+selected stack frame returns naturally.
+@end ifset
+
+@node Signals
+@subsection Signals
+@cindex signals
+
+A signal is an asynchronous event that can happen in a program. The
+operating system defines the possible kinds of signals, and gives each
+kind a name and a number. For example, in Unix @code{SIGINT} is the
+signal a program gets when you type an interrupt character (often
+@kbd{C-c}); @code{SIGALRM} occurs when the alarm clock timer goes off
+(which happens only if your program has requested an alarm).
+
+Some signal handlers are installed and changed for @value{DBG}'s
+normal use: @code{SIGDEBUG} and @code{SIGEXIT}. @code{SIGDEBUG} is
+used by the debugger to potentially stop your program before execution
+of each statement occurs, and @code{SIGEXIT} is used to catch your
+program just before it is set to leave so you have the option of
+restarting the program with the same options (and not leave the
+debugger) or let the program quit.
+
+Signal handlers that the debugged script might have installed are
+saved and called before the corresponding debugger handler. Thus, the
+debugged program should work roughly in the same fashion as when it is
+not debugged. However there are some call-stack variables which
+inevitably will differ. To try to hedge this a little so the behaviour
+is the same, @value{DBG} will modify arguments to the traps if it
+finds one of the call-stack that change as a result of the debugger
+being in place. In particluar @env{$LINENO} will get replaced with
+@env{$@{BASH_LINENO[0]@}}; also @env{$@{BASH_LINENO[0]@}} and
+@env{$@{BASH_SOURCE[0]@}} get replaced with
+@env{$@{BASH_LINENO[1]@}} and @env{$@{BASH_SOURCE[1]@}}
+respectively.
+
+The debugger also installs an interrupt handler @code{SIGINT} so that
+errant programs can be interrupted and you can find out where the
+program was when you interrupted it.
+
+@cindex fatal signals
+Some signals, including @code{SIGALRM}, are a normal part of the
+functioning of your program. Others, such as @code{SIGSEGV}, indicate
+errors; these signals are @dfn{fatal} (they kill your program immediately) if the
+program has not specified in advance some other way to handle the signal.
+@code{SIGINT} does not indicate an error in your program, but it is normally
+fatal so it can carry out the purpose of the interrupt: to kill the program.
+
+@BASH has the ability to detect any occurrence of a signal in your
+program. You can tell @BASH in advance what to do for each kind of
+signal.
+
+@cindex handling signals
+Normally, @BASH is set up to let the non-erroneous signals like
+@code{SIGALRM} be silently passed to your program
+(so as not to interfere with their role in the program's functioning)
+but to stop your program immediately whenever an error signal happens.
+You can change these settings with the @code{handle} command.
+
+@table @code
+@kindex info signals
+@item info signals
+@itemx info handle
+Print a table of all the kinds of signals and how @BASH has been told to
+handle each one. You can use this to see the signal numbers of all
+the defined types of signals.
+
+@code{info handle} is an alias for @code{info signals}.
+
+@kindex handle
+@item handle @var{signal} @var{keywords}@dots{}
+Change the way @BASH handles signal @var{signal}. @var{signal}
+can be the number of a signal or its name (with or without the
+@samp{SIG} at the beginning); a list of signal numbers of the form
+@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
+known signals. The @var{keywords} say what change to make.
+@end table
+
+@c @group
+The keywords allowed by the @code{handle} command can be abbreviated.
+Their full names are:
+
+@table @code
+@item stop
+@BASH should stop your program when this signal happens. This implies
+the @code{print} keyword as well.
+
+@item nostop
+@BASH should not stop your program when this signal happens. It may
+still print a message telling you that the signal has come in.
+
+@item print
+@BASH should print a message when this signal happens.
+
+@item noprint
+@BASH should not mention the occurrence of the signal at all.
+
+@item stack
+@BASH should print a stack trace when this signal happens.
+
+@item nostack
+@BASH should not print a stack trace when this signal occurs.
+
+@ifset FINISHED
+@item pass
+@itemx noignore
+@BASH should allow your program to see this signal; your program
+can handle the signal, or else it may terminate if the signal is fatal
+and not handled. @code{pass} and @code{noignore} are synonyms.
+
+@item nopass
+@itemx ignore
+@BASH should not allow your program to see this signal.
+@code{nopass} and @code{ignore} are synonyms.
+@end ifset
+@end table
+@c @end group
+
+@ifset FINISHED
+When a signal stops your program, the signal is not visible to the
+program until you
+continue. Your program sees the signal then, if @code{pass} is in
+effect for the signal in question @emph{at that time}. In other words,
+after @BASH reports a signal, you can use the @code{handle}
+command with @code{pass} or @code{nopass} to control whether your
+program sees that signal when you continue.
+
+The default is set to @code{nostop}, @code{noprint}, @code{pass} for
+non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
+@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
+erroneous signals.
+
+You can also use the @code{signal} command to prevent your program from
+seeing a signal, or cause it to see a signal it normally would not see,
+or to give it any signal at any time. For example, if your program stopped
+due to some sort of memory reference error, you might store correct
+values into the erroneous variables and continue, hoping to see more
+execution; but your program would probably terminate immediately as
+a result of the fatal signal once it saw the signal. To prevent this,
+you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your
+program a signal}.
+@end ifset
+
+@node Information
+@section Status and Debugger Settings (@samp{info}, @samp{show})
+
+In addition to @code{help}, you can use the @BASH commands @code{info}
+and @code{show} to inquire about the state of your program, or the state
+of @BASH itself. Each command supports many topics of inquiry; this
+manual introduces each of them in the appropriate context. The listings
+under @code{info} and under @code{show} in the Index point to
+all the sub-commands. @xref{Command Index}.
+
+@c @group
+@table @code
+@kindex info
+@kindex i @r{(@code{info})}
+@item info
+This command (abbreviated @code{i}) is for describing the state of
+your program. For example, you canlist the current @code{$1}, @code{$2}
+parameters with @code{info args}, or list the breakpoints you have set
+with @code{info breakpoints} or @code{info watchpoints}. You can get
+a complete list of the @code{info} sub-commands with @w{@code{help
+info}}.
+
+@kindex set
+@item set
+You can assign the result of an expression to an environment variable
+with @code{set}. For example, you can set the number of lines
+@BASH will list by default to 20 with @code{set listsize 20}.
+
+@kindex show
+@item show
+In contrast to @code{info}, @code{show} is for describing the state of
+@BASH itself.
+You can change most of the things you can @code{show}, by using the
+related command @code{set};
+
+The distinction between @code{info} and @code{show} however is a bit
+fuzzy. For example, to list the arguments given to your script use
+@code{show args}; @code{info args} does something different.
+
+@kindex info set
+To display all the settable parameters and their current
+values, you can use @code{show} with no arguments; you may also use
+@code{info set}. Both commands produce the same display.
+@c FIXME: "info set" violates the rule that "info" is for state of
+@c FIXME...program. Ck w/ GNU: "info set" to be called something else,
+@c FIXME...or change desc of rule---eg "state of prog and debugging session"?
+@end table
+@c @end group
+
+Here are three miscellaneous @code{show} subcommands, all of which are
+exceptional in lacking corresponding @code{set} commands:
+
+@table @code
+@kindex show version
+@cindex version number
+@item show version
+Show what version of @BASH is running. You should include this
+information in @BASH bug-reports. If multiple versions of
+@BASH are in use at your site, you may need to determine which
+version of @BASH you are running; as @BASH evolves, new
+commands are introduced, and old ones may wither away. Also, many
+system vendors ship variant versions of @value{BASH}, and there are
+variant versions of @BASH in @sc{gnu}/Linux distributions as well.
+The version number is the same as the one announced when you start
+@value{BASH}.
+
+@kindex show copying
+@item show copying
+Display information about permission for copying @value{BASH}.
+
+@kindex show warranty
+@item show warranty
+Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty,
+if your version of @DBG comes with one.
+
+@end table
+
+@node Stack
+@section Examining the Stack (@samp{where}, @samp{frame}, @samp{up}, @samp{down})
+
+When your script has stopped, one thing you'll probably want to know
+is where it stopped and some idea of how it got there.
+
+@cindex call stack
+Each time your script performs a function call (either as part of a
+command substitution or not), or `source's a file, information about
+this action is saved. The call stack then is this a history of the
+calls that got you to the point that you are currently stopped at.
+
+@cindex selected frame
+One of the stack frames is @dfn{selected} by @DBG and many
+@DBG commands refer implicitly to the selected frame. In
+particular, whenever you ask @DBG to list lines without giving
+a line number or location the value is found in the selected frame.
+There are special @DBG commands to select whichever frame you
+are interested in. @xref{Selection, ,Selecting a frame}.
+
+When your program stops, @BASH automatically selects the
+currently executing frame and describes it briefly, similar to the
+@code{frame} command.
+
+
+@menu
+* Frames:: Stack frames
+* Backtrace:: Backtraces (where)
+* Selection:: Selecting a frame (up, down, frame)
+
+@end menu
+
+@node Frames
+@subsection Stack frames
+
+@cindex frame, definition
+@cindex stack frame
+The call stack is divided up into contiguous pieces called @dfn{stack
+frames}, or @dfn{frames} for short; each frame is the data associated
+with one call to one function. The frame contains the line number of
+the caller of the function, the source-file name that the line refers
+to and function name (which could be the built-in name ``source'')..
+
+@cindex initial frame
+@cindex outermost frame
+@cindex innermost frame
+When your script is started, the stack has only one frame, that of the
+function @code{main}. This is called the @dfn{initial} frame or the
+@dfn{outermost} frame. Each time a function is called, a new frame is
+made. Each time a function returns, the frame for that function invocation
+is eliminated. If a function is recursive, there can be many frames for
+the same function. The frame for the function in which execution is
+actually occurring is called the @dfn{innermost} frame. This is the most
+recently created of all the stack frames that still exist.
+
+@cindex frame number
+@value{DBG} assigns numbers to all existing stack frames, starting with
+zero for the innermost frame, one for the frame that called it,
+and so on upward. These numbers do not really exist in your script;
+they are assigned by @value{DBG} to give you a way of designating stack
+frames in @value{DBG} commands.
+
+@node Backtrace
+@subsection Backtraces (@samp{where})
+
+@cindex backtraces
+@cindex tracebacks
+@cindex stack traces
+A backtrace is essentially the same as the call stack: a summary of
+how your script got where it is. It shows one line per frame, for
+many frames, starting with the place that you sare stopped at (frame
+zero), followed by its caller (frame one), and on up the stack.
+
+@table @code
+@kindex backtrace
+@kindex bt @r{(@code{backtrace})}
+@item backtrace
+@itemx bt
+@itemx where
+@itemx T
+Print a backtrace of the entire stack: one line per frame for all
+frames in the stack.
+
+@item backtrace @var{n}
+@itemx bt @var{n}
+@itemx where @var{n}
+@itemx T @var{n}
+Similar, but print only the innermost @var{n} frames.
+
+@ifset FINISHED
+@item backtrace -@var{n}
+@itemx bt -@var{n}
+@itemx where -@var{n}
+@itemx T -@var{n}
+Similar, but print only the outermost @var{n} frames.
+@end ifset
+@end table
+
+@kindex where
+The names @code{where} and @code{T} are additional aliases for
+@code{backtrace}.
+
+Each line in the backtrace shows the frame number and the function
+name, the source file name and line number, as well as the function name.
+
+Here is an example of a backtrace taken a program in the
+regression-tests @file{parm.sh}.
+
+@smallexample
+@group
+% ../bashdb -n -L .. parm.sh
+Bourne-Again Shell Debugger, release @value{BASHRELEASE}
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+(./parm.sh:21):
+21: fn1 5
+bashdb<0> @b{continue fn3}
+One-time breakpoint 1 set in file ./parm.sh, line 17.
+fn2: testing 1 2 3
+(./parm.sh:17):
+17: fn3() @{
+bashdb<1> @b{where}
+->0 in file `./parm.sh' at line 14
+##1 fn3() called from file `./parm.sh' at line 14
+##2 fn2("testing 1", "2 3") called from file `parm.sh' at line 5
+##3 fn1("0") called from file `parm.sh' at line 9
+##4 fn1("1") called from file `parm.sh' at line 9
+##5 fn1("2") called from file `parm.sh' at line 9
+##6 fn1("3") called from file `parm.sh' at line 9
+##7 fn1("4") called from file `parm.sh' at line 9
+##8 fn1("5") called from file `parm.sh' at line 21
+##9 source("parm.sh") called from file `bashdb' at line 143
+##10 main("-n", "-L", "..", "parm.sh") called from file `bashdb' at line 0
+@end group
+@end smallexample
+
+@noindent
+The display for ``frame'' zero isn't a frame at all, although it has
+the same information minus a function name; it just indicates that
+your script has stopped at the code for line @code{14}
+of @code{./parm.sh}.
+
+@node Selection
+@subsection Selecting a frame (@samp{up}, @samp{down}, @samp{frame})
+
+Commands for listing source code in your script work on whichever
+stack frame is selected at the moment. Here are the commands for
+selecting a stack frame; all of them finish by printing a brief
+description of the stack frame just selected.
+
+@table @code
+@kindex up
+@item up @var{n}
+Move @var{n} frames up the stack. For positive numbers @var{n}, this
+advances toward the outermost frame, to higher frame numbers, to frames
+that have existed longer. @var{n} defaults to one.
+
+@kindex down
+@kindex do @r{(@code{down})}
+@item down @var{n}
+Move @var{n} frames down the stack. For positive numbers @var{n}, this
+advances toward the innermost frame, to lower frame numbers, to frames
+that were created more recently. @var{n} defaults to one. You may
+abbreviate @code{down} as @code{do}.
+@end table
+
+All of these commands end by printing two lines of output describing the
+frame. The first line shows the frame number, the function name, the
+arguments, and the source file and line number of execution in that
+frame. The second line shows the text of that source line.
+
+@need 100
+For example:
+
+@smallexample
+@group
+bashdb<8> @b{up}
+19: sourced_fn
+bashdb<8> @b{T}
+##0 in file `./bashtest-sourced' at line 8
+->1 sourced_fn() called from file `bashtest-sourced' at line 19
+##2 source() called from file `bashdb-test1' at line 23
+##3 fn2() called from file `bashdb-test1' at line 33
+##4 fn1() called from file `bashdb-test1' at line 42
+##5 main() called from file `bashdb-test1' at line 0
+@end group
+@end smallexample
+
+After such a printout, the @code{list} command with no arguments
+prints ten lines centered on the point of execution in the frame.
+@xref{List, ,Printing source lines}.
+
+@table @code
+@kindex frame
+@cindex current stack frame
+@item frame @var{args}
+The @code{frame} command allows you to move from one stack frame to
+another, and to print the stack frame you select. @var{args} is the
+the stack frame number. Without an argument, @code{frame} prints the
+current stack frame.
+@end table
+
+@node List
+@section Examining Source Files (@samp{list})
+
+@value{DBG} can print parts of your script's source. When your
+script stops, @value{DBG} spontaneously prints the line where it
+stopped. Likewise, when you select a stack frame (@pxref{Selection,
+,Selecting a frame}), @value{DBG} prints the line where execution in
+that frame has stopped. You can print other portions of source files
+by explicit command.
+
+If you use @value{DBG} through its @sc{gnu} Emacs interface, you may
+prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
+@value{DBG} under @sc{gnu} Emacs}.
+
+@kindex list
+@kindex l @r{(@code{list})}
+To print lines from a source file, use the @code{list} command
+(abbreviated @code{l}). By default, ten lines are printed.
+There are several ways to specify what part of the file you want to print.
+
+Here are the forms of the @code{list} command most commonly used:
+
+@table @code
+@item list @var{linenum}
+@itemx l @var{linenum}
+Print lines centered around line number @var{linenum} in the
+current source file.
+
+@item list @var{function}
+@itemx l @var{function}
+Print the text of @var{function}.
+
+@item list
+@itemx l
+Print more lines. If the last lines printed were printed with a
+@code{list} command, this prints lines following the last lines
+printed; however, if the last line printed was a solitary line printed
+as part of displaying a stack frame (@pxref{Stack, ,Examining the
+Stack}), this prints lines centered around that line.
+
+@item list -
+@itemx l -
+Print lines just before the lines last printed.
+@end table
+
+By default, @value{DBG} prints ten source lines with any of these forms of
+the @code{list} command.
+You can change this using @code{set listsize}:
+
+@table @code
+@kindex set listsize
+@item set listsize @var{count}
+Make the @code{list} command display @var{count} source lines (unless
+the @code{list} argument explicitly specifies some other number).
+
+@kindex show listsize
+@item show listsize
+Display the number of lines that @code{list} prints.
+@end table
+
+Repeating a @code{list} command with @key{RET} discards the argument,
+so it is equivalent to typing just @code{list}. This is more useful
+than listing the same lines again. An exception is made for an
+argument of @samp{-}; that argument is preserved in repetition so that
+each repetition moves up in the source file.
+
+@cindex linespec
+In general, the @code{list} command expects you to supply a
+@dfn{linespecs}. Linespecs specify source lines; there are several ways
+of writing them, but the effect is always to specify some source line.
+
+Here is a complete description of the possible arguments for @code{list}:
+
+@table @code
+@item list @var{linespec}
+Print lines centered around the line specified by @var{linespec}.
+
+@item list @var{first} @var{increment}
+Print @var{increment} lines starting from @var{first}
+
+@item list @var{first}
+Print lines starting with @var{first}.
+
+@item list -
+Print lines just before the lines last printed.
+
+@item list .
+Print lines after where the script is stopped.
+
+@item list
+As described in the preceding table.
+@end table
+
+Here are the ways of specifying a single source line---all the
+kinds of linespec.
+
+@table @code
+@item @var{number}
+Specifies line @var{number} of the current source file.
+When a @code{list} command has two linespecs, this refers to
+the same source file as the first linespec.
+
+@item @var{filename}:@var{number}
+Specifies line @var{number} in the source file @var{filename}.
+
+@item @var{function}
+Specifies the line that function @var{function} is listed on.
+
+@ifset FINISHED
+@item @var{filename}:@var{function}
+Specifies the line of function @var{function} in the file
+@var{filename}. You only need the file name with a function name to
+avoid ambiguity when there are identically named functions in
+different source files.
+@end ifset
+@end table
+
+@node Search
+@section Searching source files (@samp{search}, @samp{reverse}, @samp{/.../}, @samp{?..?})
+@cindex searching
+@kindex reverse-search
+
+There are two commands for searching through the current source file for a
+BASH extended pattern-matching expression.
+
+@table @code
+@kindex search
+@kindex forward
+@item forward @var{bash-pattern}
+@itemx search @var{bash-pattern}
+The command @samp{forward @var{bash-pattern}} checks each line,
+starting with the one following the current line, for a match for
+@var{bash-pattern} which is an extended bash pattern-matching
+expression. It lists the line that is found. You can use the synonym
+@samp{search @var{bash-pattern}} or abbreviate the command name as
+@code{fo} or @code{/@var{pat}/}.
+
+@item reverse @var{bash-pattern}
+The command @samp{reverse @var{bash-pattern}} checks each line, starting
+with the one before the last line listed and going backward, for a match
+for @var{bash-pattern}. It lists the line that is found. You can abbreviate
+this command as @code{rev} or @code{?@var{bash-pattern}?}.
+@end table
+
+@node Data
+@section Examining Data (@samp{print}, @samp{examine}, @samp{info variables})
+
+@cindex printing data
+@cindex examining data
+@kindex print
+
+One way to examine string data in your script is with the @code{print}
+command (abbreviated @code{p}). However a more versatile print command
+is @code{x}; it can print variable and function definitions and can do
+arithmetic computations. Finally, the most general method would be
+via @code{eval echo}.
+
+@table @code
+@kindex print
+@kindex p @r{(@code{print})}
+@item print @var{expr}
+
+Use @code{print} to dispay strings as you would from @code{echo}. And
+as such, variable names to be substituted have to be preceded with a
+dollar sign. As with echo, filename expansion, e.g. tilde expansion,
+is performed on unquoted strings. So for example if you want to print
+a *, you would write @samp{print "*"}, not @samp{print *}. If you want
+to have the special characters dollars sign appear, use a backslash.
+
+@item print
+@itemx p
+If you omit @var{expr}, @value{DBG} displays the last expression again.
+
+@item x @ovar{expr}
+@kindex x
+
+This is a smarter, more versatile ``print'' command, and although sometimes
+it might not be what you want, and you may want to resort to either
+@code{print} or @code{eval echo...}.
+
+As with @code{print}, if you omit @var{expr}, @value{DBG} displays
+the last expression again.
+
+The @code{x} command first checks if @var{expr} is single variable. If
+it is, the definition and value are printed via @value{BASH}'s
+@code{declare -p} command. This will show the variable's attributes
+such as if it is read only or if it is an integer. If the variable is
+an array, that is show and the array values are printed.
+
+If instead @var{expr} is a function, the function definition is
+printed via @value{BASH}'s @code{declare -f} command. If @var{expr}
+was neither a variable nor an expression, then we try to get a value
+via @code{let}. And if this returns an error, as a last resort we call
+@code{print} and give what it outputs.
+
+Since @code{let} may be used internally and since (to my thinking)
+@code{let} does funny things, the results may seem odd unless you
+understand the sequence tried above and how @code{let} works. For
+example if the variable @code{foo} has value 5, then @samp{x foo} show
+the definition of foo with value 5, and @samp{x foo+5} prints 10 as
+expected. So far so good. However if @code{foo} is has value
+``string'', @samp{x foo+5} prints 5 because @code{let} has turned the
+string into 0; @samp{p foo+5} will simply print ``foo+5''; if you want
+the value of ``foo'' substituted inside a string, for example you
+expect ``the value of foo is $foo'' to come out ``the value of foo is
+5'', then the right command to use is @code{print} rather than
+@code{x}, making sure you add the dollar onto the beginning of the
+variable.
+
+@item V @ovar{!}@ovar{pattern}
+@kindex V
+
+If you want to @emph{all} list variables and there values or a set of
+variables by pattern, use this command.
+
+@smallexample
+@group
+bashdb<0> @b{V dq*}
+dq_args="dq_*"
+dq_cmd="V"
+@end group
+@end smallexample
+
+@end table
+
+@node Evaluation/Execution
+@section Running Arbitrary BASH and Shell commands (@samp{eval}, @samp{shell})
+
+The two most general commands and most ``low-level'' are @code{eval}
+and @code{shell}.
+
+@table @code
+@item eval
+@itemx e
+@kindex e
+
+In contrast to the commands of the last section the most general way
+to examine data is through @code{eval}. But you do much more with
+this; you can change the values of variables, since, you are just
+evaluating BASH code.
+
+If you expect output, you should arrange that in the command, such as
+via @code{echo} or @code{printf}. For example, to print the value of
+@var{foo}, you would type @samp{e echo $foo}. This is bit longer than
+@samp{p $foo} or (when possible) @samp{x foo}. However suppose you
+wanted to find out how the builtin test operator @samp{[} works with
+the @samp{-z} test condition. You could use @code{eval} to do this
+such as @samp{e [ -z "$foo"] && echo "yes"}.
+
+@kindex shell
+@kindex !! @r{(@code{shell})}
+@cindex shell escape
+@item shell @var{command string}
+@itemx !!
+
+If you need to execute occasional shell commands during your
+debugging session, there is no need to leave or suspend @value{DBG}; you can
+just use the @code{shell} command or its alias @code{!!}.
+
+Invoke a shell to execute @var{command string}.
+
+@end table
+
+@node Auto Display
+@section Automatic display (@samp{display}, @samp{undisplay})
+@cindex automatic display
+@cindex display of expressions
+
+If you find that you want to print the value of an expression
+frequently (to see how it changes), you might want to add it to the
+@dfn{automatic display list} so that @value{DBG} evaluates a
+statement each time your program stops. Each expression added to the
+list is given a number to identify it; to remove an expression from
+the list, you specify that number. The automatic display looks like
+this:
+
+@example
+2 (echo $x): 38
+@end example
+
+@noindent
+This display shows item numbers, expressions and their current values.
+
+@table @code
+@kindex display
+@item display @var{expr}
+Add the expression @var{expr} to the list of expressions to display
+each time your program stops.
+@end table
+
+@table @code
+@kindex delete display
+@kindex undisplay
+@item undisplay @var{dnums}@dots{}
+@itemx delete display @var{dnums}@dots{}
+Remove item numbers @var{dnums} from the list of expressions to display.
+
+@code{undisplay} does not repeat if you press @key{RET} after using it.
+(Otherwise you would just get the error @samp{No display number @dots{}}.)
+
+@kindex disable display
+@item disable display @var{dnums}@dots{}
+Disable the display of item numbers @var{dnums}. A disabled display
+item is not printed automatically, but is not forgotten. It may be
+enabled again later.
+
+@kindex enable display
+@item enable display @var{dnums}@dots{}
+Enable display of item numbers @var{dnums}. It becomes effective once
+again in auto display of its expression, until you specify otherwise.
+
+@item display
+Display the current values of the expressions on the list, just as is
+done when your program stops.
+
+@kindex info display
+@item info display
+Print the list of expressions previously set up to display
+automatically, each one with its item number, but without showing the
+values. This includes disabled expressions, which are marked as such.
+It also includes expressions which would not be displayed right now
+because they refer to automatic variables not currently available.
+@end table
+
+@node Controlling bashdb
+@section Controlling @DBG (@samp{set}, @samp{history})
+
+You can alter the way @BASH interacts with you by using the
+@code{set} command.
+
+@menu
+* Annotate:: Annotation Level (set annotate)
+* Prompt:: Prompt (set prompt, show prompt)
+* Editing:: Command editing (set editing, show editing)
+* Command Display:: Command display (set showcommand)
+* History:: Command history (history, !, H)
+@end menu
+
+@node Annotate
+@subsection Annotation Level (@samp{set annoatate})
+
+The annotation level controls how much information does @value{DBG}
+print together with its prompt, values of expressions, source lines,
+and other types of output. Level 0 is the normal, level 1 is for use
+when @value{DBG} is run as a subprocess of @sc{gnu} Emacs of @value{DDD},
+level 2 is the maximum annotation suitable for programs that control
+@value{DBGN}.
+
+@node Prompt
+@subsection Prompt (@samp{set prompt}, @samp{show prompt})
+
+@cindex prompt
+
+@value{dBGP} indicates its readiness to read a command by printing a
+string called the @dfn{prompt}. This string is normally:
+@example
+bashdb$@{_Dbg_less@}$@{#_Dbg_history[@@]@}$@{_Dbg_greater@}$_Dbg_space
+@end example
+
+When variables inside the the prompt string are evaluated, the above
+becomes something like @samp{bashdb<5>} if this is the fifth command
+executed or perhaps @samp{bashdb<<2>>} if you have called the debugger
+from inside a debugger session and this is the second command inside
+the debugger session or perhaps @samp{bashdb<(6)>} if you
+entered a subshell after the fifth command.
+
+You can change the prompt string with the @code{set prompt} command,
+although it is not normally advisable to do so without understanding
+the implications. If you are using the @value{DDD} GUI, it changes the
+changes the prompt and should not do so. In certain other
+circumstances (such as writing a GUI like @value{DDD}), it may be is useful
+to change the prompt.
+
+@emph{Note:} @code{set prompt} does not add a space for you after the
+prompt you set. This allows you to set a prompt which ends in a space
+or a prompt that does not. Furthermore due to a implementation
+limitation (resulting from a limitation of the bash built-in function
+``read''), to put a space at the end of the prompt use the
+@samp{$_Dbg_space} variable.
+
+@table @code
+@kindex set prompt
+@item set prompt @var{newprompt}
+Directs @value{DBG} to use @var{newprompt} as its prompt string
+henceforth.
+
+@emph{Warning: changing the prompt can @value{DDD}'s ability to
+understand when the debugger is waiting for input.}
+
+@kindex show prompt
+@item show prompt
+Prints a line of the form: @samp{bashdb's prompt is: @var{your-prompt}}
+@end table
+
+@node Editing
+@subsection Command editing (@samp{set editing}, @samp{show editing})
+@cindex readline
+@cindex command line editing
+
+@value{DBG} reads its input commands through bash which uses via the
+@dfn{readline} interface. This @sc{gnu} library provides consistent
+behavior for programs which provide a command line interface to the
+user. Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline
+editing of commands, @code{csh}-like history substitution, and a
+storage and recall of command history across debugging sessions.
+
+You may control the behavior of command line editing in @BASH with the
+command @code{set}.
+
+@table @code
+@kindex set editing
+@cindex editing
+@item set editing
+@itemx set editing on
+Enable command line editing (enabled by default).
+
+@item set editing off
+Disable command line editing.
+
+@kindex show editing
+@item show editing
+Show whether command line editing is enabled.
+@end table
+
+
+@node Command Display
+@subsection Command Display (@samp{set showcommand})
+
+The debugger normally lists the line number and source line of the for
+the statement to be next executed. Often this line contains one
+expression or one statement and it is clear from this line what's
+going to happen. However @BASH allows many expressions or
+statements to be put on a single source line; some lines
+contain several units of execution. Some examples of this
+behavior are listed below:
+
+@smallexample
+x=1; y=2; x=3
+(( x > 5 )) && x=5
+y=`echo *`
+@end smallexample
+
+In the first line of the example above, we have three assignment
+statements on a single line. In the second line of the example above
+we have a statement which gets run only if a condition tests true. And
+in the third line of the example above, we have a command that gets
+run and then the output of that is substituted in an assignemnt
+statement. If you were single stepping inside the debugger, each line
+might get listed more than once before each of the actions that might
+get performed. (In the case of the conditional statement, the
+line gets listed only once when the condition is false.)
+
+In order to assist understanding where you are, the enhanced version
+of @BASH maintains a dynamic variable @env{BASH_COMMAND} that
+contains piece of code next to be run (or is currently being run). The
+debugger has arranged to save this and can display this information
+or not. This is controlled by @code{set showcommand}.
+
+@table @code
+@kindex set showcommand
+@item set showcommand @r{[}auto | on | off @r{]}
+controls whether or not to show the saved @env{BASH_COMMAND} for the
+command next to be executed.
+@end table
+
+When the value is @code{auto} the following heuristic is used to
+determine whether or not to display the saved @env{BASH_COMMAND}. If
+the last time you stopped you were at the same place and the command
+string has changed, then show the command. When the value @code{on} is
+used, the debugger always shows @env{BASH_COMMAND} and when
+@code{off} is used, the debugger nevers shows
+@env{BASH_COMMAND}. Note that listing the text of the source line is
+independent of whether or not the command is also listed.
+
+Some examples:
+@smallexample
+set showcommand auto @b{This is the default}
+set showcommand on @b{Always show the next command to be executed}
+set showcommand off @b{Never show the next command to be executed}
+@end smallexample
+
+@node History
+@subsection Command history (@samp{H}, @samp{history}, @samp{!})
+
+@value{dBGP} can keep track of the commands you type during your
+debugging sessions, so that you can be certain of precisely what
+happened. If the prompt has not been changed (see @ref{Prompt,
+,Prompt}), the history number that will be in use next is by default
+listed in the debugger prompt. Invalid commands and history commands
+are not saved on the history stack.
+
+@table @code
+@kindex H @r{[}@var{start-number} @ovar{end-number}@r{]}
+@item H @r{[}@var{start-number} @ovar{end-number}@r{]}
+@item H @ovar{-count}
+@itemx !@r{[}-@r{]}@var{n}:p
+
+You can list what is in the history stack with @code{H}. Debugger
+commands in ths history stack are listed from most recent to least recent.
+If no @var{start-number} is given we start with the most recently
+executed command and end with the first entry in the history stack.
+If @var{start-number} is given, that history number is listed first. If
+@var{end-number} is given, that history number is listed last. If a
+single negative number is given list that many history commands.
+
+An alternate form is @code{!@emph{n}:p} or @code{!-@emph{n}:p} where
+@emph{n} is an integer. If a minus sign is used, @emph{n} is taken as
+the count to go back from the end rather than as a absolute history
+number. In contrast @code{H}, this form only prints a @emph{single}
+history item.
+
+Some examples:
+@smallexample
+H @b{List entire history}
+H -2 @b{List the last two history items}
+!-2:p @b{List a single history item starting at the same place as above}
+H 5 @b{List history from history number 5 to the begining (number 0)}
+H 5 0 @b{Same as above}
+H 5 3 @b{List history from history number 5 down to history number 3}
+!5:p @b{List a single history item 5}
+@end smallexample
+
+@kindex history @r{[}-@r{]}@r{[}@var{n}@r{]}
+@kindex !@r{[}-@r{]}@var{n} @r{(@code{history})}
+@item history @r{[}@r{[}-@r{]}@var{n}@r{]}
+@itemx !@r{[}-@r{]}@var{n}
+
+Use this command to reexecute a given history number. If no number is
+given, the last debugger command in the history is executed.
+
+An alternate form is @code{!@emph{n}} or @code{!-@emph{n}} where
+@emph{n} is an integer.
+
+If a minus sign is used in in either form, @emph{n} is taken as the
+count to go back from the end rather than as a absolute history
+number.
+
+@end table
+
+@ifset FINISHED
+Use these commands to manage the @value{DBGN} command
+history facility.
+
+@table @code
+@cindex history substitution
+@cindex history file
+@kindex set history filename
+@kindex GDBHISTFILE
+@item set history filename @var{fname}
+Set the name of the @BASH command history file to @var{fname}.
+This is the file where @BASH reads an initial command history
+list, and where it writes the command history from this session when it
+exits. You can access this list through history expansion or through
+the history command editing characters listed below. This file defaults
+to the value of the environment variable @code{GDBHISTFILE}, or to
+@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
+is not set.
+
+@cindex history save
+@kindex set history save
+@item set history save
+@itemx set history save on
+Record command history in a file, whose name may be specified with the
+@code{set history filename} command. By default, this option is disabled.
+
+@item set history save off
+Stop recording command history in a file.
+
+@cindex history size
+@kindex set history size
+@item set history size @var{size}
+Set the number of commands which @BASH keeps in its history list.
+This defaults to the value of the environment variable
+@code{HISTSIZE}, or to 256 if this variable is not set.
+@end table
+
+@cindex history expansion
+History expansion assigns special meaning to the character @kbd{!}.
+
+Since @kbd{!} is also the logical not operator in C, history expansion
+is off by default. If you decide to enable history expansion with the
+@code{set history expansion on} command, you may sometimes need to
+follow @kbd{!} (when it is used as logical not, in an expression) with
+a space or a tab to prevent it from being expanded. The readline
+history facilities do not attempt substitution on the strings
+@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
+
+The commands to control history expansion are:
+
+@table @code
+@kindex set history expansion
+@item set history expansion on
+@itemx set history expansion
+Enable history expansion. History expansion is off by default.
+
+@item set history expansion off
+Disable history expansion.
+
+The readline code comes with more complete documentation of
+editing and history expansion features. Users unfamiliar with @sc{gnu} Emacs
+or @code{vi} may wish to read it.
+
+@c @group
+@kindex show history
+@item show history
+@itemx show history filename
+@itemx show history save
+@itemx show history size
+@itemx show history expansion
+These commands display the state of the @BASH history parameters.
+@code{show history} by itself displays all four states.
+@c @end group
+@end table
+
+@table @code
+@kindex shows
+@item show commands
+Display the last ten commands in the command history.
+
+@item show commands @var{n}
+Print ten commands centered on command number @var{n}.
+
+@item show commands +
+Print ten commands just after the commands last printed.
+@end table
+@end ifset
+
+@node Front Ends
+@chapter Using @value{DBG} from a front-end user interface
+
+There are two front-ends available that can use @value{DBG} as a back-end
+debugger are @sc{gnu} Emacs and @value{DDD}.
+
+@menu
+* Emacs:: Using @value{DBG} from @sc{gnu} Emacs
+* DDD:: Using @value{DBG} from @value{DDD}
+@end menu
+
+
+@node Emacs
+@section Using @value{DBG} from @sc{gnu} Emacs
+
+@cindex Emacs
+@cindex @sc{gnu} Emacs
+A special interface allows you to use @sc{gnu} Emacs to view (and
+edit) the source files for the program you are debugging with
+@value{DBG}.
+
+To use this interface, use the command @kbd{M-x bashdb} in Emacs.
+Give the executable file you want to debug as an argument. This
+command starts @value{DBG} as a subprocess of Emacs, with input and
+output through a newly created Emacs buffer.
+
+Using @value{DBG} under Emacs is just like using @value{DBG}
+normally except for two things:
+
+@itemize @bullet
+@item
+All ``terminal'' input and output goes through the Emacs buffer.
+@end itemize
+
+This applies both to @value{DBG} commands and their output, and to the input
+and output done by the program you are debugging.
+
+This is useful because it means that you can copy the text of previous
+commands and input them again; you can even use parts of the output
+in this way.
+
+All the facilities of Emacs' Shell mode are available for interacting
+with your script. In particular, you can send signals the usual
+way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
+stop.
+
+@itemize @bullet
+@item
+@value{DBG} displays source code through Emacs.
+@end itemize
+
+Each time @value{DBG} displays a stack frame, Emacs automatically finds the
+source file for that frame and puts an arrow (@samp{=>}) at the
+left margin of the current line. Emacs uses a separate buffer for
+source display, and splits the screen to show both your @value{DBG} session
+and the source.
+
+Explicit @value{DBG} @code{list} or search commands still produce output as
+usual, but you probably have no reason to use them from Emacs.
+
+@quotation
+@emph{Warning:} If the directory where your script resides is not your
+current directory, it can be easy to confuse Emacs about the location of
+the source files, in which case the auxiliary display buffer does not
+appear to show your source. @value{DBG} can find programs by searching your
+environment's @code{PATH} variable, so the @value{DBG} input and output
+session proceeds normally; but Emacs does not get enough information
+back from @value{DBG} to locate the source files in this situation. To
+avoid this problem, either start @value{DBG} mode from the directory where
+your script resides, or specify an absolute file name when prompted for the
+@kbd{M-x gdb} argument.
+
+A similar confusion can result if you use the @value{DBG} @code{file} command to
+switch to debugging a program in some other location, from an existing
+@value{DBG} buffer in Emacs.
+@end quotation
+
+By default, @kbd{M-x bashdb} calls the @code{bash --debugger}. If you
+need to call @value{DBG} by a different name (for example, if you
+keep several configurations around, with different names) you can set
+the Emacs variable @code{gud-bashdb-command-name}; for example,
+
+@example
+(setq gud-bashdb-command-name "bash-debugger")
+@end example
+
+@noindent
+(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
+in your @file{.emacs} file) makes Emacs call the program named
+``@code{bash-debugger}'' instead.
+
+In the @value{DBG} I/O buffer, you can use these special Emacs commands in
+addition to the standard Shell mode commands:
+
+@table @kbd
+@item C-h m
+Describe the features of Emacs' @value{DBG} Mode.
+
+@item M-s
+Execute to another source line, like the @value{DBG} @code{step} command; also
+update the display window to show the current file and location.
+
+@item M-n
+Execute to next source line in this function, skipping all function
+calls, like the @value{DBG} @code{next} command. Then update the display window
+to show the current file and location.
+
+@item C-c C-f
+Execute until exit from the selected stack frame, like the @value{DBG}
+@code{finish} command.
+
+@item M-c
+Continue execution of your script, like the @value{DBG} @code{continue}
+command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
+
+@item M-u
+Go up the number of frames indicated by the numeric argument
+(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
+like the @value{DBG} @code{up} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
+
+@item M-d
+Go down the number of frames indicated by the numeric argument, like the
+@value{DBG} @code{down} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
+
+@item C-x &
+Read the number where the cursor is positioned, and insert it at the end
+of the @value{DBG} I/O buffer. For example, if you wish to disassemble code
+around an address that was displayed earlier, type @kbd{disassemble};
+then move the cursor to the address display, and pick up the
+argument for @code{disassemble} by typing @kbd{C-x &}.
+
+You can customize this further by defining elements of the list
+@code{gdb-print-command}; once it is defined, you can format or
+otherwise process numbers picked up by @kbd{C-x &} before they are
+inserted. A numeric argument to @kbd{C-x &} indicates that you
+wish special formatting, and also acts as an index to pick an element of the
+list. If the list element is a string, the number to be inserted is
+formatted using the Emacs function @code{format}; otherwise the number
+is passed as an argument to the corresponding list element.
+@end table
+
+In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
+tells @value{DBG} to set a breakpoint on the source line point is on.
+
+If you accidentally delete the source-display buffer, an easy way to get
+it back is to type the command @code{frame} in the @value{DBG} buffer, to
+request a frame display; when you run under Emacs, this recreates
+the source buffer if necessary to show you the context of the current
+frame.
+
+The source files displayed in Emacs are in ordinary Emacs buffers
+which are visiting the source files in the usual way. You can edit
+the files with these buffers if you wish; but keep in mind that @value{DBG}
+communicates with Emacs in terms of line numbers. If you add or
+delete lines from the text, the line numbers that @value{DBG} knows cease
+to correspond properly with the code.
+
+@node DDD
+@section Using @value{DBG} from @value{DDD}
+@cindex DDD
+
+@value{DBG} support is rather new in @value{DDD}. As a programming
+language, @value{DBG} is not feature rich: there are no record
+structures or hash tables (yet), no pointers, package variable scoping
+or methods. So much of the data display and visualization features of
+@value{DDD} are disabled.
+
+As with any scripting or interpreted language (e.g. Perl), one can't
+step by a single machine-language instruction. So the ddd Stepi/Nexti
+commands are disabled.
+
+Some @value{BASH} settings are essential for @value{DDD} to work
+correctly. These settings with their correct values are:
+
+@example
+set annotate 1
+set prompt set prompt bashdb$_Dbg_less$_Dbg_greater$_Dbg_space
+@end example
+
+@value{DDD} sets these values automatically when invoking
+@value{BASH}; if these values are changed, there may be some
+malfunctions.
+
+Pay special attention when the prompt has extra angle brackets (a
+nested shell) or has any parenthesis (is in a subshell). Quitting may
+merely exit out of one of these nested (sub)shells rather than leave
+the program.
+
+@node BASH Debugger Bugs
+@chapter Reporting Bugs
+@cindex bugs
+@cindex reporting bugs
+
+Your bug reports play an essential role in making the BASH debugger reliable.
+
+Reporting a bug may help you by bringing a solution to your problem, or it
+may not. But in any case the principal function of a bug report is to help
+the entire community by making the next version of @value{DBG} work better. Bug
+reports are your contribution to the maintenance of @value{DBG}.
+
+In order for a bug report to serve its purpose, you must include the
+information that enables us to fix the bug.
+
+@menu
+* Bug Criteria:: Have you found a bug?
+* Bug Reporting:: How to report bugs
+@end menu
+
+@node Bug Criteria
+@section Have you found a bug?
+@cindex bug criteria
+
+If you are not sure whether you have found a bug, here are some guidelines:
+
+@itemize @bullet
+@cindex fatal signal
+@cindex debugger crash
+@cindex crash of debugger
+@item
+If the debugger gets a fatal signal, for any input whatever, that is a
+@value{DBG} bug. Reliable debuggers never crash.
+
+@cindex error on valid input
+@item
+If @value{DBG} produces an error message for valid input, that is a
+bug. (Note that if you're cross debugging, the problem may also be
+somewhere in the connection to the target.)
+
+@cindex invalid input
+@item
+If @value{DBG} does not produce an error message for invalid input,
+that is a bug. However, you should note that your idea of
+``invalid input'' might be our idea of ``an extension'' or ``support
+for traditional practice''.
+
+@item
+If you are an experienced user of debugging tools, your suggestions
+for improvement of @value{DBG} are welcome in any case.
+@end itemize
+
+@node Bug Reporting
+@section How to report bugs
+@cindex bug reports
+@cindex BASH debugger bugs, reporting
+
+Submit bug reports for @value{DBG}. Until better mechanism is set up
+the prefered method is to submit them directly using
+@email{mailto:rocky@@panix.com}. There are also a bug tracking system
+and, help, developer and open discussion forums which can be found via
+@uref{http://http://sourceforge.net/forum/?group_id=37260}.
+
+Although this code shares a lot with BASH, the debugger is of course
+not yet supported by the BASH team, so if there is a debugger problem
+reporting it via bashbug or to @email{bug-bash@@gnu.org} or posted to
+the newsgroup @code{gnu.bash.bug} probably won't help, unless you are
+sure the bug resides in the vanilla bash code and and show that.
+
+The fundamental principle of reporting bugs usefully is this:
+@strong{report all the facts}. If you are not sure whether to state a
+fact or leave it out, state it!
+
+Often people omit facts because they think they know what causes the
+problem and assume that some details do not matter. Thus, you might
+assume that the name of the variable you use in an example does not matter.
+Well, probably it does not, but one cannot be sure. Perhaps the bug is a
+stray memory reference which happens to fetch from the location where that
+name is stored in memory; perhaps, if the name were different, the contents
+of that location would fool the debugger into doing the right thing despite
+the bug. Play it safe and give a specific, complete example. That is the
+easiest thing for you to do, and the most helpful.
+
+Keep in mind that the purpose of a bug report is to enable us to fix the
+bug. It may be that the bug has been reported previously, but neither
+you nor we can know that unless your bug report is complete and
+self-contained.
+
+Sometimes people give a few sketchy facts and ask, ``Does this ring a
+bell?'' Those bug reports are useless, and we urge everyone to
+@emph{refuse to respond to them} except to chide the sender to report
+bugs properly.
+
+To enable us to fix the bug, you should include all these things:
+
+@itemize @bullet
+@item
+The version of @value{DBG}. @value{DBG} announces it if you start
+with no arguments; you can also print it at any time using @code{version}
+command.
+
+Without this, we will not know whether there is any point in looking for
+the bug in the current version of @value{DBG}.
+
+@item
+The type of machine you are using, and the operating system name and
+version number.
+
+@item
+What compiler (and its version) was used to compile BASH---e.g.
+``@value{GCC}--3.1''.
+
+@item
+The command arguments you gave the compiler to compile your example and
+observe the bug. For example, did you use @samp{-O}? To guarantee
+you will not omit something important, list them all. A copy of the
+Makefile (or the output from make) is sufficient.
+
+If we were to try to guess the arguments, we would probably guess wrong
+and then we might not encounter the bug.
+
+@item
+A complete input script, and all necessary source files, that will
+reproduce the bug.
+
+@item
+A description of what behavior you observe that you believe is
+incorrect. For example, ``It gets a fatal signal.''
+
+Of course, if the bug is that @value{DBG} gets a fatal signal, then we
+will certainly notice it. But if the bug is incorrect output, we might
+not notice unless it is glaringly wrong. You might as well not give us
+a chance to make a mistake.
+
+Even if the problem you experience is a fatal signal, you should still
+say so explicitly. Suppose something strange is going on, such as, your
+copy of @value{DBG} is out of synch, or you have encountered a bug in
+the C library on your system. (This has happened!) Your copy might
+crash and ours would not. If you told us to expect a crash, then when
+ours fails to crash, we would know that the bug was not happening for
+us. If you had not told us to expect a crash, then we would not be able
+to draw any conclusion from our observations.
+
+@item
+If you wish to suggest changes to the @value{DBG} source, send us context
+diffs. If you even discuss something in the @value{DBG} source, refer to
+it by context, not by line number.
+
+The line numbers in our development sources will not match those in your
+sources. Your line numbers would convey no useful information to us.
+
+@end itemize
+
+Here are some things that are not necessary:
+
+@itemize @bullet
+@item
+A description of the envelope of the bug.
+
+Often people who encounter a bug spend a lot of time investigating
+which changes to the input file will make the bug go away and which
+changes will not affect it.
+
+This is often time consuming and not very useful, because the way we
+will find the bug is by running a single example under the debugger
+with breakpoints, not by pure deduction from a series of examples.
+We recommend that you save your time for something else.
+
+Of course, if you can find a simpler example to report @emph{instead}
+of the original one, that is a convenience for us. Errors in the
+output will be easier to spot, running under the debugger will take
+less time, and so on.
+
+However, simplification is not vital; if you do not want to do this,
+report the bug anyway and send us the entire test case you used.
+
+@item
+A patch for the bug.
+
+A patch for the bug does help us if it is a good one. But do not omit
+the necessary information, such as the test case, on the assumption that
+a patch is all we need. We might see problems with your patch and decide
+to fix the problem another way, or we might not understand it at all.
+
+Sometimes with a program as complicated as @value{DBG} it is very hard to
+construct an example that will make the program follow a certain path
+through the code. If you do not send us the example, we will not be able
+to construct one, so we will not be able to verify that the bug is fixed.
+
+And if we cannot understand what bug you are trying to fix, or why your
+patch should be an improvement, we will not install it. A test case will
+help us to understand.
+
+@item
+A guess about what the bug is or what it depends on.
+
+Such guesses are usually wrong. Even we cannot guess right about such
+things without first using the debugger to find the facts.
+@end itemize
+
+@node History and Acknowledgments
+@chapter History and Acknowledgments
+
+The suggestion for a debugger for a Bourne-like shell came from the book
+``Learning the Korn Shell'', by Bill Rosenblatt Copyright (C) 1993 by
+O'Reilly and Associates, Inc. Others such as Cigy Cyriac, Chet Ramey,
+Rocky Bernstein, and Gary V. Vaughan expanded and improved on that.
+
+However Bourne-Shell debuggers rely on a signal mechanism
+(@code{SIGDEBUG}) to call a debugger routine. In the Korn shell as
+well as @sc{bash} in versions prior to 2.05, there was a fundamental
+flaw: the routine that you registered in the trap, got called
+@emph{after} the statement was executed. It takes little imagination
+to realize that this is a bit too late to find and correct errors,
+especially if the offending command happens to do serious damage like
+remove filesystems or reboot a server. As a horrible hack, these
+debuggers added one to the line number that was just executed on the
+wishful thinking that this would then be the line of next statement to
+execute. Sometimes this was correct, but it was too often wrong, such
+as in loops and conditionals, comments, or commands that are continued
+on the next line.
+
+Another failing of these debuggers was the inability to debug into
+functions or into sourced files, provide a stack trace, dynamically
+skip a statement to be run, unconditionally trace into a function, or
+stop when a subroutine or a sourced file completed. In truth, the crux
+of the problem lay in debugging support in BASH. Given that there was
+limited bash debugging support, it is not surprising that these
+debuggers could not do any of the things listed above and could debug
+only a single source file: lines could be listed only from a single
+text, breakpoints were set into the text which was in fact a copy of
+the script name prepended with debugger routines.
+
+In version 2.04 of BASH, Rocky Bernstein started hacking on BASH to
+add call-stack information, source file information, allow for
+debugging into functions and for reporting line numbers in functions
+as relative to the file rather than the beginning of a function whose
+origin line number was not accessible from BASH. He started changing
+the user commands in bashdb to be like other more-advanced debuggers,
+in particular @code{perl5db} and @code{gdb}. However he gave up on
+this project when realizing that stopping before a line was crucial. A
+patch for this was nontrivial and wildly changed
+semantics. Furthermore the chance of getting his other patches into
+BASH was was not going to happen in version 2.04.
+
+In version 2.05, the fundamental necessary change to the semantics of
+@code{SIGDEBUG} trap handling (suggested at least two years earlier)
+was made. Also, version 2.05 changed the line-number reporting in a
+function to be relative to the beginning of the file rather than the
+beginning of a function---sometimes. Rocky then picked up where he
+left off and this then became this debugger. A complete rewrite of the
+debugger, some of which started in 2.04 was undertaken. Debugger
+internals were changed to support multiple file names, save and
+restore the calling environment (such as variables @code{$1} and
+@code{$?}) and install debugger signal handlers. Work was also done on
+the BASH in conjunction with the debugger to save stack trace
+information, provide a means for stopping after a routine finished and
+so on. And a number of changes were made to BASH just to improve the
+accuracy of the line number reporting which is crucial in a debugger.
+
+This documentation was modified from the GNU Debugger (GDB) Reference
+manual.
+
+@quotation
+Additions to this section are particularly welcome. If you or your
+friends (or enemies, to be evenhanded) have been unfairly omitted from
+this list, we would like to add your names!
+@end quotation
+
+The following have contributed directly or indrectly to bashdb:
+
+Rocky Bernstein (initial full-featured bashdb with stack tracing and
+multi-file support)
+
+Masatake YAMATO (help to merge Rocky's hack to the official bash source tree)
+
+Bill Rosenblatt (kshdb),
+Michael Loukides (kshdb),
+Cigy Cyriac (proto bashdb),
+Chet Ramey (proto bashdb),
+and
+Gary V. Vaughan (proto bashdb).
+
+Authors of per5ldb:
+
+Ray Lischner,
+Johan Vromans,
+and
+Ilya Zakharevich.
+
+Authors of GDB:
+
+Richard Stallman,
+Andrew Cagney,
+Jim Blandy,
+Jason Molenda,
+Stan Shebs,
+Fred Fish,
+Stu Grossman,
+John Gilmore,
+Jim Kingdon,
+and
+Randy Smith (to name just a few).
+
+Authors of GUD:
+
+Eric S. Raymond.
+
+@c The readline documentation is distributed with the readline code
+@c and consists of the two following files:
+@c rluser.texinfo
+@c inc-hist.texinfo
+@c Use -I with makeinfo to point to the appropriate directory,
+@c environment var TEXINPUTS with TeX.
+@c @include rluser.texinfo
+@c @include hsuser.texinfo
+
+
+@node Formatting Documentation
+@appendix Formatting Documentation
+
+@ifset FINISHED
+@cindex @value{DBG} reference card
+@cindex reference card
+The @value{DBG} 4 release includes an already-formatted reference card, ready
+for printing with PostScript or Ghostscript, in the @file{gdb}
+subdirectory of the main source directory@footnote{In
+@file{gdb-@value{BASHRELEASE}/gdb/refcard.ps} of the version @value{BASHRELEASE}
+release.}. If you can use PostScript or Ghostscript with your printer,
+you can print the reference card immediately with @file{refcard.ps}.
+
+The release also includes the source for the reference card. You
+can format it, using @TeX{}, by typing:
+
+@example
+make refcard.dvi
+@end example
+
+The @value{DBG} reference card is designed to print in @dfn{landscape}
+mode on US ``letter'' size paper;
+that is, on a sheet 11 inches wide by 8.5 inches
+high. You will need to specify this form of printing as an option to
+your @sc{dvi} output program.
+
+@cindex documentation
+
+All the documentation for @value{DBG} comes as part of the machine-readable
+distribution. The documentation is written in Texinfo format, which is
+a documentation system that uses a single source file to produce both
+on-line information and a printed manual. You can use one of the Info
+formatting commands to create the on-line version of the documentation
+and @TeX{} (or @code{texi2roff}) to typeset the printed version.
+
+@value{DBG} includes an already formatted copy of the on-line Info
+version of this manual in the @file{gdb} subdirectory. The main Info
+file is @file{gdb-@value{BASHRELEASE}/gdb/gdb.info}, and it refers to
+subordinate files matching @samp{gdb.info*} in the same directory. If
+necessary, you can print out these files, or read them with any editor;
+but they are easier to read using the @code{info} subsystem in @sc{gnu}
+Emacs or the standalone @code{info} program, available as part of the
+@sc{gnu} Texinfo distribution.
+
+If you want to format these Info files yourself, you need one of the
+Info formatting programs, such as @code{texinfo-format-buffer} or
+@code{makeinfo}.
+
+If you have @code{makeinfo} installed, and are in the top level
+@value{DBG} source directory (@file{gdb-@value{BASHRELEASE}}, in the case of
+version @value{BASHRELEASE}), you can make the Info file by typing:
+
+@example
+cd gdb
+make gdb.info
+@end example
+
+If you want to typeset and print copies of this manual, you need @TeX{},
+a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
+Texinfo definitions file.
+
+@TeX{} is a typesetting program; it does not print files directly, but
+produces output files called @sc{dvi} files. To print a typeset
+document, you need a program to print @sc{dvi} files. If your system
+has @TeX{} installed, chances are it has such a program. The precise
+command to use depends on your system; @kbd{lpr -d} is common; another
+(for PostScript devices) is @kbd{dvips}. The @sc{dvi} print command may
+require a file name without any extension or a @samp{.dvi} extension.
+
+@TeX{} also requires a macro definitions file called
+@file{texinfo.tex}. This file tells @TeX{} how to typeset a document
+written in Texinfo format. On its own, @TeX{} cannot either read or
+typeset a Texinfo file. @file{texinfo.tex} is distributed with GDB
+and is located in the @file{gdb-@var{version-number}/texinfo}
+directory.
+
+If you have @TeX{} and a @sc{dvi} printer program installed, you can
+typeset and print this manual. First switch to the the @file{gdb}
+subdirectory of the main source directory (for example, to
+@file{gdb-@value{BASHRELEASE}/gdb}) and type:
+
+@example
+make gdb.dvi
+@end example
+
+Then give @file{gdb.dvi} to your @sc{dvi} printing program.
+@end ifset
+
+@node Installing bashdb
+@appendix Installing @value{DBG}
+@cindex configuring @value{DBG}
+@cindex installation
+
+@ifset FINISHED
+@value{DBG} comes with a @code{configure} script that automates the process
+of preparing @value{DBG} for installation; you can then use @code{make} to
+build the @code{gdb} program.
+@iftex
+@c irrelevant in info file; it's as current as the code it lives with.
+@footnote{If you have a more recent version of @value{DBG} than @value{BASHRELEASE},
+look at the @file{README} file in the sources; we may have improved the
+installation procedures since publishing this manual.}
+@end iftex
+
+The @value{DBG} distribution includes all the source code you need for
+@value{DBG} in a single directory, whose name is usually composed by
+appending the version number to @samp{gdb}.
+
+For example, the @value{DBG} version @value{BASHRELEASE} distribution is in the
+@file{gdb-@value{BASHRELEASE}} directory. That directory contains:
+
+@table @code
+@item gdb-@value{BASHRELEASE}/configure @r{(and supporting files)}
+script for configuring @value{DBG} and all its supporting libraries
+
+@item gdb-@value{BASHRELEASE}/gdb
+the source specific to @value{DBG} itself
+
+@item gdb-@value{BASHRELEASE}/bfd
+source for the Binary File Descriptor library
+
+@item gdb-@value{BASHRELEASE}/include
+@sc{gnu} include files
+
+@item gdb-@value{BASHRELEASE}/libiberty
+source for the @samp{-liberty} free software library
+
+@item gdb-@value{BASHRELEASE}/opcodes
+source for the library of opcode tables and disassemblers
+
+@item gdb-@value{BASHRELEASE}/readline
+source for the @sc{gnu} command-line interface
+
+@item gdb-@value{BASHRELEASE}/glob
+source for the @sc{gnu} filename pattern-matching subroutine
+
+@item gdb-@value{BASHRELEASE}/mmalloc
+source for the @sc{gnu} memory-mapped malloc package
+@end table
+
+The simplest way to configure and build @value{DBG} is to run @code{configure}
+from the @file{gdb-@var{version-number}} source directory, which in
+this example is the @file{gdb-@value{BASHRELEASE}} directory.
+
+First switch to the @file{gdb-@var{version-number}} source directory
+if you are not already in it; then run @code{configure}. Pass the
+identifier for the platform on which @value{DBG} will run as an
+argument.
+
+For example:
+
+@example
+cd gdb-@value{BASHRELEASE}
+./configure @var{host}
+make
+@end example
+
+@noindent
+where @var{host} is an identifier such as @samp{sun4} or
+@samp{decstation}, that identifies the platform where @value{DBG} will run.
+(You can often leave off @var{host}; @code{configure} tries to guess the
+correct value by examining your system.)
+
+Running @samp{configure @var{host}} and then running @code{make} builds the
+@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
+libraries, then @code{gdb} itself. The configured source files, and the
+binaries, are left in the corresponding source directories.
+
+@need 750
+@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
+system does not recognize this automatically when you run a different
+shell, you may need to run @code{sh} on it explicitly:
+
+@example
+sh configure @var{host}
+@end example
+
+If you run @code{configure} from a directory that contains source
+directories for multiple libraries or programs, such as the
+@file{gdb-@value{BASHRELEASE}} source directory for version @value{BASHRELEASE}, @code{configure}
+creates configuration files for every directory level underneath (unless
+you tell it not to, with the @samp{--norecursion} option).
+
+You can run the @code{configure} script from any of the
+subordinate directories in the @value{DBG} distribution if you only want to
+configure that subdirectory, but be sure to specify a path to it.
+
+For example, with version @value{BASHRELEASE}, type the following to configure only
+the @code{bfd} subdirectory:
+
+@example
+@group
+cd gdb-@value{BASHRELEASE}/bfd
+../configure @var{host}
+@end group
+@end example
+
+You can install @code{@value{DBG}} anywhere; it has no hardwired paths.
+However, you should make sure that the shell on your path (named by
+the @samp{SHELL} environment variable) is publicly readable. Remember
+that @value{DBG} uses the shell to start your script---some systems refuse to
+let @value{DBG} debug child processes whose programs are not readable.
+
+@menu
+* Separate Objdir:: Compiling @value{DBG} in another directory
+* Config Names:: Specifying names for hosts and targets
+* Configure Options:: Summary of options for configure
+@end menu
+
+@node Separate Objdir
+@section Compiling @value{DBG} in another directory
+
+If you want to run @value{DBG} versions for several host or target machines,
+you need a different @code{gdb} compiled for each combination of
+host and target. @code{configure} is designed to make this easy by
+allowing you to generate each configuration in a separate subdirectory,
+rather than in the source directory. If your @code{make} program
+handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
+@code{make} in each of these directories builds the @code{gdb}
+program specified there.
+
+To build @code{gdb} in a separate directory, run @code{configure}
+with the @samp{--srcdir} option to specify where to find the source.
+(You also need to specify a path to find @code{configure}
+itself from your working directory. If the path to @code{configure}
+would be the same as the argument to @samp{--srcdir}, you can leave out
+the @samp{--srcdir} option; it is assumed.)
+
+For example, with version @value{BASHRELEASE}, you can build @value{DBG} in a
+separate directory for a Sun 4 like this:
+
+@example
+@group
+cd gdb-@value{BASHRELEASE}
+mkdir ../gdb-sun4
+cd ../gdb-sun4
+../gdb-@value{BASHRELEASE}/configure sun4
+make
+@end group
+@end example
+
+When @code{configure} builds a configuration using a remote source
+directory, it creates a tree for the binaries with the same structure
+(and using the same names) as the tree under the source directory. In
+the example, you'd find the Sun 4 library @file{libiberty.a} in the
+directory @file{gdb-sun4/libiberty}, and @value{DBG} itself in
+@file{gdb-sun4/gdb}.
+
+One popular reason to build several @value{DBG} configurations in separate
+directories is to configure @value{DBG} for cross-compiling (where
+@value{DBG} runs on one machine---the @dfn{host}---while debugging
+programs that run on another machine---the @dfn{target}).
+You specify a cross-debugging target by
+giving the @samp{--target=@var{target}} option to @code{configure}.
+
+When you run @code{make} to build a program or library, you must run
+it in a configured directory---whatever directory you were in when you
+called @code{configure} (or one of its subdirectories).
+
+The @code{Makefile} that @code{configure} generates in each source
+directory also runs recursively. If you type @code{make} in a source
+directory such as @file{gdb-@value{BASHRELEASE}} (or in a separate configured
+directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{BASHRELEASE}}), you
+will build all the required libraries, and then build GDB.
+
+When you have multiple hosts or targets configured in separate
+directories, you can run @code{make} on them in parallel (for example,
+if they are NFS-mounted on each of the hosts); they will not interfere
+with each other.
+
+@node Config Names
+@section Specifying names for hosts and targets
+
+The specifications used for hosts and targets in the @code{configure}
+script are based on a three-part naming scheme, but some short predefined
+aliases are also supported. The full naming scheme encodes three pieces
+of information in the following pattern:
+
+@example
+@var{architecture}-@var{vendor}-@var{os}
+@end example
+
+For example, you can use the alias @code{sun4} as a @var{host} argument,
+or as the value for @var{target} in a @code{--target=@var{target}}
+option. The equivalent full name is @samp{sparc-sun-sunos4}.
+
+The @code{configure} script accompanying @value{DBG} does not provide
+any query facility to list all supported host and target names or
+aliases. @code{configure} calls the Bourne shell script
+@code{config.sub} to map abbreviations to full names; you can read the
+script, if you wish, or you can use it to test your guesses on
+abbreviations---for example:
+
+@smallexample
+% sh config.sub i386-linux
+i386-pc-linux-gnu
+% sh config.sub alpha-linux
+alpha-unknown-linux-gnu
+% sh config.sub hp9k700
+hppa1.1-hp-hpux
+% sh config.sub sun4
+sparc-sun-sunos4.1.1
+% sh config.sub sun3
+m68k-sun-sunos4.1.1
+% sh config.sub i986v
+Invalid configuration `i986v': machine `i986v' not recognized
+@end smallexample
+
+@noindent
+@code{config.sub} is also distributed in the @value{DBG} source
+directory (@file{gdb-@value{BASHRELEASE}}, for version @value{BASHRELEASE}).
+
+@node Configure Options
+@section @code{configure} options
+
+Here is a summary of the @code{configure} options and arguments that
+are most often useful for building @value{DBG}. @code{configure} also has
+several other options not listed here. @inforef{What Configure
+Does,,configure.info}, for a full explanation of @code{configure}.
+
+@example
+configure @r{[}--help@r{]}
+ @r{[}--prefix=@var{dir}@r{]}
+ @r{[}--exec-prefix=@var{dir}@r{]}
+ @r{[}--srcdir=@var{dirname}@r{]}
+ @r{[}--norecursion@r{]} @r{[}--rm@r{]}
+ @r{[}--target=@var{target}@r{]}
+ @var{host}
+@end example
+
+@noindent
+You may introduce options with a single @samp{-} rather than
+@samp{--} if you prefer; but you may abbreviate option names if you use
+@samp{--}.
+
+@table @code
+@item --help
+Display a quick summary of how to invoke @code{configure}.
+
+@item --prefix=@var{dir}
+Configure the source to install programs and files under directory
+@file{@var{dir}}.
+
+@item --exec-prefix=@var{dir}
+Configure the source to install programs under directory
+@file{@var{dir}}.
+
+@c avoid splitting the warning from the explanation:
+@need 2000
+@item --srcdir=@var{dirname}
+@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
+@code{make} that implements the @code{VPATH} feature.}@*
+Use this option to make configurations in directories separate from the
+@value{DBG} source directories. Among other things, you can use this to
+build (or maintain) several configurations simultaneously, in separate
+directories. @code{configure} writes configuration specific files in
+the current directory, but arranges for them to use the source in the
+directory @var{dirname}. @code{configure} creates directories under
+the working directory in parallel to the source directories below
+@var{dirname}.
+
+@item --norecursion
+Configure only the directory level where @code{configure} is executed; do not
+propagate configuration to subdirectories.
+
+@item --target=@var{target}
+Configure @value{DBG} for cross-debugging programs running on the specified
+@var{target}. Without this option, @value{DBG} is configured to debug
+programs that run on the same machine (@var{host}) as @value{DBG} itself.
+
+There is no convenient way to generate a list of all available targets.
+
+@item @var{host} @dots{}
+Configure @value{DBG} to run on the specified @var{host}.
+
+There is no convenient way to generate a list of all available hosts.
+@end table
+
+There are many other options available as well, but they are generally
+needed for special purposes only.
+@end ifset
+
+@include gpl.texi
+
+@include fdl.texi
+
+@node Function Index
+@unnumbered Function Index
+@printindex fn
+
+@node Command Index
+@unnumbered Command Index
+@printindex ky
+
+@node Variable Index
+@unnumbered Variable Index
+@printindex vr
+
+@node General Index
+@unnumbered General Index
+@printindex cp
+
+@tex
+% I think something like @colophon should be in texinfo. In the
+% meantime:
+\long\def\colophon{\hbox to0pt{}\vfill
+\centerline{The body of this manual is set in}
+\centerline{\fontname\tenrm,}
+\centerline{with headings in {\bf\fontname\tenbf}}
+\centerline{and examples in {\tt\fontname\tentt}.}
+\centerline{{\it\fontname\tenit\/},}
+\centerline{{\bf\fontname\tenbf}, and}
+\centerline{{\sl\fontname\tensl\/}}
+\centerline{are used for emphasis.}\vfill}
+\page\colophon
+% Blame: doc@cygnus.com, 1991.
+@end tex
+
+@bye
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/Makefile.am cvs/debugger/doc/Makefile.am
--- bash-2.05b/debugger/doc/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/Makefile.am 2003-09-08 08:40:26.000000000 +0200
@@ -0,0 +1,62 @@
+##############################################################################
+# $Id: Makefile.am,v 1.5 2003/09/02 00:26:24 rockyb Exp $
+# Copyright (C) 2003 Rocky Bernstein
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+EXT=1
+man1_MANS = bashdb.$(EXT)
+
+EXTRA_DIST = $(man1_MANS) bashdb-man.pod bashdb-man.html
+
+info_TEXINFOS = bashdb.texi
+bashdb_TEXINFOS = fdl.texi gpl.texi
+
+all: $(INFO_DEPS) $(man1_MANS) html
+
+pdf: bashdb.pdf
+
+txt: bashdb.txt
+
+ps: bashdb.ps
+
+man: $(man1_MANS)
+
+html: bashdb.html bashdb-man.html
+
+bashdb.html: bashdb.texi
+ texi2html $(srcdir)/bashdb.texi
+
+bashdb-man.html: bashdb-man.pod
+ pod2html --infile=$(srcdir)/bashdb-man.pod --outfile=$@
+
+$(man1_MANS): bashdb-man.pod
+ pod2man --section=$(EXT) $(srcdir)/bashdb-man.pod >$@
+
+%.ps.gz: %.ps
+ gzip -9c $< > $@
+
+.texi.pdf:
+ texi2pdf $<
+
+.texi.html:
+ texi2html $<
+
+.texi.txt:
+ makeinfo --no-headers $< > $@
+
+all-formats: pdf dvi txt ps html
+
+MOSTLYCLEANFILES = bashdb.tgs bashdb.ps.gz bashdb.pdf bashdb.html bashdb_toc.html bashdb_foot.html $(man1_MANS) bashdb-man.html
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/bashdb-man.pod cvs/debugger/doc/bashdb-man.pod
--- bash-2.05b/debugger/doc/bashdb-man.pod 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/bashdb-man.pod 2003-08-12 15:56:11.000000000 +0200
@@ -0,0 +1,192 @@
+=pod
+
+=head1 NAME
+
+bashdb - bash debugger script
+
+=head1 SYNOPSIS
+
+B<bashdb> [I<options>] I<script-name>
+
+B<bashdb> [I<options>] -c I<execution-string>
+
+B<bash --debugger> [I<bash-options>...] I<script-name>
+
+=head1 DESCRIPTION
+
+C<bashdb> is a bash script to which arranges for another bash script
+to be debugged. The debugger has a similar command interface as L<gdb>
+or Perl's L<perl5db> debugger. The way this script arranges debugging
+to occur is by including (or actually "source"-ing) some debug-support
+code and then sourcing the given script or command string.
+
+One problem with sourcing a debugged script is that the program name
+stored in $0 will be C<bashdb> rather than the name of the script to
+be debugged. The debugged script will appear in a call stack not as
+the top item but as the item below C<bashdb>. If this is of concern,
+use the last form given above, C<bash ---debugger> I<script-name>.
+
+A downside of invoking bash with the C<--debugger> option is any of
+the options below that are not bash options don't work, and those that
+I<are> bash options have the bash meaning rather than the bash
+debugger meaning. For example, C<-n> in bash means don't run a bash
+script but just syntax check it which is different from what is listed
+below.
+
+=head1 OPTIONS
+
+=over 4
+
+=item -h
+
+Print a usage message on standard error and exit with a return code
+of 100.
+
+Z<>
+
+=item -B
+
+In places where a filename appears in debugger output give just the
+basename only. This is needed in for regression testing. Using this
+option is equivalent to issuing:
+
+ set basename on
+
+inside the debugger.
+
+Z<>
+
+=item -n
+
+Normally the debugger will read debugger commands in C<~/.bashdbinit>
+if that file exists before accepting user interaction.
+C<.bashdbinit> is analogus to Perl's C<.perldb> or GNU gdb's
+C<.gdbinit>: a user might want to create such a debugger profile to
+add various user-specific customizations.
+
+Using the C<-n> option this initialization file will not be read. This
+is useful in regression testing or in tracking down a problem with
+one's C<.bashdbinit> profile.
+
+Z<>
+
+=item -c I<command-string>
+
+Instead of specifying the name of a bash script file, one can give an
+execution string that is to be debugged. Use this option to do that.
+
+If you invoke the debugger via C<bash --debugger>, the filename that will
+appear in source listing or in a call stack trace will be the artifical name
+*BOGUS*.
+
+Z<>
+
+=item -q
+
+Do not print introductory version and copyright information. This is
+again useful in regression testing where we don't want to include a
+changeable copyright date in the regression-test matching.
+
+Z<>
+
+=item -x I<debugger-cmdfile>
+
+Run the debugger commands I<debugger-cmdfile> before accepting user
+input. These commands are read however after any C<.bashdbinit>
+commands. Again this is useful running regression-testing debug
+scripts.
+
+Z<>
+
+=item -L I<debugger-library>
+
+The debugger needs to source or include a number of functions and
+these reside in a library. If this option is not given the default location
+of library is relative to the installed bashdb script: C<../lib/bashdb>.
+
+Z<>
+
+=item -T I<temporary-file-directory>
+
+The debugger needs to make use of some temporary filesystem storage to
+save persistent information across a subshell return or in order to
+evaluate an expression. The default directory is C</tmp> but you can
+use this option to set the directory where debugger temporary files
+will be created.
+
+Z<>
+
+=item -t I<tty-name>
+
+Debugger output usually goes to a terminal rather than stdout or stdin
+which the debugged program may use. Determination of the tty or
+pseudo-tty is normally done automatically. However if you want to
+control where the debugger output goes, use this option.
+
+Z<>
+
+=item -V
+
+Show version number and no-warranty and exit with return code 1.
+
+=back
+
+=head1 BUGS
+
+The C<bashdb> script and C<--debugger> option assume a patched version
+of bash. That is you can't debug bash scripts using the standard-issue
+version 2.05 bash or earlier versions. If you try to run the bashdb
+script on such as shell, may get the message:
+
+ Sorry, you need to use a debugger-enabled version of bash.
+
+This is not a bug in the debugger so much as a bug in bash itself or
+the lack of debugging support thereof.
+
+Debugging can be slow especially on large bash scripts. Scripts
+created by GNU autoconf are at a minimum hundreds of lines and it is
+not uncommon for them to be tens of thousands of lines.
+
+Part of the reason of the debugger slowness is that the debugger has
+to intercept every line and check to see if some action is to be taken
+for this and this is all in bash code. A better and faster
+architecture would be for the debugger to register a list of
+conditions or stopping places inside the bash code itself and have it
+arrange to call the debugger only when a condition requiring the
+debugger arises. Checks would be faster as this would be done in C
+code and access to internal structures would make this moe
+efficient. Did I mention the lack of debug support in bash (and other
+POSIX shells)?
+
+Another place you may find slowness is in initial startup of such
+large debugger scripts. The source code has to be read into internal
+arrays and this apparently takes time.
+
+=head1 SEE ALSO
+
+L<bash>. There also an extensive debugger reference manual.
+
+=head1 AUTHOR
+
+The current version is maintained (or not) by C<rocky@panix.com>.
+
+=head1 COPYRIGHT
+
+ Copyright (C) 2003 Rocky Bernstein, email: rocky@panix.com.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+I<$Id: bashdb-man.pod,v 1.2 2003/08/12 13:56:11 rockyb Exp $>
+
+=cut
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/bashdb.texi cvs/debugger/doc/bashdb.texi
--- bash-2.05b/debugger/doc/bashdb.texi 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/bashdb.texi 2003-09-08 08:40:27.000000000 +0200
@@ -0,0 +1,3759 @@
+\input texinfo @c -*-texinfo-*-
+@c Copyright 2002, 2003
+@c Rocky Bernstein for the Free Software Foundation
+@c
+@c TODO:
+@c - add examples for commands
+@c - clean up/improve sample session
+@c - help text is inaccurate and formatted too much to right.
+@c
+
+@c Sets version and release names and dates. Frees us from changing
+@c this file when a new release comes along.
+
+@c %**start of header
+@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
+@c of @set vars. However, you can override filename with makeinfo -o.
+@setfilename bashdb.info
+@c
+@c Name of Bash program. Used in running text.
+@set BASH @acronym{BASH}
+
+@c
+@c Name of debugger program. Used also for prompt string.
+@set DBG the @value{BASH} debugger
+@set dBGP The @value{BASH} debugger
+@set DDD @acronym{DDD}
+
+@settitle @value{BASH} Debugger
+@setchapternewpage odd
+@setcontentsaftertitlepage
+
+@c %**end of header
+
+@include version.texi
+
+@c A simple macro for optional variables.
+@macro ovar{varname}
+@r{[}@var{\varname\}@r{]}
+@end macro
+
+@macro DDD {}
+@acronym{DDD}
+@end macro
+
+@macro BASH {}
+@acronym{@value{BASH}}
+@end macro
+
+@macro DBG {}
+@value{DBG}
+@end macro
+
+@iftex
+@c @smallbook
+@c @cropmarks
+@end iftex
+
+@finalout
+
+@c readline appendices use @vindex, @findex and @ftable,
+@c annotate.texi and gdbmi use @findex.
+@c @syncodeindex vr cp
+@c @syncodeindex fn cp
+
+@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
+
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* @value{DBG}: (@value{DBG}). The @sc{bash} debugger.
+@end direntry
+
+@ifinfo
+This file documents the @sc{bash} debugger @value{BASH}.
+
+
+This is the @value{EDITION} Edition, @value{UPDATED-MONTH},
+of @cite{Debugging with BASHDB: the @sc{gnu} Source-Level Debugger}
+for REBASH
+
+Copyright (C) 2002,2003 Rocky Bernstein for the Free Software Foundation.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+@ifset DEBIANHASBECOMEREASONABLE
+@c From Matthias Klose <doko@debian.org> a Debian maintainer on
+@c Sat, 23 Aug 2003 14:24:44 +0200
+@c
+@c I personally see the invariant sections as the thing in the
+@c GFDL, which hinders me in uploading the package to the archives.
+@c I don't have any problem, if some other Debian developer makes a
+@c bashdb package built from separate sources.
+@c
+@c I am aware that Debian ships other packages containing documentation
+@c covered by the GFDL (and one of them for which I do the packaging as
+@c well), but I won't add a new package, which I maintain. So before an
+@c upload of a bashdb package built from the bash sources either
+@c
+@c
+@c - Debian has a position on the GFDL, which allows inclusion
+@c
+@c - the bashdb manual does not have invariant sections, or is
+@c relicensed, or dual licensed.
+@c
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Free Software'' and ``Free Software Needs
+Free Documentation'', with the Front-Cover Texts being ``A GNU
+Manual,'' and with the Back-Cover Texts as in (a) below.
+
+(a) The Free Software Foundation's Back-Cover Text is: ``You have
+freedom to copy and modify this GNU Manual, like GNU software. Copies
+published by the Free Software Foundation raise funds for GNU
+development.''
+@end ifset
+@ifclear DEBIANHASBECOMEREASONABLE
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@end ifclear
+@end ifinfo
+
+@titlepage
+@title Debugging with BASHDB
+@sp 1
+@subtitle @value{EDITION} Edition, for BASH
+@subtitle @value{UPDATED-MONTH}
+@author Rocky Bernstein
+@page
+@tex
+{\parskip=0pt
+\hfill (Send bugs and comments on bashdb to bug-bashdb\@sourceforge.net.)\par
+\hfill {\it Debugging with BASH}\par
+\hfill \TeX{}info \texinfoversion\par
+}
+@end tex
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2002,2003 Rocky Bernstein for the Free Software
+Foundation.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+@ifset DEBIANHASBECOMEREASONABLE
+@c From Matthias Klose <doko@debian.org> a Debian maintainer on
+@c Sat, 23 Aug 2003 14:24:44 +0200
+@c
+@c I personally see the invariant sections as the thing in the
+@c GFDL, which hinders me in uploading the package to the archives.
+@c I don't have any problem, if some other Debian developer makes a
+@c bashdb package built from separate sources.
+@c
+@c I am aware that Debian ships other packages containing documentation
+@c covered by the GFDL (and one of them for which I do the packaging as
+@c well), but I won't add a new package, which I maintain. So before an
+@c upload of a bashdb package built from the bash sources either
+@c
+@c
+@c - Debian has a position on the GFDL, which allows inclusion
+@c
+@c - the bashdb manual does not have invariant sections, or is
+@c relicensed, or dual licensed.
+@c
+@c
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Free Software'' and ``Free Software Needs
+Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below.
+
+(a) The Free Software Foundation's Back-Cover Text is: ``You have
+freedom to copy and modify this GNU Manual, like GNU software. Copies
+published by the Free Software Foundation raise funds for GNU
+development.''
+@end ifset
+@ifclear DEBIANHASBECOMEREASONABLE
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+@end ifclear
+@end titlepage
+@page
+
+@ifnottex
+@node Top, Summary, (dir), (dir)
+
+@top Debugging with @DBG
+
+This file describes @value{DBG}, the @sc{bash} symbolic debugger.
+
+This is the @value{EDITION} Edition, @value{UPDATED-MONTH}, for REBASH.
+
+Copyright (C) 2002,2003 Rocky Bernstein
+
+@menu
+* Summary:: Overview of Debugger with a sample session
+
+* Invocation:: Getting in and out
+* Running:: Script setup inside the BASH debugger
+* Debugger Command Reference:: BASH debugger command reference
+
+* Front Ends:: Using @DBG from a front-end user interface
+
+* BASH Debugger Bugs:: Reporting bugs
+* History and Acknowledgments:: History and Acknowledgments
+
+Appendices
+* Formatting Documentation:: How to format and print @DBG documentation
+
+* Installing bashdb:: Installing bashdb
+* Copying:: GNU General Public License says
+ how you can copy and share bashdb
+* GNU Free Documentation License:: The license for this documentation
+
+Indexes (nodes containing large menus)
+* Function Index:: An item for each function name.
+* Command Index:: An item for each command name.
+* Variable Index:: An item for each documented variable.
+* General Index:: An item for each concept.
+@end menu
+
+@end ifnottex
+
+@contents
+
+@node Summary
+@chapter Summary of the BASH Debugger
+
+The purpose of a debugger such as @DBG is to allow you to see what is
+going on ``inside'' a bash script while it executes.
+
+@DBG can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+@itemize @bullet
+@item
+Start your script, specifying anything that might affect its behavior.
+
+@item
+Make your script stop on specified conditions.
+
+@item
+Examine what has happened, when your script has stopped.
+
+@item
+Change things in your script, so you can experiment with correcting the
+effects of one bug and go on to learn about another.
+@end itemize
+
+Although you can use the BASH debugger to debug scripts written in
+BASH, it can also be used just as a front-end for learning more
+about programming in BASH. As an additional aid, the debugger can
+be used within the context of an existing script with its functions
+and variables that have already been initialized; fragments of the
+existing can be experimented with by entering them inside the debugger.
+
+@menu
+* Sample Session:: A Sample BASH Debugger session
+* Free Software:: Freely redistributable software
+@end menu
+
+@node Sample Session
+@section A Sample BASH Debugger Session
+
+You can use this manual at your leisure to read all about @value{DBG}.
+However, a handful of commands are enough to get started using the
+debugger. This chapter illustrates those commands.
+
+@iftex
+In this sample session, we emphasize user input like this: @b{input},
+to make it easier to pick out from the surrounding output.
+@end iftex
+
+Below we will debug a script that contains a function to compute the
+factorial of a number: fact(0) is 1 and fact(n) is n*fact(n-1).
+
+@smallexample
+$ @b{bashdb -L . fact.sh}
+Bourne-Again Shell Debugger, release bash-@value{BASHRELEASE}
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+(fact.sh:9):
+9: echo fact 0 is: `fact 0`
+bashdb<0> @b{-}
+ 1: #!/usr/local/bin/bash
+ 2: fact() @{
+ 3: ((n==0)) && echo 1 && return
+ 4: ((nm1=n-1))
+ 5: ((result=n*`fact $nm1`))
+ 6: return $result
+ 7: @}
+ 8:
+ 9:==> echo fact 0 is: `fact 0`
+bashdb<1> @b{l}
+ 10: echo fact 3 is: $(fact 3)
+@end smallexample
+
+@noindent
+
+The command invocation uses the option ``-L .'' Here we assume that
+the @command{bashdb} script and the debugger files are in the same
+location. If you are running from the source code, this will be the
+case. However if bashdb has been installed this probably won't be true
+and here you probably don't need to use ``-L .'' Instead you would
+type simply @code{bashdb fact.sh}.
+
+The first debugger command we gave @kbd{-}, we listed a window of
+lines @emph{before} where we were executing. Because the window, 10
+lines, is larger than the number of lines to the top of the file we
+printed only 9 lines here. The next command list starting from the
+current line and again wants to print 10 lines but because there are
+only one remaining line, that is what is printed.
+
+@smallexample
+bashdb<2> @b{step}
+(fact.sh:9):
+9: echo fact 0 is: `fact 0`
+bashdb<3> @b{@key{RET}}
+2: fact() @{
+bashdb<4> @b{@key{RET}}
+3: ((n==0)) && echo 1 && return
+bashdb<5> @b{print $n}
+
+@end smallexample
+
+Ooops... The variable @kbd{n} isn't initialized.
+
+The first @kbd{step} command steps the script one instruction. It may
+seem odd that the line printed is exactly the same one as before. What
+has happened though is that we've ``stepped'' into the subshell needed
+to run @kbd{`fact 0`}; we haven't however started running anything
+inside that subshell yet though---the function call.
+
+The first @kbd{step} command steps the script one instruction; it
+didn't advance the line number at all. That is because we were
+stopping before the command substitution or backtick is to take
+place. The second command we entered was just hitting the return key;
+bashdb remembers that you entered @code{step} previously, so it runs
+the step rather than @kbd{next}, the other alternative when you hit
+@key{RET}. Step one more instruction and we are just before running
+the first statement of the function.
+
+Next, we print the value of the variable @kbd{n}. Notice we need to add
+a preceding dollar simple to get the substitution or value of n. As we
+will see later, if the @kbd{pe} command were used this would not be
+necessary.
+
+We now modify the file to add an assignment to local variable @kbd{n} and
+restart.
+
+@smallexample
+bashdb<6> @b{restart}
+Restarting with: /usr/local/bin/bashdb -L . fact.sh
+(fact.sh:10):
+10: echo fact 0 is: `fact 0`
+bashdb<0> @b{list 1}
+ 1: #!/usr/local/bin/bash
+ 2: fact() @{
+ 3: local -i n=$@{1:0@}
+ 4: ((n==0)) && echo 1 && return
+ 5: ((nm1=n-1))
+ 6: ((result=n*`fact $nm1`))
+ 7: return $result
+ 8: @}
+ 9:
+ 10:==> echo fact 0 is: `fact 0`
+bashdb<1> @b{s 3}
+(fact.sh:3):
+3: local -i n=$@{1:0@}
+bashdb<2> @b{step}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+bashdb<3> @b{print $n}
+print $n
+0
+@end smallexample
+
+@noindent
+This time we use the @code{list} debugger command to list the lines in
+the file. From before we know it takes three @code{steps} commands
+before we get into the fact() function, so we add a count onto the
+@code{step} command. Notice we abbreviate @code{step} with @code{s};
+we could have done likewise and abbreviated @code{list} with @code{l}.
+
+@smallexample
+bashdb<4> @b{@key{RET}}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+echo 1
+bashdb<5> @b{@key{RET}}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+return
+@end smallexample
+
+@noindent
+Again we just use @key{RET} to repeat the last @code{step}
+commands. And again the fact that we are staying on the same line 4
+means that the next condition in the line is about to be
+executed. Notice that we see the command (@code{echo 1} or
+@code{return}) listed when we stay on the same line which has multiple
+stopping points in it. Given the information above, we know that the
+value echo'ed on return will be 1.
+
+@smallexample
+bashdb<6> @b{@key{RET}}
+fact 0 is: 1
+(fact.sh:12):
+12: echo fact 3 is: $(fact 3)
+bashdb<7> @b{break 5}
+Breakpoint 1 set in file fact.sh, line 5.
+bashdb<8> @b{continue}
+@end smallexample
+
+@noindent
+We saw that we could step with a count into the function
+fact(). However above took another approach: we set a stopping point or
+``breakpoint'' at line 5 to get us a little ways into the fact()
+subroutine. Just before line 5 is to executed, we will get back into
+the debugger. The @code{continue} command just resumes execution until
+the next stopping point which has been set up in some way.
+
+@smallexample
+(fact.sh:5):
+5: ((nm1=n-1))
+Breakpoint 1 hit(1 times).
+bashdb<8> @b{x n-1}
+2
+bashdb<9> @b{s}
+(fact.sh:5):
+6: ((result=n*`fact $nm1`))
+bashdb<10> @b{c}
+fact.sh: line 6: ((: result=n*: syntax error: operand expected (error token is "*")
+bashdb<7> @b{R}
+Restarting with: bash --debugger fact.sh
+11: echo fact 0 is: `fact 0`
+bashdb<0> @b{l fact}
+ 2: fact ()
+ 3: @{
+ 4: local -i n=$@{1:0@};
+ 5: (( "n==0" )) && echo 1 && return;
+ 6: (( nm1=n-1 ));
+ 7: ((fact_nm1=`fact $nm1`))
+ 8: (( "result=n*fact_nm1" ));
+ 9: echo $result
+10: @}
+@end smallexample
+
+@noindent
+In addition to listing by line numbers, we can also list giving a
+function name. Below, instead of setting a breakpoint at line 5 and
+running ``continue'' as we did above, we try something slightly shorter
+and slightly different. We give the line number on the ``continue''
+statement. This is a little different in that a one-time break is made
+on line 5. Once that statement is reached the breakpoint is removed.
+
+@smallexample
+bashdb<1> @b{continue 5}
+One-time breakpoint 1 set in file fact.sh, line 5.
+fact 0 is: 1
+(fact.sh:5):
+5: ((nm1=n-1))
+bashdb<2> @b{s}
+6: ((fact_nm1=`fact $nm1`))
+bashdb<2> @b{s}
+2: fact() @{
+bashdb<3> @b{T}
+->0 in file `fact.sh' at line 2
+##1 fact("3") called from file `fact.sh' at line 12
+##2 source("fact.sh") called from file `/usr/local/bin/bashdb' at line 154
+##3 main("fact.sh") called from file `/usr/local/bin/bashdb' at line 0
+bashdb<4> @b{c}
+fact 3 is: 6
+Debugged program terminated normally. Use q to quit or R to restart.
+@end smallexample
+
+@noindent
+When we stop at line 5 above, we have already run fact(0) and output
+the correct results. The output from the program ``fact 0 is: 1'' is
+intermixed with the debugger output. The @code{T} command above
+requests call stack output and this confirms that we are not in the
+fact(0) call but in the fact(3) call. There are 4 lines listed in the
+stack trace even though there is just one call from the main
+program. The top line of the trace doesn't really represent a call,
+it's just where we currently are in the program. That last line is an
+artifact of invoking bash from the bashdb script rather than running
+@code{bash --debugger}.
+
+The last message in the output above @samp{Debugged program exited
+normally.} is from @value{DBG}; it indicates script has finished
+executing. We can end our @value{DDGP} session with the @value{GDBP}
+@code{quit} command.
+
+Above we did our debugging session on the command line. If you are a
+GNU Emacs user, you can do your debugging inside that. Also there is
+a(nother) GUI interface called DDD that supports @value{DBG}.
+
+@node Free Software
+@unnumberedsec Free software
+
+@DBG is @dfn{free software}, protected by the @sc{gnu}
+General Public License
+(GPL). The GPL gives you the freedom to copy or adapt a licensed
+program---but every person getting a copy also gets with it the
+freedom to modify that copy (which means that they must get access to
+the source code), and the freedom to distribute further copies.
+Typical software companies use copyrights to limit your freedoms; the
+Free Software Foundation uses the GPL to preserve these freedoms.
+
+Fundamentally, the General Public License is a license which says that
+you have these freedoms and that you cannot take these freedoms away
+from anyone else.
+
+@unnumberedsec Free Software Needs Free Documentation
+
+The biggest deficiency in the free software community today is not in
+the software---it is the lack of good free documentation that we can
+include with the free software. Many of our most important
+programs do not come with free reference manuals and free introductory
+texts. Documentation is an essential part of any software package;
+when an important free software package does not come with a free
+manual and a free tutorial, that is a major gap. We have many such
+gaps today.
+
+Consider Perl, for instance. The tutorial manuals that people
+normally use are non-free. How did this come about? Because the
+authors of those manuals published them with restrictive terms---no
+copying, no modification, source files not available---which exclude
+them from the free software world.
+
+That wasn't the first time this sort of thing happened, and it was far
+from the last. Many times we have heard a GNU user eagerly describe a
+manual that he is writing, his intended contribution to the community,
+only to learn that he had ruined everything by signing a publication
+contract to make it non-free.
+
+Free documentation, like free software, is a matter of freedom, not
+price. The problem with the non-free manual is not that publishers
+charge a price for printed copies---that in itself is fine. (The Free
+Software Foundation sells printed copies of manuals, too.) The
+problem is the restrictions on the use of the manual. Free manuals
+are available in source code form, and give you permission to copy and
+modify. Non-free manuals do not allow this.
+
+The criteria of freedom for a free manual are roughly the same as for
+free software. Redistribution (including the normal kinds of
+commercial redistribution) must be permitted, so that the manual can
+accompany every copy of the program, both on-line and on paper.
+
+Permission for modification of the technical content is crucial too.
+When people modify the software, adding or changing features, if they
+are conscientious they will change the manual too---so they can
+provide accurate and clear documentation for the modified program. A
+manual that leaves you no choice but to write a new manual to document
+a changed version of the program is not really available to our
+community.
+
+Some kinds of limits on the way modification is handled are
+acceptable. For example, requirements to preserve the original
+author's copyright notice, the distribution terms, or the list of
+authors, are ok. It is also no problem to require modified versions
+to include notice that they were modified. Even entire sections that
+may not be deleted or changed are acceptable, as long as they deal
+with nontechnical topics (like this one). These kinds of restrictions
+are acceptable because they don't obstruct the community's normal use
+of the manual.
+
+However, it must be possible to modify all the @emph{technical}
+content of the manual, and then distribute the result in all the usual
+media, through all the usual channels. Otherwise, the restrictions
+obstruct the use of the manual, it is not free, and we need another
+manual to replace it.
+
+Please spread the word about this issue. Our community continues to
+lose manuals to proprietary publishing. If we spread the word that
+free software needs free reference manuals and free tutorials, perhaps
+the next person who wants to contribute by writing documentation will
+realize, before it is too late, that only free manuals contribute to
+the free software community.
+
+If you are writing documentation, please insist on publishing it under
+the GNU Free Documentation License or another free documentation
+license. Remember that this decision requires your approval---you
+don't have to let the publisher decide. Some commercial publishers
+will use a free license if you insist, but they will not propose the
+option; it is up to you to raise the issue and say firmly that this is
+what you want. If the publisher you are dealing with refuses, please
+try other publishers. If you're not sure whether a proposed license
+is free, write to @email{licensing@@gnu.org}.
+
+You can encourage commercial publishers to sell more free, copylefted
+manuals and tutorials by buying them, and particularly by buying
+copies from the publishers that paid for their writing or for major
+improvements. Meanwhile, try to avoid buying non-free documentation
+at all. Check the distribution terms of a manual before you buy it,
+and insist that whoever seeks your business must respect your freedom.
+Check the history of the book, and try to reward the publishers that
+have paid or pay the authors to work on it.
+
+The Free Software Foundation maintains a list of free documentation
+published by other publishers, at
+@url{http://www.fsf.org/doc/other-free-books.html}.
+
+@node Invocation
+@chapter Getting in and out
+
+This chapter discusses how to start @value{DBG}, and how to get out of it.
+The essentials are:
+@itemize @bullet
+@item
+type @samp{bash --debugger @emph{script-name}} or @samp{bashdb
+@emph{script-name}} to start @value{DBG}.
+@item
+type @kbd{quit} or @kbd{C-d} inside the debugger to exit.
+@end itemize
+
+But also note there are two front-ends available as well. One can also
+enter the debugger inside emacs via the command @code{M-x bashdb}
+after loading Emacs' Grand Unified Debugger, @code{gud}. See
+@ref{Emacs,,Using the BASH debugger from @sc{gnu} Emacs}. And there is
+support in a @value{DDD} for bash.
+
+@menu
+* Starting the BASH debugger:: How to enter the BASH debugger
+* Quitting the BASH debugger:: How to leave the BASH debugger
+@end menu
+
+@node Starting the BASH debugger
+@section Starting the BASH debugger
+
+@emph{Note: it is important to use a debugger-enabled bash. You wil
+get an error message if the debugger is run under a version of BASH
+that does not have debugging support.}
+
+As mentioned above, one can enter @DBG via Emacs or
+DDD. However you don't have to use either of these. And these still
+need a way on their own to get things started.
+
+There are in fact two @emph{other} ways to start @value{DBG}. The
+first way is to pass the @samp{--debugger} option to bash with the
+name of your script the scripts arguments following that, or with a
+command string (@code{-c}).
+
+@example
+bash --debugger @var{script} @var{script-arguments...}
+bash --debugger -c @var{command-string}...
+@end example
+
+This calls a debugger initialization script. It works much like a
+@BASH login profile which may set variables and define
+functions. But this shell profile is customized for debugging and as
+such arranges for itself to get called before each statement is
+executed. Although there are some problems at present in I/O
+redirection that the method described next doesn't have, it is
+expected that over time more features will be enabled in bash when the
+@samp{--debugger} option is in effect. By default, both debugging in
+Emacs via GUD (@ref{Emacs,,Using the BASH debugger under Emacs}) and
+debugging via @value{DDD} work via this method.
+
+The form @samp{bash --debugger -c ...} can be used to get into the
+debugger without having to give a script name to debug. Sometimes you
+may want to do this just to see how the debugger works: try some
+debugger commands or maybe get online help. If you run @code{ddd
+--bash} without giving a script name, it in fact uses this form.
+
+In order for the @samp{--debugger} option to work however, you must
+have the debugger scripts installed in a place where @DBG can
+find them. For this reason, in developing @value{DBG}, I use a second
+method more often; it doesn't require the bash debugger to be
+installed. This method uses another script called @code{bashdb} which
+after taking its own options takes the name of the script to debugged
+and the arguments to pass to that script. Using this method, one
+would start the debugger like this:
+
+@example
+bash @var{path-to-bashdb}/bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
+@end example
+
+As with the first method, @code{bash} should be a debugger-enabled
+bash. If @code{bashdb} has the path to bash in it at the top (e.g. via
+@code{#!}), and @code{bashdb} can be found in your program-search
+path, then this might be equivalent to the above:
+
+@example
+bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
+@end example
+
+There are two or three disadvantages however of running a debugger
+this way. First @code{$0} will have the value @code{bashdb} rather
+than the script you are trying to run. For some scripts this may
+change the behavior of the debugged script. Second a traceback will
+contain additional lines showing the ``source''-ing of the debugged
+script from @code{bashdb}. And third, although this way works better
+than the first method, over time this way may come into disuse.
+
+An option that you'll probably need to use if bashdb isn't installed
+but run out of the source code directory is @samp{-L} which specifies
+the directory that contains the debugger script files.
+
+You can further control how bashdb starts up by using command-line
+options. bashdb itself can remind you of the options available.
+
+@noindent
+Type
+
+@example
+bashdb -h
+@end example
+
+@noindent
+to display all available options and briefly describe their use.
+
+When the bash debugger is invoked either by the @code{bashdb}
+front-end script or @code{bash --debugging}, the first argument that
+does not have an associated option flag for @code{bashdb} or
+@code{bash} (as the case may be) is used as the name a the script file
+to be debugged, and any following options get passed the debugged
+script.
+
+Options for the @code{bashdb} front-end are shown in the
+following list.
+
+@menu
+* Options for the bashdb script:: Options you can pass in starting bashdb
+@end menu
+
+@node Options for the bashdb script
+@subsection Command-line options for @code{bashdb} script
+
+You can run @DBG in various alternative modes---for example, in
+batch mode or quiet mode.
+
+@table @code
+@item -h
+@cindex @code{-h}
+This option causes @value{DBG} to print some basic help and exit.
+
+@item -V
+@cindex @code{-V}
+This option causes @DBG to print its version number and
+no-warranty blurb, and exit.
+
+@item -n
+@cindex @code{-n}
+Do not execute commands found in any initialization files. Normally,
+@BASH executes the commands in these files after all the command
+options and arguments have been processed. @xref{Command Files,,Command
+files}.
+
+@item -q
+@cindex @code{-q}
+``Quiet''. Do not print the introductory and copyright messages. These
+messages are also suppressed in batch mode.
+
+@item -t
+@cindex @code{-t}
+``Terminal output''. Set the file or terminal that you want debugger command
+output to go to. Note that the debugger output is independent of the
+debugged script output.
+
+@item -L @var{directory}
+@cindex @code{-L}
+Set directory where debugger files reside to @var{directory}. The
+default location is @code{../lib/bashdb} relative to the place that
+the bashdb script is located. For example if bashdb is located in
+@code{/usr/local/bin/bashdb}, the default library location will be
+@code{/usr/local/lib/bashdb} which may or may not exist. If it doesn't
+you'll get an error when you run bashdb. Only if the default location
+is incorrect, should you need to use the @code{-L} option.
+
+@item -T @var{directory}
+@cindex @code{-T}
+Set directory to use for writing temporary files.
+
+@end table
+
+@node Quitting the BASH debugger
+@section Quitting the BASH debugger
+
+@cindex interrupt
+An interrupt (often @kbd{C-c}) does not exit from @value{DBG}, but
+rather terminates the action of any @DBG command that is in
+progress and returns to @value{DBG} command level. Inside a debugger
+command interpreter, use @code{quit} command (@pxref{Quit, ,Quitting
+the BASH debugger}).
+
+@node Running
+@chapter Script Setup inside the BASH Debugger
+
+@menu
+* Starting:: Starting your script
+* Command Files:: Command files
+* Arguments:: Your script's arguments
+* Input/Output:: Your script's input and output
+* Script/Debugger Interaction:: Keeping out of each other's harm
+@end menu
+
+@need 2000
+@node Starting
+@section Starting your script
+@cindex starting
+@cindex running
+
+@table @code
+@kindex restart
+@kindex run @r{(@code{restart})}
+@kindex R @r{(@code{restart})}
+@item restart @ovar{options to debugged script}
+@itemx run
+@itemx R
+Use the @code{restart} command to restart your script under
+@value{DBG}. Without any arguments, the script name and parameters
+from the last invocation are used. @value{dBGP} tries to maintain the
+settings, watchpoints, breakpoints, actions and so on. Internally it
+uses line numbers and filenames to record he position of interesting
+places in your porgram; so if your program changes some or all of
+these numbers may be off. Environment variable
+@code{BASHDB_RESTART_FILE} is and a temporary file are used to signal
+a restart, so you shouldn't uset @code{BASHDB_RESTART_FILE} (or any
+environment variable starting with @code{BASHDB_}.
+
+@end table
+
+@node Command Files
+@section Command files
+
+@cindex command files
+A command file for @DBG is a file of lines that are @DBG
+commands. Comments (lines starting with @kbd{#}) may also be included.
+An empty line in a command file does nothing; it does not mean to repeat
+the last command, as it would from the terminal.
+
+@cindex init file
+@cindex @file{.bashdbinit}
+@cindex @file{bashdb.ini}
+When you start @value{DBG}, it automatically executes commands from its
+@dfn{init files}, normally called @file{.bashdbinit}@footnote{The DJGPP
+port of @DBG uses the name @file{bashdb.ini} instead, due to the
+limitations of file names imposed by DOS filesystems.}.
+During startup, @DBG does the following:
+
+@enumerate
+@item
+Reads the init file (if any) in your home directory@footnote{On
+DOS/Windows systems, the home directory is the one pointed to by the
+@code{HOME} environment variable.}.
+
+@item
+Processes command line options and operands.
+
+@item
+Reads the init file (if any) in the current working directory.
+
+@item
+Reads command files specified by the @samp{-x} option.
+@end enumerate
+
+The init file in your home directory can set options (such as @samp{set
+complaints}) that affect subsequent processing of command line options
+and operands. Init files are not executed if you use the @samp{-x}
+option (@pxref{Options for the bashdb script, ,bashdb script options}).
+
+@cindex init file name
+On some configurations of @value{DBG}, the init file is known by a
+different name (these are typically environments where a specialized
+form of @DBG may need to coexist with other forms, hence a
+different name for the specialized version's init file). These are the
+environments with special init file names:
+
+You can also request the execution of a command file with the
+@code{source} command:
+
+@table @code
+@kindex source
+@item source @var{filename}
+Execute the command file @var{filename}.
+@end table
+
+The lines in a command file are executed sequentially. They are not
+printed as they are executed. If there is an error, execution
+proceeds to the next command in the file.
+
+@node Arguments
+@section Your script's arguments
+
+@cindex arguments (to your script)
+The arguments to your script can be specified by the arguments of the
+@code{restart} command.
+They are passed to a shell, which expands wildcard characters and
+performs redirection of I/O, and thence to your script.
+
+@code{restart} with no arguments uses the same arguments used by the previous
+@code{restart}, or those set by the @code{set args} command..
+
+@table @code
+@kindex set args
+@item set args
+Specify the arguments to be used the next time your program is run. If
+@code{set args} has no arguments, @code{restart} executes your program
+with no arguments. Once you have run your program with arguments,
+using @code{set args} before the next @code{restart} is the only way to run
+it again without arguments.
+
+@kindex show args
+@item show args
+Show the arguments to give your program when it is started.
+@end table
+
+@node Input/Output
+@section Your script's input and output
+
+@cindex redirection
+@cindex I/O
+@cindex terminal
+By default, the script you run under the BASH debugger does input and
+output to the same terminal that BASH uses. Before running the script
+to be debugged, the debugger records the tty that was in effect. All
+of its output is then written to that. However you can change this
+when using the @samp{bashdb} script using the @samp{-t} option.
+
+
+@table @code
+@kindex info terminal
+@item info terminal
+Displays information recorded by @DBG about the terminal modes your
+program is using.
+@end table
+
+@kindex tty
+@cindex controlling terminal
+Another way to specify where your script should do input and output is
+with the @code{tty} command. This command accepts a file name as
+argument, and causes this file to be the default for future @code{restart}
+commands. It also resets the controlling terminal for the child
+process, for future @code{restart} commands. For example,
+
+@example
+tty /dev/ttyb
+@end example
+
+@noindent
+directs that processes started with subsequent @code{restart} commands
+default to do input and output on the terminal @file{/dev/ttyb} and have
+that as their controlling terminal.
+
+An explicit redirection in @code{restart} overrides the @code{tty} command's
+effect on the input/output device, but not its effect on the controlling
+terminal.
+
+When you use the @code{tty} command or redirect input in the @code{restart}
+command, only the input @emph{for your script} is affected. The input
+for @DBG still comes from your terminal.
+
+@node Script/Debugger Interaction
+@section Script/Debugger Interaction
+
+@value{dBGP} and your program live in the same variable space so
+to speak. @BASH does not have a notion of module scoping or lexical
+hiding (yet) and this then imposes some additional care and awareness.
+
+Most of the variables and functions used inside @DBG start
+@code{_Dbg_}, so please don't use variables or functions with these
+names in your program.
+
+@emph{Note: there are some other variables that begin with just an
+underscore (@code{_}); over time these will be phased out. But until
+then, avoid those or consult what is used by the debugger. Run
+@samp{bashdb --debugger -c 'declare -p'} to list all the variables in
+use including those used by the debugger.}
+
+A number of @DBG environment variables are also reserved for
+use; these start with @code{BASHDB_}. For example:
+@env{BASHDB_INPUT}, @env{BASHDB_LEVEL} and,
+@env{BASHDB_QUIT_ON_QUIT} (@pxref{Debug, ,Debug}),
+@env{BASHDB_RESTART_FILE} (@pxref{Starting, ,Starting}), to name a
+few. Finally, there are some @BASH environment dynamic
+variables and these start with @env{BASH_}. For example
+@env{BASH_SUBSHELL} (@pxref{Debug, ,Debug}), @env{BASH_COMMAND}
+(@pxref{Command Display, ,Command Display}), @env{BASH_LINENO}, and
+@env{BASH_SOURCE} to name a few.
+
+In order to do its work @value{dBGP} sets up a @code{DEBUG}
+trap. Consequently a script shouldn't reset this or the debugger will
+lose control. @value{dBGP} also sets up an @code{EXIT} handler so that
+it can gain control after the script finishes. Another signal
+intercepted is the an interrupt or @code{INT} signal. For more
+information about signal handling, @pxref{Signals, ,Signals}
+
+@node Debugger Command Reference
+@chapter BASH Debugger Command Reference
+
+You can abbreviate the long name of @DBG command to the first
+few letters of the command name, if that abbreviation is unambiguous;
+and you can repeat the @code{next} o r@code{step} commands by typing
+just @key{RET}. Some commands which require a parameter, such as
+@code{print} remember the argument that was given to them.
+
+@menu
+* Command Syntax:: How to give commands to the BASH debugger
+* Help:: How to ask for help (help)
+* Quit:: Leaving the debugger (quit)
+* Information:: Status and Debugger settings (info, show)
+* Stopping:: Stopping and continuing (break, watch, step, cont...)
+* Stack:: Examining the stack (where, up, down, frame)
+* List:: Printing source files (list)
+* Search:: Searching source files (/pat/ ?pat?)
+* Data:: Examining data (print, examine, info variables)
+* Evaluation/Execution:: Arbitrary execution (eval, shell)
+* Auto Display:: Executing expressions on stop (display, undisplay)
+* Controlling bashdb:: Controlling bashdb (set, history)
+@end menu
+
+@node Command Syntax
+@section Command syntax
+
+A BASH debugger command is a single line of input. There is no limit on
+how long it can be. It starts with a command name, which is followed by
+arguments whose meaning depends on the command name. For example, the
+command @code{step} accepts an argument which is the number of times to
+step, as in @samp{step 5}. You can also use the @code{step} command
+with no arguments. Some commands do not allow any arguments.
+
+@cindex repeating next/step commands
+@kindex RET @r{(repeat last command)}
+A blank line as input to @DBG (typing just @key{RET}) means to
+repeat the previous next or step command.
+
+@kindex # @r{(a comment)}
+@cindex comment
+Any text from a @kbd{#} to the end of the line is a comment; it does
+nothing. This is useful mainly in command files (@pxref{Command
+Files,,Command files}).
+
+@node Help
+@section Getting help (@samp{help})
+@cindex online documentation
+
+Once inside the BASH debugger, you can always ask it for information on its
+commands, using the command @code{help}.
+
+@table @code
+@kindex h @r{(@code{help})}
+@item help
+@itemx h
+You can use @code{help} (abbreviated @code{h}) with no arguments to
+display a short list of named classes of commands:
+@end table
+
+@flushleft
+@smallexample
+bashdb<0> @b{help}
+bashdb commands:
+List/search source lines: Control script execution:
+------------------------- -------------------------
+ l [start|.] [cnt] List cnt lines T [n] Stack trace
+ from line start s [n] Single step [n times]
+ l sub List source code fn n [n] Next, steps over subs
+ - or . List previous/current line <CR>/<Enter> Repeat last n or s
+ w [line] List around line c [linespec] Continue [to linespec]
+ f filename View source in file L List all breakpoints
+ /pat/ Search forward for pat b linespec Set breakpoint
+ ?pat? Search backward for pat del [n].. or D Delete a/all breaks
+ by entry number
+Debugger controls: skip skip execution of cmd
+------------------------- cl linespec Delete breakpoints by
+ H [num] Show last num commands line spec
+ q [exp] or ^D Quit returning exp R [args] Attempt a restart
+ info [cmd] Get info on cmd. u [n] Go up stack by n or 1.
+ !n or hi n Run debugger history n do [n] Go down stack by n or 1.
+ h or ? [cmd] Get help on command W [var] Add watchpoint. If no
+ info [cmd] Get info on cmd no expr, delete all
+ show [cmd] Show settings We [expr] Add Watchpoint arith
+ expr
+ so file read in dbg commands t Toggle trace
+ en/di n enable/disable brkpt,
+ set x y set a debugger variable watchpoint, or display
+ e bash-cmd evaluate a bash command tb linespec Add one-time break
+ disp expr add a display expr a linespec cmd eval "cmd" at linespec
+ M Show module versions A delete all actions
+ x expr evaluate expression ret jump out of fn or source
+ (via declare, let, eval) finish execute until return
+ deb debug into another cond n exp set breakpoint condition
+ shell script
+ !! cmd [args] execute shell command "cmd" with "args"
+
+Data Examination: also see e, t, x
+-------------------------
+ p variable Print variable
+ V [[!]pat] List variable(s) matching or not (!) matching pattern pat
+ S [[!]pat] List subroutine names [not] matching pattern pat
+
+Readline command line editing (emacs/vi mode) is available
+For more help, type h <cmd> or consult online-documentation.
+@end smallexample
+@end flushleft
+@c the above line break eliminates huge line overfull...
+
+@table @code
+@item help @var{command}
+With a command name as @code{help} argument, the BASH debugger displays
+short information on how to use that command.
+
+@example
+bashdb<0> @b{help list}
+l linespec List window lines starting at linespec.
+l min incr List incr lines starting at 'min' linespec.
+l List next window of lines.
+l . Same as above.
+ Long command name: list.
+@end example
+
+In addition to @code{help}, you can use the debugger command
+@code{info} to inquire about the state of your script, or the state of
+@DBG itself. The listings under @code{info} in the Index
+point to all the sub-commands. @xref{Command Index}.
+@end table
+
+@c @group
+@table @code
+@kindex info
+@kindex i @r{(@code{info})}
+@item info
+This command (abbreviated @code{i}) is for describing the state of
+your program. For example, you can list the arguments given to your
+script with @code{info args}, or list the breakpoints you have set
+with @code{info breakpoints}. You can get a complete list of the
+@code{info} sub-commands with @w{@code{help info}}.
+
+@example
+bashdb<0> @b{info}
+Info subcommands are: args breakpoints display files source sources stack terminal variables watchpoints
+bashdb<1> @b{info source}
+Current script file is parm.sh
+Contains 34 lines.
+@end example
+@end table
+
+
+@node Quit
+@section Quitting the BASH debugger (@samp{quit})
+
+@table @code
+@kindex quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
+@kindex q @r{(@code{quit})}
+@item quit @ovar{expression}
+@item quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
+@itemx q
+
+To exit @value{DBG}, use the @code{quit} command (abbreviated
+@code{q}), or type an end-of-file character (usually @kbd{C-d}). If
+you do not supply @var{expression}, @DBG will try to terminate
+normally or with exit code 0. Otherwise it will terminate using the
+result of @var{expression} as the exit code.
+
+A simple @code{quit} tries to terminate all nested subshells that may
+be in effect. If you are nested a subshell, this is normally
+indicated in a debugger prompt by the number of parentheses that the
+history number is inside --- no parenthesis means there is no subshell
+in effect. The dynamic variable @env{BASH_SUBSHELL} also contains the
+number of subshells in effect.
+
+If you want only to terminate some number of subshells but not all of
+them, you can give a count of the number of subshells to leave after
+the return-code expression. To leave just one level of subshell
+@code{return} does almost the same thing. (See @pxref{Returning,
+,Returning}) There is a subtle difference between the two though:
+@code{return} will leave you at the beginning of the next statement
+while @code{quit} may leave you at the place the subshell was invoked
+which may be in the middle of another command such as an assingment
+statement or condition test.
+
+If the environment variable @code{BASHDB_QUIT_ON_QUIT} is set, when the
+program terminates, the debugger will also terminate too. This may be
+useful if you are debugging a script which calls another script and
+you want this inner script just to return to the outer script.
+@end table
+
+@node Stopping
+@section Stopping and Resuming Execution (@samp{break}, @samp{watch}, @samp{step}, @samp{cont})
+
+One important use of a debugger is to stop your program before it
+terminates so that, if your script might run into trouble, you can
+investigate and find out why. However should your script accidently
+continue to termination, @DBG has arranged for it not to leave the
+debugger without your explicit instruction. That way, you can restart
+the program using the same command arguments.
+
+Inside @value{DBG}, your script may stop for any of several reasons,
+such as a signal, a breakpoint, or reaching a new line after a
+debugger command such as @code{step}. You may then examine and
+change variables, set new breakpoints or remove old ones, and then
+continue execution.
+
+@menu
+* Breakpoints:: Breakpoints, watchpoints (break, watch, clear)
+* Resuming Execution:: Resuming execution (continue, step, next, skip, debug)
+* Signals:: Signals
+@end menu
+
+@node Breakpoints
+@subsection Breakpoints, watchpoints
+
+@cindex breakpoints
+A @dfn{breakpoint} makes your script stop whenever a certain point in
+the program is reached. For each breakpoint, you can add conditions to
+control in finer detail whether your script stops.
+
+You can set breakpoints with the @code{break} command and its variants
+(@pxref{Set Breaks, ,Setting breakpoints}), to specify the place where
+your script should stop by line number. or function name in the
+debugged script.
+
+@cindex watchpoints
+@cindex breakpoint on variable modification
+A @dfn{watchpoint} is a special breakpoint that stops your script when
+the value of an expression changes. There is a different command to
+set watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}).
+
+But aside from that, you can manage a watchpoint like any other
+breakpoint: you delete enable, and disable both breakpoints and
+watchpoints using the same commands.
+
+You can arrange to have values from your program displayed automatically
+whenever @value{BASH} stops at a breakpoint. @xref{Auto Display,,
+Automatic display}.
+
+@cindex breakpoint numbers
+@cindex numbers for breakpoints
+@DBG assigns a number to each breakpoint and watchpoint when
+you create it; these numbers are successive integers starting with
+one. In many of the commands for controlling various features of
+breakpoints you use the breakpoint number to say which breakpoint you
+want to change. Each breakpoint may be @dfn{enabled} or
+@dfn{disabled}; if disabled, it has no effect on your script until you
+enable it again.
+
+@cindex watchpoints numbers
+@cindex numbers for watchpoints
+Watchpoint numbers however are distiguished from breakpoint numbers by
+virtue of their being suffixed with the either an upper- or lower-case
+`W'. For example, to enable breakpoint entry 0 along with watchpoint
+entry 1 you would write @samp{enable 1 2w}, the ``2w'' refers to the
+watchpoint; ``2W'' would work just as well.
+
+@ifset FINISHED
+@cindex breakpoint ranges
+@cindex ranges of breakpoints
+Some @DBG commands accept a range of breakpoints on which to
+operate. A breakpoint range is either a single breakpoint number, like
+@samp{5}, or two such numbers, in increasing order, separated by a
+hyphen, like @samp{5-7}. When a breakpoint range is given to a command,
+all breakpoint in that range are operated on.
+@end ifset
+
+@menu
+* Set Breaks:: Setting breakpoints (break, tbreak)
+* Set Watchpoints:: Setting watchpoints (watch, watche)
+* Delete Breaks:: Deleting breakpoints (delete, clear)
+* Disabling:: Disabling breakpoints (disable, enable)
+* Conditions:: Break conditions (condition)
+@end menu
+
+@node Set Breaks
+@subsubsection Setting breakpoints (@samp{break} @samp{tbreak})
+
+@kindex break
+@kindex b @r{(@code{break})}
+@cindex latest breakpoint
+Breakpoints are set with the @code{break} command (abbreviated
+@code{b}).
+
+@table @code
+@item break @var{function}
+Set a breakpoint at entry to function @var{function}.
+
+@item break @var{linenum}
+Set a breakpoint at line @var{linenum} in the current source file.
+The current source file is the last file whose source text was printed.
+The breakpoint will stop your script just before it executes any of the
+code on that line.
+
+@item break @var{filename}:@var{linenum}
+Set a breakpoint at line @var{linenum} in source file @var{filename};
+@var{filename} has to be one of the files previously read in and has
+to be specified exactly as the name used when read in. For a list of
+read-in files, use the @samp{info files} command.
+
+@ifset FINISHED
+@item break
+When called without any arguments, @code{break} sets a breakpoint at
+the next instruction to be executed in the selected stack frame
+(@pxref{Stack, ,Examining the Stack}). In any selected frame but the
+innermost, this makes your script stop as soon as control returns to
+that frame. If you use @code{break} without an argument in the
+innermost frame, @DBG stops the next time it reaches the
+current location; this may be useful inside loops.
+@end ifset
+
+@item break @dots{} if @var{cond}
+Set a breakpoint with condition @var{cond}; evaluate the expression
+@var{cond} each time the breakpoint is reached, and stop only if the
+value is nonzero---that is, if @var{cond} evaluates as true. The
+expression is evaluated via the @code{let} builtin funtion.
+@samp{@dots{}} stands for one of the possible arguments described
+above (or no argument) specifying where to break. The word ``if'' is
+often optional and is necessary only @samp{@dots{}} is
+omitted. @xref{Conditions, ,Break conditions}, for more information on
+breakpoint conditions.
+
+Examples:
+@example
+bashdb<0> @b{break fn1}
+Breakpoint 1 set in file parm.sh, line 3.
+bashdb<1> @b{break 28}
+Breakpoint 2 set in file parm.sh, line 28.
+bashdb<2> @b{break parm.sh:29}
+Breakpoint 3 set in file parm.sh, line 29.
+bashdb<3> @b{break 28 if x==5}
+Breakpoint 4 set in file parm.sh, line 28.
+@end example
+
+@kindex tbreak
+@item tbreak @var{args}
+Set a breakpoint enabled only for one stop. @var{args} are the
+same as for the @code{break} command, and the breakpoint is set in the same
+way, but the breakpoint is automatically deleted after the first time your
+program stops there. @xref{Disabling, ,Disabling breakpoints}.
+
+@kindex info breakpoints
+@cindex @code{$_} and @code{info breakpoints}
+@item info breakpoints @ovar{n}
+@itemx info break @ovar{n}
+@itemx info watchpoints @ovar{n}
+Print a table of all breakpoints, watchpoints set and not deleted,
+with the following columns for each breakpoint:
+
+@table @emph
+@item Breakpoint Numbers (@samp{Num})
+@item Enabled or Disabled (@samp{Enb})
+Enabled breakpoints are marked with @samp{1}. @samp{0} marks breakpoints
+that are disabled (not enabled).
+@item Count
+The number of times that breakpoint or watchpoint has been hit.
+@item Condition
+The arithmetic expression
+@item File and Line (@samp{file:line})
+The filename and line number inside that file where of breakpoint in
+the script. The file and line are separated with a colon.
+@end table
+
+@noindent
+If a breakpoint is conditional, @code{info break} shows the condition on
+the line following the affected breakpoint; breakpoint commands, if any,
+are listed after that.
+
+@noindent
+@code{info break} displays a count of the number of times the breakpoint
+has been hit.
+
+@code{info break} with a breakpoint number @var{n} as argument lists
+only that breakpoint.
+
+Examples:
+@example
+bashdb<4> @b{info break}
+Breakpoints at following places:
+Num Type Disp Enb What
+1 breakpoint keep y parm.sh:3
+2 breakpoint keep y parm.sh:28
+3 breakpoint keep y parm.sh:29
+4 breakpoint keep y parm.sh:28
+No watch expressions have been set.
+bashdb<5> @b{info break 4}
+Num Type Disp Enb What
+4 breakpoint keep y parm.sh:28
+No watch expressions have been set.
+@end example
+@end table
+
+
+@ifset FINISHED
+This is especially useful in conjunction with the
+@code{ignore} command. You can ignore a large number of breakpoint
+hits, look at the breakpoint info to see how many times the breakpoint
+was hit, and then run again, ignoring one less than that number. This
+will get you quickly to the last hit of that breakpoint.
+@end ifset
+
+@DBG allows you to set any number of breakpoints at the same place in
+your script. There is nothing silly or meaningless about this. When
+the breakpoints are conditional, this is even useful
+(@pxref{Conditions, ,Break conditions}).
+
+@node Set Watchpoints
+@subsubsection Setting watchpoints (@samp{watch}, @samp{watche})
+
+@cindex setting watchpoints
+You can use a watchpoint to stop execution whenever the value of an
+expression changes, without having to predict a particular place where
+this may happen. As with the @code{print} (@pxref{Data,,Examining
+Data}), the idiosyncracies of a BASH or any POSIX shell derivative
+suggest using two commands. The @code{watch} command is just for a
+single variables; the @code{watche} command uses the builtin ``let''
+command to evaluate an expression. If the variable you are tracking
+can take a string value, issuing something like @samp{watch foo} will
+not have the desired effect---any string assignment to @code{foo} will
+have a value 0 when it is assigned via ``let.''
+
+@table @code
+@kindex watch
+@item watch @var{var}
+Set a watchpoint for a variable. @DBG will break when the
+value of @var{var} changes. In this command do not add a leading
+dollar symbol to @var{var}.
+
+@item watche @var{expr}
+Set a watchpoint for an expression via the builtin ``let'' command.
+@DBG will break when @var{expr} is written into by the program
+and its value changes. Not that this may not work for tracking
+arbitrary string value changes. For that use @code{watch} described
+earlier.
+@end table
+
+@node Delete Breaks
+@subsubsection Deleting breakpoints (@samp{clear}, @samp{delete})
+
+@cindex clearing breakpoints, watchpoints
+@cindex deleting breakpoints, watchpoints
+It is often necessary to eliminate a breakpoint or watchpoint once it
+has done its job and you no longer want your script to stop there.
+This is called @dfn{deleting} the breakpoint. A breakpoint that has
+been deleted no longer exists; it is forgotten.
+
+With the @code{clear} command you can delete breakpoints according to
+where they are in your script. With the @code{delete} command you can
+delete individual breakpoints, or watchpoints by specifying their
+breakpoint numbers. @emph{Note: as described below under the ``clear''
+command, ``d'' is an alias for ``clear'', not ``delete''. }
+
+It is not necessary to delete a breakpoint to proceed past it. @DBG
+automatically ignores breakpoints on the first instruction to be executed
+when you continue execution.
+
+@table @code
+@kindex clear
+@kindex d @r{(@code{clear})}
+@item clear
+Delete any breakpoints at the next instruction to be executed in the
+selected stack frame (@pxref{Selection, ,Selecting a frame}). When
+the innermost frame is selected, this is a good way to delete a
+breakpoint where your script just stopped.
+
+It may seem odd that we have an alias ``d'' for ``clear.'' It so
+happens that Perl's debugger use ``d'' for its delete command and the
+delete concept in Perl's debugger corresponds to ``clear'' in
+GDB. (Perl doesn't have a notion of breakpoint entry numbers). So in
+order to be compatible with both debugger interfaces, ``d'' is used as
+an alias for ``clear.'' Clear?
+
+@item clear @var{function}
+@itemx clear @var{filename}:@var{function}
+Delete any breakpoints set at entry to the function @var{function}.
+
+@item clear @var{linenum}
+@itemx d @var{linenum}
+@ifset FINISHED
+@itemx clear @var{filename}:@var{linenum}
+@end ifset
+Delete any breakpoints set at or within the code of the specified line.
+
+@cindex delete breakpoints
+@kindex delete
+@kindex de @r{(@code{delete})}
+@item delete @ovar{breakpoints}
+Delete the breakpoints, watchpoints specified as arguments.
+
+If no argument is specified, delete all breakpoints (@DBG asks
+confirmation, unless you have @code{set confirm off}). You can
+abbreviate this command as @code{de}.
+
+
+Note that for compatibility with Perl's debugger, @code{d} means
+something else: @code{clear}.
+
+@end table
+
+@node Disabling
+@subsubsection Disabling breakpoints (@samp{disable}, @samp{enable})
+
+Rather than deleting a breakpoint or watchpoint, you might
+prefer to @dfn{disable} it. This makes the breakpoint inoperative as if
+it had been deleted, but remembers the information on the breakpoint so
+that you can @dfn{enable} it again later.
+
+You disable and enable breakpoints, watchpoints, and catchpoints with
+the @code{enable} and @code{disable} commands, optionally specifying one
+or more breakpoint numbers as arguments. Use @code{info break} or
+@code{info watch} to print a list of breakpoints, watchpoints, and
+catchpoints if you do not know which numbers to use.
+
+A breakpoint, watchpoint, or catchpoint can have any of four different
+states of enablement:
+
+@itemize @bullet
+@item
+Enabled. The breakpoint stops your program. A breakpoint set
+with the @code{break} command starts out in this state.
+@item
+Disabled. The breakpoint has no effect on your program.
+@item
+Enabled once. The breakpoint stops your program, but then becomes
+disabled.
+@item
+Enabled for deletion. The breakpoint stops your program, but
+immediately after it does so it is deleted permanently. A breakpoint
+set with the @code{tbreak} command starts out in this state.
+@end itemize
+
+You can use the following commands to enable or disable breakpoints,
+watchpoints, and catchpoints:
+
+@table @code
+@kindex disable breakpoints
+@kindex disable
+@kindex dis @r{(@code{disable})}
+@item disable @ovar{breakpoints}
+Disable the specified breakpoints---or all breakpoints, if none are
+listed. A disabled breakpoint has no effect but is not forgotten. All
+options such as ignore-counts, conditions and commands are remembered in
+case the breakpoint is enabled again later. You may abbreviate
+@code{disable} as @code{dis}.
+
+@kindex enable breakpoints
+@kindex enable
+@item enable @ovar{breakpoints}
+Enable the specified breakpoints (or all defined breakpoints). They
+become effective once again in stopping your program.
+@end table
+
+@c FIXME: I think the following ``Except for [...] @code{tbreak}'' is
+@c confusing: tbreak is also initially enabled.
+Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks,
+,Setting breakpoints}), breakpoints that you set are initially enabled;
+subsequently, they become disabled or enabled only when you use one of
+the commands above. (The command @code{until} can set and delete a
+breakpoint of its own, but it does not change the state of your other
+breakpoints; see @ref{Resuming Execution, ,Resuming Execution}.)
+
+@node Conditions
+@subsubsection Break conditions (@samp{condition})
+@cindex conditional breakpoints
+@cindex breakpoint conditions
+
+The simplest sort of breakpoint breaks every time your script reaches
+a specified place. You can also specify a @dfn{condition} for a
+breakpoint. A condition is just a BASH expression.
+
+Break conditions can be specified when a breakpoint is set, by using
+@samp{if} in the arguments to the @code{break} command. @xref{Set
+Breaks, ,Setting breakpoints}. A breakpoint with a condition
+evaluates the expression each time your script reaches it, and your
+script stops only if the condition is @emph{true}.
+
+@cindex one-time breakpoints
+There is also a notion of a ``one-time'' breakpoint which gets deleted
+as soon as it is hit, so that that breakpoint is executed once only.
+
+Conditions are also accepted for watchpoints; you may not need them,
+since a watchpoint is inspecting the value of an expression anyhow---but
+it might be simpler, say, to just set a watchpoint on a variable name,
+and specify a condition that tests whether the new value is an interesting
+one.
+
+Break conditions can be specified when a breakpoint is set, by using
+@samp{if} in the arguments to the @code{break} command. @xref{Set
+Breaks, ,Setting breakpoints}. They can also be changed at any time
+with the @code{condition} command.
+
+@ifset FINISHED
+You can also use the @code{if} keyword with the @code{watch} command.
+The @code{catch} command does not recognize the @code{if} keyword;
+@code{condition} is the only way to impose a further condition on a
+catchpoint.
+@end ifset
+
+@table @code
+@kindex condition
+@item condition @var{bnum} @var{expression}
+Specify @var{expression} as the break condition for breakpoint
+@var{bnum}. After you set a condition, breakpoint @var{bnum} stops
+your program only if the value of @var{expression} is true (nonzero).
+
+@item condition @var{bnum}
+Remove the condition from breakpoint number @var{bnum}. It becomes
+an ordinary unconditional breakpoint.
+@end table
+
+@ifset FINISHED
+When you use @code{condition}, @DBG checks @var{expression}
+immediately for syntactic correctness, and to determine whether
+symbols in it have referents in the context of your breakpoint. If
+@var{expression} uses symbols not referenced in the context of the
+breakpoint, @DBG prints an error message:
+
+@example
+No symbol "foo" in current context.
+@end example
+@end ifset
+
+@noindent
+@BASH does
+not actually evaluate @var{expression} at the time the @code{condition}
+command (or a command that sets a breakpoint with a condition, like
+@code{break if @dots{}}) is given, however.
+
+Examples;
+@example
+condition 1 x>5 # Stop on breakpoint 0 only if x>5 is true.
+condition 1 # Change that! Unconditinally stop on breakpoint 1.
+@end example
+
+@node Resuming Execution
+@subsection Resuming Execution
+
+@cindex stepping
+@cindex continuing
+@cindex resuming execution
+@dfn{Continuing} means resuming program execution until your script
+completes normally. In contrast, @dfn{stepping} means executing just
+one more ``step'' of your script, where ``step'' may mean either one
+line of source code. Either when continuing or when stepping,
+your script may stop even sooner, due to a breakpoint or a signal.
+
+@menu
+* Step:: running the next statement (step)
+* Next:: running the next statement skipping over functions (skip)
+* Finish:: running until the return of a function or ``source'' (finish)
+* Skip:: skipping the next statement (skip)
+* Continue:: continuing execution (continue)
+* Debug:: debugging into another program (debug)
+* Returning:: returning
+@end menu
+
+@node Step
+@subsubsection Step (@samp{step})
+@table @code
+@kindex step
+@kindex s @r{(@code{step})}
+@item step
+Continue running your script until control reaches a different source
+line, then stop it and return control to @value{DBG}. This command is
+abbreviated @code{s}.
+
+The @code{step} command only stops at the first instruction of a source
+line. This prevents the multiple stops that could otherwise occur in
+@code{switch} statements, @code{for} loops, etc. @code{step} continues
+to stop if a function that has debugging information is called within
+the line. In other words, @code{step} @emph{steps inside} any functions
+called within the line.
+
+@item step @ovar{count}
+Continue running as in @code{step}, but do so @var{count} times. If a
+breakpoint is reached, or a signal not related to stepping occurs before
+@var{count} steps, stepping stops right away.
+@end table
+
+@node Next
+@subsubsection Next (@samp{next})
+@table @code
+@kindex next
+@kindex n @r{(@code{next})}
+@item next @ovar{count}
+Continue to the next source line in the current (innermost) stack frame.
+This is similar to @code{step}, but function calls that appear within
+the line of code are executed without stopping. Execution stops when
+control reaches a different line of code at the original stack level
+that was executing when you gave the @code{next} command. This command
+is abbreviated @code{n}.
+
+An argument @var{count} is a repeat count, as for @code{step}.
+@end table
+
+@node Finish
+@subsubsection Finish (@samp{finish})
+@table @code
+@kindex finish
+@item finish
+Continue running until just after function returns. @emph{Currently,
+the line shown on a return is the function header, unless the
+@code{return} builtin function is executed in which case it is the
+line number of the @code{return} function.}
+
+Contrast this with the @code{return} command (@pxref{Returning,
+,Returning from a function}) and the @code{quit} (@pxref{Quitting the
+BASH debugger, ,Quitting the BASH debugger}).
+
+@end table
+
+@node Skip
+@subsubsection Skip (@samp{skip})
+@table @code
+@kindex skip
+@item skip @ovar{count}
+Skip exection of the next source line.
+This may be useful if you have an action that ``fixes'' existing code in
+the script. The @code{debug} command internally uses the @code{skip} command
+to skip over existing non-debugged invocation that was presumably just
+run.
+@end table
+
+@node Continue
+@subsubsection Continue (@samp{continue})
+@table @code
+@kindex continue
+@kindex c @r{(@code{continue})}
+@item continue @ovar{linespec}
+@itemx c @ovar{line-number}
+Resume program execution, at the address where your script last
+stopped; any breakpoints set at that address are bypassed. The
+optional argument @var{linespec} allows you to specify a linespec (a
+line number, function, or filename linenumber combination) to set. A
+one-time breakpoint is deleted when that breakpoint is reached. Should
+the program stop before that breakpoint is reached, for example,
+perhaps another breakpoint or watchpoint is reached first, in a
+listing of the breakpoints you will see this entry with the condition
+9999 which indicates a one-time breakpoint.
+@end table
+
+To resume execution at a different place, you can use @code{return}
+(@pxref{Returning, ,Returning from a function}) to go back to the
+calling function or sourced script. If you are nested inside a
+subshell, @code{quit} with a value for the number of subshells to
+exit also functions like a return.
+
+A typical technique for using stepping is to set a breakpoint
+(@pxref{Breakpoints, ,Breakpoints; watchpoints}) at the
+beginning of the function or the section of your script where a problem
+is believed to lie, run your script until it stops at that breakpoint,
+and then step through the suspect area, examining the variables that are
+interesting, until you see the problem happen.
+
+@node Debug
+@subsubsection Debug (@samp{debug})
+@table @code
+@kindex debug
+@item debug @ovar{script-name}
+Debug into @var{script-name}. If no name is given the current source line
+is used. In either case the options are prepended to cause the
+debugger to run.
+
+The nesting level of the debugger is saved inside environment variable
+@code{BASHDB_LEVEL}. The debugger prompt indicates the level of nesting
+by enclosing the history in that many nestings of @code{<>} symbols.
+
+@end table
+
+@node Returning
+@subsubsection Returning from a function, sourced file, or subshell (@samp{return})
+
+@table @code
+@cindex returning from a function, sourced file or subshell
+@kindex return
+@item return
+@itemx return
+You can cancel execution of a function call or a subshell with the
+@code{return} command.
+@end table
+
+The @code{return} command does not resume execution; it leaves the
+program stopped in the state that would exist if the function had just
+returned. See also the @code{quit} command (@ref{Quit, ,Quitting the
+BASH debugger}). In some situations @code{return} is similar to
+@code{quit}: in particular when the script is @emph{not} currenlty
+inside in a function and the number of subshells in effect is 0, or
+when a subshell count of 1 is given on the @code{quit} command.
+
+@ifset FINISHED
+In contrast, the @code{finish} command (@pxref{Continuing
+and Stepping, ,Continuing and stepping}) resumes execution until the
+selected stack frame returns naturally.
+@end ifset
+
+@node Signals
+@subsection Signals
+@cindex signals
+
+A signal is an asynchronous event that can happen in a program. The
+operating system defines the possible kinds of signals, and gives each
+kind a name and a number. For example, in Unix @code{SIGINT} is the
+signal a program gets when you type an interrupt character (often
+@kbd{C-c}); @code{SIGALRM} occurs when the alarm clock timer goes off
+(which happens only if your program has requested an alarm).
+
+Some signal handlers are installed and changed for @value{DBG}'s
+normal use: @code{SIGDEBUG} and @code{SIGEXIT}. @code{SIGDEBUG} is
+used by the debugger to potentially stop your program before execution
+of each statement occurs, and @code{SIGEXIT} is used to catch your
+program just before it is set to leave so you have the option of
+restarting the program with the same options (and not leave the
+debugger) or let the program quit.
+
+Signal handlers that the debugged script might have installed are
+saved and called before the corresponding debugger handler. Thus, the
+debugged program should work roughly in the same fashion as when it is
+not debugged. However there are some call-stack variables which
+inevitably will differ. To try to hedge this a little so the behaviour
+is the same, @value{DBG} will modify arguments to the traps if it
+finds one of the call-stack that change as a result of the debugger
+being in place. In particluar @env{$LINENO} will get replaced with
+@env{$@{BASH_LINENO[0]@}}; also @env{$@{BASH_LINENO[0]@}} and
+@env{$@{BASH_SOURCE[0]@}} get replaced with
+@env{$@{BASH_LINENO[1]@}} and @env{$@{BASH_SOURCE[1]@}}
+respectively.
+
+The debugger also installs an interrupt handler @code{SIGINT} so that
+errant programs can be interrupted and you can find out where the
+program was when you interrupted it.
+
+@cindex fatal signals
+Some signals, including @code{SIGALRM}, are a normal part of the
+functioning of your program. Others, such as @code{SIGSEGV}, indicate
+errors; these signals are @dfn{fatal} (they kill your program immediately) if the
+program has not specified in advance some other way to handle the signal.
+@code{SIGINT} does not indicate an error in your program, but it is normally
+fatal so it can carry out the purpose of the interrupt: to kill the program.
+
+@BASH has the ability to detect any occurrence of a signal in your
+program. You can tell @BASH in advance what to do for each kind of
+signal.
+
+@cindex handling signals
+Normally, @BASH is set up to let the non-erroneous signals like
+@code{SIGALRM} be silently passed to your program
+(so as not to interfere with their role in the program's functioning)
+but to stop your program immediately whenever an error signal happens.
+You can change these settings with the @code{handle} command.
+
+@table @code
+@kindex info signals
+@item info signals
+@itemx info handle
+Print a table of all the kinds of signals and how @BASH has been told to
+handle each one. You can use this to see the signal numbers of all
+the defined types of signals.
+
+@code{info handle} is an alias for @code{info signals}.
+
+@kindex handle
+@item handle @var{signal} @var{keywords}@dots{}
+Change the way @BASH handles signal @var{signal}. @var{signal}
+can be the number of a signal or its name (with or without the
+@samp{SIG} at the beginning); a list of signal numbers of the form
+@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
+known signals. The @var{keywords} say what change to make.
+@end table
+
+@c @group
+The keywords allowed by the @code{handle} command can be abbreviated.
+Their full names are:
+
+@table @code
+@item stop
+@BASH should stop your program when this signal happens. This implies
+the @code{print} keyword as well.
+
+@item nostop
+@BASH should not stop your program when this signal happens. It may
+still print a message telling you that the signal has come in.
+
+@item print
+@BASH should print a message when this signal happens.
+
+@item noprint
+@BASH should not mention the occurrence of the signal at all.
+
+@item stack
+@BASH should print a stack trace when this signal happens.
+
+@item nostack
+@BASH should not print a stack trace when this signal occurs.
+
+@ifset FINISHED
+@item pass
+@itemx noignore
+@BASH should allow your program to see this signal; your program
+can handle the signal, or else it may terminate if the signal is fatal
+and not handled. @code{pass} and @code{noignore} are synonyms.
+
+@item nopass
+@itemx ignore
+@BASH should not allow your program to see this signal.
+@code{nopass} and @code{ignore} are synonyms.
+@end ifset
+@end table
+@c @end group
+
+@ifset FINISHED
+When a signal stops your program, the signal is not visible to the
+program until you
+continue. Your program sees the signal then, if @code{pass} is in
+effect for the signal in question @emph{at that time}. In other words,
+after @BASH reports a signal, you can use the @code{handle}
+command with @code{pass} or @code{nopass} to control whether your
+program sees that signal when you continue.
+
+The default is set to @code{nostop}, @code{noprint}, @code{pass} for
+non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
+@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
+erroneous signals.
+
+You can also use the @code{signal} command to prevent your program from
+seeing a signal, or cause it to see a signal it normally would not see,
+or to give it any signal at any time. For example, if your program stopped
+due to some sort of memory reference error, you might store correct
+values into the erroneous variables and continue, hoping to see more
+execution; but your program would probably terminate immediately as
+a result of the fatal signal once it saw the signal. To prevent this,
+you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your
+program a signal}.
+@end ifset
+
+@node Information
+@section Status and Debugger Settings (@samp{info}, @samp{show})
+
+In addition to @code{help}, you can use the @BASH commands @code{info}
+and @code{show} to inquire about the state of your program, or the state
+of @BASH itself. Each command supports many topics of inquiry; this
+manual introduces each of them in the appropriate context. The listings
+under @code{info} and under @code{show} in the Index point to
+all the sub-commands. @xref{Command Index}.
+
+@c @group
+@table @code
+@kindex info
+@kindex i @r{(@code{info})}
+@item info
+This command (abbreviated @code{i}) is for describing the state of
+your program. For example, you canlist the current @code{$1}, @code{$2}
+parameters with @code{info args}, or list the breakpoints you have set
+with @code{info breakpoints} or @code{info watchpoints}. You can get
+a complete list of the @code{info} sub-commands with @w{@code{help
+info}}.
+
+@kindex set
+@item set
+You can assign the result of an expression to an environment variable
+with @code{set}. For example, you can set the number of lines
+@BASH will list by default to 20 with @code{set listsize 20}.
+
+@kindex show
+@item show
+In contrast to @code{info}, @code{show} is for describing the state of
+@BASH itself.
+You can change most of the things you can @code{show}, by using the
+related command @code{set};
+
+The distinction between @code{info} and @code{show} however is a bit
+fuzzy. For example, to list the arguments given to your script use
+@code{show args}; @code{info args} does something different.
+
+@kindex info set
+To display all the settable parameters and their current
+values, you can use @code{show} with no arguments; you may also use
+@code{info set}. Both commands produce the same display.
+@c FIXME: "info set" violates the rule that "info" is for state of
+@c FIXME...program. Ck w/ GNU: "info set" to be called something else,
+@c FIXME...or change desc of rule---eg "state of prog and debugging session"?
+@end table
+@c @end group
+
+Here are three miscellaneous @code{show} subcommands, all of which are
+exceptional in lacking corresponding @code{set} commands:
+
+@table @code
+@kindex show version
+@cindex version number
+@item show version
+Show what version of @BASH is running. You should include this
+information in @BASH bug-reports. If multiple versions of
+@BASH are in use at your site, you may need to determine which
+version of @BASH you are running; as @BASH evolves, new
+commands are introduced, and old ones may wither away. Also, many
+system vendors ship variant versions of @value{BASH}, and there are
+variant versions of @BASH in @sc{gnu}/Linux distributions as well.
+The version number is the same as the one announced when you start
+@value{BASH}.
+
+@kindex show copying
+@item show copying
+Display information about permission for copying @value{BASH}.
+
+@kindex show warranty
+@item show warranty
+Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty,
+if your version of @DBG comes with one.
+
+@end table
+
+@node Stack
+@section Examining the Stack (@samp{where}, @samp{frame}, @samp{up}, @samp{down})
+
+When your script has stopped, one thing you'll probably want to know
+is where it stopped and some idea of how it got there.
+
+@cindex call stack
+Each time your script performs a function call (either as part of a
+command substitution or not), or `source's a file, information about
+this action is saved. The call stack then is this a history of the
+calls that got you to the point that you are currently stopped at.
+
+@cindex selected frame
+One of the stack frames is @dfn{selected} by @DBG and many
+@DBG commands refer implicitly to the selected frame. In
+particular, whenever you ask @DBG to list lines without giving
+a line number or location the value is found in the selected frame.
+There are special @DBG commands to select whichever frame you
+are interested in. @xref{Selection, ,Selecting a frame}.
+
+When your program stops, @BASH automatically selects the
+currently executing frame and describes it briefly, similar to the
+@code{frame} command.
+
+
+@menu
+* Frames:: Stack frames
+* Backtrace:: Backtraces (where)
+* Selection:: Selecting a frame (up, down, frame)
+
+@end menu
+
+@node Frames
+@subsection Stack frames
+
+@cindex frame, definition
+@cindex stack frame
+The call stack is divided up into contiguous pieces called @dfn{stack
+frames}, or @dfn{frames} for short; each frame is the data associated
+with one call to one function. The frame contains the line number of
+the caller of the function, the source-file name that the line refers
+to and function name (which could be the built-in name ``source'')..
+
+@cindex initial frame
+@cindex outermost frame
+@cindex innermost frame
+When your script is started, the stack has only one frame, that of the
+function @code{main}. This is called the @dfn{initial} frame or the
+@dfn{outermost} frame. Each time a function is called, a new frame is
+made. Each time a function returns, the frame for that function invocation
+is eliminated. If a function is recursive, there can be many frames for
+the same function. The frame for the function in which execution is
+actually occurring is called the @dfn{innermost} frame. This is the most
+recently created of all the stack frames that still exist.
+
+@cindex frame number
+@value{DBG} assigns numbers to all existing stack frames, starting with
+zero for the innermost frame, one for the frame that called it,
+and so on upward. These numbers do not really exist in your script;
+they are assigned by @value{DBG} to give you a way of designating stack
+frames in @value{DBG} commands.
+
+@node Backtrace
+@subsection Backtraces (@samp{where})
+
+@cindex backtraces
+@cindex tracebacks
+@cindex stack traces
+A backtrace is essentially the same as the call stack: a summary of
+how your script got where it is. It shows one line per frame, for
+many frames, starting with the place that you sare stopped at (frame
+zero), followed by its caller (frame one), and on up the stack.
+
+@table @code
+@kindex backtrace
+@kindex bt @r{(@code{backtrace})}
+@item backtrace
+@itemx bt
+@itemx where
+@itemx T
+Print a backtrace of the entire stack: one line per frame for all
+frames in the stack.
+
+@item backtrace @var{n}
+@itemx bt @var{n}
+@itemx where @var{n}
+@itemx T @var{n}
+Similar, but print only the innermost @var{n} frames.
+
+@ifset FINISHED
+@item backtrace -@var{n}
+@itemx bt -@var{n}
+@itemx where -@var{n}
+@itemx T -@var{n}
+Similar, but print only the outermost @var{n} frames.
+@end ifset
+@end table
+
+@kindex where
+The names @code{where} and @code{T} are additional aliases for
+@code{backtrace}.
+
+Each line in the backtrace shows the frame number and the function
+name, the source file name and line number, as well as the function name.
+
+Here is an example of a backtrace taken a program in the
+regression-tests @file{parm.sh}.
+
+@smallexample
+@group
+% ../bashdb -n -L .. parm.sh
+Bourne-Again Shell Debugger, release @value{BASHRELEASE}
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+(./parm.sh:21):
+21: fn1 5
+bashdb<0> @b{continue fn3}
+One-time breakpoint 1 set in file ./parm.sh, line 17.
+fn2: testing 1 2 3
+(./parm.sh:17):
+17: fn3() @{
+bashdb<1> @b{where}
+->0 in file `./parm.sh' at line 14
+##1 fn3() called from file `./parm.sh' at line 14
+##2 fn2("testing 1", "2 3") called from file `parm.sh' at line 5
+##3 fn1("0") called from file `parm.sh' at line 9
+##4 fn1("1") called from file `parm.sh' at line 9
+##5 fn1("2") called from file `parm.sh' at line 9
+##6 fn1("3") called from file `parm.sh' at line 9
+##7 fn1("4") called from file `parm.sh' at line 9
+##8 fn1("5") called from file `parm.sh' at line 21
+##9 source("parm.sh") called from file `bashdb' at line 143
+##10 main("-n", "-L", "..", "parm.sh") called from file `bashdb' at line 0
+@end group
+@end smallexample
+
+@noindent
+The display for ``frame'' zero isn't a frame at all, although it has
+the same information minus a function name; it just indicates that
+your script has stopped at the code for line @code{14}
+of @code{./parm.sh}.
+
+@node Selection
+@subsection Selecting a frame (@samp{up}, @samp{down}, @samp{frame})
+
+Commands for listing source code in your script work on whichever
+stack frame is selected at the moment. Here are the commands for
+selecting a stack frame; all of them finish by printing a brief
+description of the stack frame just selected.
+
+@table @code
+@kindex up
+@item up @var{n}
+Move @var{n} frames up the stack. For positive numbers @var{n}, this
+advances toward the outermost frame, to higher frame numbers, to frames
+that have existed longer. @var{n} defaults to one.
+
+@kindex down
+@kindex do @r{(@code{down})}
+@item down @var{n}
+Move @var{n} frames down the stack. For positive numbers @var{n}, this
+advances toward the innermost frame, to lower frame numbers, to frames
+that were created more recently. @var{n} defaults to one. You may
+abbreviate @code{down} as @code{do}.
+@end table
+
+All of these commands end by printing two lines of output describing the
+frame. The first line shows the frame number, the function name, the
+arguments, and the source file and line number of execution in that
+frame. The second line shows the text of that source line.
+
+@need 100
+For example:
+
+@smallexample
+@group
+bashdb<8> @b{up}
+19: sourced_fn
+bashdb<8> @b{T}
+##0 in file `./bashtest-sourced' at line 8
+->1 sourced_fn() called from file `bashtest-sourced' at line 19
+##2 source() called from file `bashdb-test1' at line 23
+##3 fn2() called from file `bashdb-test1' at line 33
+##4 fn1() called from file `bashdb-test1' at line 42
+##5 main() called from file `bashdb-test1' at line 0
+@end group
+@end smallexample
+
+After such a printout, the @code{list} command with no arguments
+prints ten lines centered on the point of execution in the frame.
+@xref{List, ,Printing source lines}.
+
+@table @code
+@kindex frame
+@cindex current stack frame
+@item frame @var{args}
+The @code{frame} command allows you to move from one stack frame to
+another, and to print the stack frame you select. @var{args} is the
+the stack frame number. Without an argument, @code{frame} prints the
+current stack frame.
+@end table
+
+@node List
+@section Examining Source Files (@samp{list})
+
+@value{DBG} can print parts of your script's source. When your
+script stops, @value{DBG} spontaneously prints the line where it
+stopped. Likewise, when you select a stack frame (@pxref{Selection,
+,Selecting a frame}), @value{DBG} prints the line where execution in
+that frame has stopped. You can print other portions of source files
+by explicit command.
+
+If you use @value{DBG} through its @sc{gnu} Emacs interface, you may
+prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
+@value{DBG} under @sc{gnu} Emacs}.
+
+@kindex list
+@kindex l @r{(@code{list})}
+To print lines from a source file, use the @code{list} command
+(abbreviated @code{l}). By default, ten lines are printed.
+There are several ways to specify what part of the file you want to print.
+
+Here are the forms of the @code{list} command most commonly used:
+
+@table @code
+@item list @var{linenum}
+@itemx l @var{linenum}
+Print lines centered around line number @var{linenum} in the
+current source file.
+
+@item list @var{function}
+@itemx l @var{function}
+Print the text of @var{function}.
+
+@item list
+@itemx l
+Print more lines. If the last lines printed were printed with a
+@code{list} command, this prints lines following the last lines
+printed; however, if the last line printed was a solitary line printed
+as part of displaying a stack frame (@pxref{Stack, ,Examining the
+Stack}), this prints lines centered around that line.
+
+@item list -
+@itemx l -
+Print lines just before the lines last printed.
+@end table
+
+By default, @value{DBG} prints ten source lines with any of these forms of
+the @code{list} command.
+You can change this using @code{set listsize}:
+
+@table @code
+@kindex set listsize
+@item set listsize @var{count}
+Make the @code{list} command display @var{count} source lines (unless
+the @code{list} argument explicitly specifies some other number).
+
+@kindex show listsize
+@item show listsize
+Display the number of lines that @code{list} prints.
+@end table
+
+Repeating a @code{list} command with @key{RET} discards the argument,
+so it is equivalent to typing just @code{list}. This is more useful
+than listing the same lines again. An exception is made for an
+argument of @samp{-}; that argument is preserved in repetition so that
+each repetition moves up in the source file.
+
+@cindex linespec
+In general, the @code{list} command expects you to supply a
+@dfn{linespecs}. Linespecs specify source lines; there are several ways
+of writing them, but the effect is always to specify some source line.
+
+Here is a complete description of the possible arguments for @code{list}:
+
+@table @code
+@item list @var{linespec}
+Print lines centered around the line specified by @var{linespec}.
+
+@item list @var{first} @var{increment}
+Print @var{increment} lines starting from @var{first}
+
+@item list @var{first}
+Print lines starting with @var{first}.
+
+@item list -
+Print lines just before the lines last printed.
+
+@item list .
+Print lines after where the script is stopped.
+
+@item list
+As described in the preceding table.
+@end table
+
+Here are the ways of specifying a single source line---all the
+kinds of linespec.
+
+@table @code
+@item @var{number}
+Specifies line @var{number} of the current source file.
+When a @code{list} command has two linespecs, this refers to
+the same source file as the first linespec.
+
+@item @var{filename}:@var{number}
+Specifies line @var{number} in the source file @var{filename}.
+
+@item @var{function}
+Specifies the line that function @var{function} is listed on.
+
+@ifset FINISHED
+@item @var{filename}:@var{function}
+Specifies the line of function @var{function} in the file
+@var{filename}. You only need the file name with a function name to
+avoid ambiguity when there are identically named functions in
+different source files.
+@end ifset
+@end table
+
+@node Search
+@section Searching source files (@samp{search}, @samp{reverse}, @samp{/.../}, @samp{?..?})
+@cindex searching
+@kindex reverse-search
+
+There are two commands for searching through the current source file for a
+BASH extended pattern-matching expression.
+
+@table @code
+@kindex search
+@kindex forward
+@item forward @var{bash-pattern}
+@itemx search @var{bash-pattern}
+The command @samp{forward @var{bash-pattern}} checks each line,
+starting with the one following the current line, for a match for
+@var{bash-pattern} which is an extended bash pattern-matching
+expression. It lists the line that is found. You can use the synonym
+@samp{search @var{bash-pattern}} or abbreviate the command name as
+@code{fo} or @code{/@var{pat}/}.
+
+@item reverse @var{bash-pattern}
+The command @samp{reverse @var{bash-pattern}} checks each line, starting
+with the one before the last line listed and going backward, for a match
+for @var{bash-pattern}. It lists the line that is found. You can abbreviate
+this command as @code{rev} or @code{?@var{bash-pattern}?}.
+@end table
+
+@node Data
+@section Examining Data (@samp{print}, @samp{examine}, @samp{info variables})
+
+@cindex printing data
+@cindex examining data
+@kindex print
+
+One way to examine string data in your script is with the @code{print}
+command (abbreviated @code{p}). However a more versatile print command
+is @code{x}; it can print variable and function definitions and can do
+arithmetic computations. Finally, the most general method would be
+via @code{eval echo}.
+
+@table @code
+@kindex print
+@kindex p @r{(@code{print})}
+@item print @var{expr}
+
+Use @code{print} to dispay strings as you would from @code{echo}. And
+as such, variable names to be substituted have to be preceded with a
+dollar sign. As with echo, filename expansion, e.g. tilde expansion,
+is performed on unquoted strings. So for example if you want to print
+a *, you would write @samp{print "*"}, not @samp{print *}. If you want
+to have the special characters dollars sign appear, use a backslash.
+
+@item print
+@itemx p
+If you omit @var{expr}, @value{DBG} displays the last expression again.
+
+@item x @ovar{expr}
+@kindex x
+
+This is a smarter, more versatile ``print'' command, and although sometimes
+it might not be what you want, and you may want to resort to either
+@code{print} or @code{eval echo...}.
+
+As with @code{print}, if you omit @var{expr}, @value{DBG} displays
+the last expression again.
+
+The @code{x} command first checks if @var{expr} is single variable. If
+it is, the definition and value are printed via @value{BASH}'s
+@code{declare -p} command. This will show the variable's attributes
+such as if it is read only or if it is an integer. If the variable is
+an array, that is show and the array values are printed.
+
+If instead @var{expr} is a function, the function definition is
+printed via @value{BASH}'s @code{declare -f} command. If @var{expr}
+was neither a variable nor an expression, then we try to get a value
+via @code{let}. And if this returns an error, as a last resort we call
+@code{print} and give what it outputs.
+
+Since @code{let} may be used internally and since (to my thinking)
+@code{let} does funny things, the results may seem odd unless you
+understand the sequence tried above and how @code{let} works. For
+example if the variable @code{foo} has value 5, then @samp{x foo} show
+the definition of foo with value 5, and @samp{x foo+5} prints 10 as
+expected. So far so good. However if @code{foo} is has value
+``string'', @samp{x foo+5} prints 5 because @code{let} has turned the
+string into 0; @samp{p foo+5} will simply print ``foo+5''; if you want
+the value of ``foo'' substituted inside a string, for example you
+expect ``the value of foo is $foo'' to come out ``the value of foo is
+5'', then the right command to use is @code{print} rather than
+@code{x}, making sure you add the dollar onto the beginning of the
+variable.
+
+@item V @ovar{!}@ovar{pattern}
+@kindex V
+
+If you want to @emph{all} list variables and there values or a set of
+variables by pattern, use this command.
+
+@smallexample
+@group
+bashdb<0> @b{V dq*}
+dq_args="dq_*"
+dq_cmd="V"
+@end group
+@end smallexample
+
+@end table
+
+@node Evaluation/Execution
+@section Running Arbitrary BASH and Shell commands (@samp{eval}, @samp{shell})
+
+The two most general commands and most ``low-level'' are @code{eval}
+and @code{shell}.
+
+@table @code
+@item eval
+@itemx e
+@kindex e
+
+In contrast to the commands of the last section the most general way
+to examine data is through @code{eval}. But you do much more with
+this; you can change the values of variables, since, you are just
+evaluating BASH code.
+
+If you expect output, you should arrange that in the command, such as
+via @code{echo} or @code{printf}. For example, to print the value of
+@var{foo}, you would type @samp{e echo $foo}. This is bit longer than
+@samp{p $foo} or (when possible) @samp{x foo}. However suppose you
+wanted to find out how the builtin test operator @samp{[} works with
+the @samp{-z} test condition. You could use @code{eval} to do this
+such as @samp{e [ -z "$foo"] && echo "yes"}.
+
+@kindex shell
+@kindex !! @r{(@code{shell})}
+@cindex shell escape
+@item shell @var{command string}
+@itemx !!
+
+If you need to execute occasional shell commands during your
+debugging session, there is no need to leave or suspend @value{DBG}; you can
+just use the @code{shell} command or its alias @code{!!}.
+
+Invoke a shell to execute @var{command string}.
+
+@end table
+
+@node Auto Display
+@section Automatic display (@samp{display}, @samp{undisplay})
+@cindex automatic display
+@cindex display of expressions
+
+If you find that you want to print the value of an expression
+frequently (to see how it changes), you might want to add it to the
+@dfn{automatic display list} so that @value{DBG} evaluates a
+statement each time your program stops. Each expression added to the
+list is given a number to identify it; to remove an expression from
+the list, you specify that number. The automatic display looks like
+this:
+
+@example
+2 (echo $x): 38
+@end example
+
+@noindent
+This display shows item numbers, expressions and their current values.
+
+@table @code
+@kindex display
+@item display @var{expr}
+Add the expression @var{expr} to the list of expressions to display
+each time your program stops.
+@end table
+
+@table @code
+@kindex delete display
+@kindex undisplay
+@item undisplay @var{dnums}@dots{}
+@itemx delete display @var{dnums}@dots{}
+Remove item numbers @var{dnums} from the list of expressions to display.
+
+@code{undisplay} does not repeat if you press @key{RET} after using it.
+(Otherwise you would just get the error @samp{No display number @dots{}}.)
+
+@kindex disable display
+@item disable display @var{dnums}@dots{}
+Disable the display of item numbers @var{dnums}. A disabled display
+item is not printed automatically, but is not forgotten. It may be
+enabled again later.
+
+@kindex enable display
+@item enable display @var{dnums}@dots{}
+Enable display of item numbers @var{dnums}. It becomes effective once
+again in auto display of its expression, until you specify otherwise.
+
+@item display
+Display the current values of the expressions on the list, just as is
+done when your program stops.
+
+@kindex info display
+@item info display
+Print the list of expressions previously set up to display
+automatically, each one with its item number, but without showing the
+values. This includes disabled expressions, which are marked as such.
+It also includes expressions which would not be displayed right now
+because they refer to automatic variables not currently available.
+@end table
+
+@node Controlling bashdb
+@section Controlling @DBG (@samp{set}, @samp{history})
+
+You can alter the way @BASH interacts with you by using the
+@code{set} command.
+
+@menu
+* Annotate:: Annotation Level (set annotate)
+* Prompt:: Prompt (set prompt, show prompt)
+* Editing:: Command editing (set editing, show editing)
+* Command Display:: Command display (set showcommand)
+* History:: Command history (history, !, H)
+@end menu
+
+@node Annotate
+@subsection Annotation Level (@samp{set annoatate})
+
+The annotation level controls how much information does @value{DBG}
+print together with its prompt, values of expressions, source lines,
+and other types of output. Level 0 is the normal, level 1 is for use
+when @value{DBG} is run as a subprocess of @sc{gnu} Emacs of @value{DDD},
+level 2 is the maximum annotation suitable for programs that control
+@value{DBGN}.
+
+@node Prompt
+@subsection Prompt (@samp{set prompt}, @samp{show prompt})
+
+@cindex prompt
+
+@value{dBGP} indicates its readiness to read a command by printing a
+string called the @dfn{prompt}. This string is normally:
+@example
+bashdb$@{_Dbg_less@}$@{#_Dbg_history[@@]@}$@{_Dbg_greater@}$_Dbg_space
+@end example
+
+When variables inside the the prompt string are evaluated, the above
+becomes something like @samp{bashdb<5>} if this is the fifth command
+executed or perhaps @samp{bashdb<<2>>} if you have called the debugger
+from inside a debugger session and this is the second command inside
+the debugger session or perhaps @samp{bashdb<(6)>} if you
+entered a subshell after the fifth command.
+
+You can change the prompt string with the @code{set prompt} command,
+although it is not normally advisable to do so without understanding
+the implications. If you are using the @value{DDD} GUI, it changes the
+changes the prompt and should not do so. In certain other
+circumstances (such as writing a GUI like @value{DDD}), it may be is useful
+to change the prompt.
+
+@emph{Note:} @code{set prompt} does not add a space for you after the
+prompt you set. This allows you to set a prompt which ends in a space
+or a prompt that does not. Furthermore due to a implementation
+limitation (resulting from a limitation of the bash built-in function
+``read''), to put a space at the end of the prompt use the
+@samp{$_Dbg_space} variable.
+
+@table @code
+@kindex set prompt
+@item set prompt @var{newprompt}
+Directs @value{DBG} to use @var{newprompt} as its prompt string
+henceforth.
+
+@emph{Warning: changing the prompt can @value{DDD}'s ability to
+understand when the debugger is waiting for input.}
+
+@kindex show prompt
+@item show prompt
+Prints a line of the form: @samp{bashdb's prompt is: @var{your-prompt}}
+@end table
+
+@node Editing
+@subsection Command editing (@samp{set editing}, @samp{show editing})
+@cindex readline
+@cindex command line editing
+
+@value{DBG} reads its input commands through bash which uses via the
+@dfn{readline} interface. This @sc{gnu} library provides consistent
+behavior for programs which provide a command line interface to the
+user. Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline
+editing of commands, @code{csh}-like history substitution, and a
+storage and recall of command history across debugging sessions.
+
+You may control the behavior of command line editing in @BASH with the
+command @code{set}.
+
+@table @code
+@kindex set editing
+@cindex editing
+@item set editing
+@itemx set editing on
+Enable command line editing (enabled by default).
+
+@item set editing off
+Disable command line editing.
+
+@kindex show editing
+@item show editing
+Show whether command line editing is enabled.
+@end table
+
+
+@node Command Display
+@subsection Command Display (@samp{set showcommand})
+
+The debugger normally lists the line number and source line of the for
+the statement to be next executed. Often this line contains one
+expression or one statement and it is clear from this line what's
+going to happen. However @BASH allows many expressions or
+statements to be put on a single source line; some lines
+contain several units of execution. Some examples of this
+behavior are listed below:
+
+@smallexample
+x=1; y=2; x=3
+(( x > 5 )) && x=5
+y=`echo *`
+@end smallexample
+
+In the first line of the example above, we have three assignment
+statements on a single line. In the second line of the example above
+we have a statement which gets run only if a condition tests true. And
+in the third line of the example above, we have a command that gets
+run and then the output of that is substituted in an assignemnt
+statement. If you were single stepping inside the debugger, each line
+might get listed more than once before each of the actions that might
+get performed. (In the case of the conditional statement, the
+line gets listed only once when the condition is false.)
+
+In order to assist understanding where you are, the enhanced version
+of @BASH maintains a dynamic variable @env{BASH_COMMAND} that
+contains piece of code next to be run (or is currently being run). The
+debugger has arranged to save this and can display this information
+or not. This is controlled by @code{set showcommand}.
+
+@table @code
+@kindex set showcommand
+@item set showcommand @r{[}auto | on | off @r{]}
+controls whether or not to show the saved @env{BASH_COMMAND} for the
+command next to be executed.
+@end table
+
+When the value is @code{auto} the following heuristic is used to
+determine whether or not to display the saved @env{BASH_COMMAND}. If
+the last time you stopped you were at the same place and the command
+string has changed, then show the command. When the value @code{on} is
+used, the debugger always shows @env{BASH_COMMAND} and when
+@code{off} is used, the debugger nevers shows
+@env{BASH_COMMAND}. Note that listing the text of the source line is
+independent of whether or not the command is also listed.
+
+Some examples:
+@smallexample
+set showcommand auto @b{This is the default}
+set showcommand on @b{Always show the next command to be executed}
+set showcommand off @b{Never show the next command to be executed}
+@end smallexample
+
+@node History
+@subsection Command history (@samp{H}, @samp{history}, @samp{!})
+
+@value{dBGP} can keep track of the commands you type during your
+debugging sessions, so that you can be certain of precisely what
+happened. If the prompt has not been changed (see @ref{Prompt,
+,Prompt}), the history number that will be in use next is by default
+listed in the debugger prompt. Invalid commands and history commands
+are not saved on the history stack.
+
+@table @code
+@kindex H @r{[}@var{start-number} @ovar{end-number}@r{]}
+@item H @r{[}@var{start-number} @ovar{end-number}@r{]}
+@item H @ovar{-count}
+@itemx !@r{[}-@r{]}@var{n}:p
+
+You can list what is in the history stack with @code{H}. Debugger
+commands in ths history stack are listed from most recent to least recent.
+If no @var{start-number} is given we start with the most recently
+executed command and end with the first entry in the history stack.
+If @var{start-number} is given, that history number is listed first. If
+@var{end-number} is given, that history number is listed last. If a
+single negative number is given list that many history commands.
+
+An alternate form is @code{!@emph{n}:p} or @code{!-@emph{n}:p} where
+@emph{n} is an integer. If a minus sign is used, @emph{n} is taken as
+the count to go back from the end rather than as a absolute history
+number. In contrast @code{H}, this form only prints a @emph{single}
+history item.
+
+Some examples:
+@smallexample
+H @b{List entire history}
+H -2 @b{List the last two history items}
+!-2:p @b{List a single history item starting at the same place as above}
+H 5 @b{List history from history number 5 to the begining (number 0)}
+H 5 0 @b{Same as above}
+H 5 3 @b{List history from history number 5 down to history number 3}
+!5:p @b{List a single history item 5}
+@end smallexample
+
+@kindex history @r{[}-@r{]}@r{[}@var{n}@r{]}
+@kindex !@r{[}-@r{]}@var{n} @r{(@code{history})}
+@item history @r{[}@r{[}-@r{]}@var{n}@r{]}
+@itemx !@r{[}-@r{]}@var{n}
+
+Use this command to reexecute a given history number. If no number is
+given, the last debugger command in the history is executed.
+
+An alternate form is @code{!@emph{n}} or @code{!-@emph{n}} where
+@emph{n} is an integer.
+
+If a minus sign is used in in either form, @emph{n} is taken as the
+count to go back from the end rather than as a absolute history
+number.
+
+@end table
+
+@ifset FINISHED
+Use these commands to manage the @value{DBGN} command
+history facility.
+
+@table @code
+@cindex history substitution
+@cindex history file
+@kindex set history filename
+@kindex GDBHISTFILE
+@item set history filename @var{fname}
+Set the name of the @BASH command history file to @var{fname}.
+This is the file where @BASH reads an initial command history
+list, and where it writes the command history from this session when it
+exits. You can access this list through history expansion or through
+the history command editing characters listed below. This file defaults
+to the value of the environment variable @code{GDBHISTFILE}, or to
+@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
+is not set.
+
+@cindex history save
+@kindex set history save
+@item set history save
+@itemx set history save on
+Record command history in a file, whose name may be specified with the
+@code{set history filename} command. By default, this option is disabled.
+
+@item set history save off
+Stop recording command history in a file.
+
+@cindex history size
+@kindex set history size
+@item set history size @var{size}
+Set the number of commands which @BASH keeps in its history list.
+This defaults to the value of the environment variable
+@code{HISTSIZE}, or to 256 if this variable is not set.
+@end table
+
+@cindex history expansion
+History expansion assigns special meaning to the character @kbd{!}.
+
+Since @kbd{!} is also the logical not operator in C, history expansion
+is off by default. If you decide to enable history expansion with the
+@code{set history expansion on} command, you may sometimes need to
+follow @kbd{!} (when it is used as logical not, in an expression) with
+a space or a tab to prevent it from being expanded. The readline
+history facilities do not attempt substitution on the strings
+@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
+
+The commands to control history expansion are:
+
+@table @code
+@kindex set history expansion
+@item set history expansion on
+@itemx set history expansion
+Enable history expansion. History expansion is off by default.
+
+@item set history expansion off
+Disable history expansion.
+
+The readline code comes with more complete documentation of
+editing and history expansion features. Users unfamiliar with @sc{gnu} Emacs
+or @code{vi} may wish to read it.
+
+@c @group
+@kindex show history
+@item show history
+@itemx show history filename
+@itemx show history save
+@itemx show history size
+@itemx show history expansion
+These commands display the state of the @BASH history parameters.
+@code{show history} by itself displays all four states.
+@c @end group
+@end table
+
+@table @code
+@kindex shows
+@item show commands
+Display the last ten commands in the command history.
+
+@item show commands @var{n}
+Print ten commands centered on command number @var{n}.
+
+@item show commands +
+Print ten commands just after the commands last printed.
+@end table
+@end ifset
+
+@node Front Ends
+@chapter Using @value{DBG} from a front-end user interface
+
+There are two front-ends available that can use @value{DBG} as a back-end
+debugger are @sc{gnu} Emacs and @value{DDD}.
+
+@menu
+* Emacs:: Using @value{DBG} from @sc{gnu} Emacs
+* DDD:: Using @value{DBG} from @value{DDD}
+@end menu
+
+
+@node Emacs
+@section Using @value{DBG} from @sc{gnu} Emacs
+
+@cindex Emacs
+@cindex @sc{gnu} Emacs
+A special interface allows you to use @sc{gnu} Emacs to view (and
+edit) the source files for the program you are debugging with
+@value{DBG}.
+
+To use this interface, use the command @kbd{M-x bashdb} in Emacs.
+Give the executable file you want to debug as an argument. This
+command starts @value{DBG} as a subprocess of Emacs, with input and
+output through a newly created Emacs buffer.
+
+Using @value{DBG} under Emacs is just like using @value{DBG}
+normally except for two things:
+
+@itemize @bullet
+@item
+All ``terminal'' input and output goes through the Emacs buffer.
+@end itemize
+
+This applies both to @value{DBG} commands and their output, and to the input
+and output done by the program you are debugging.
+
+This is useful because it means that you can copy the text of previous
+commands and input them again; you can even use parts of the output
+in this way.
+
+All the facilities of Emacs' Shell mode are available for interacting
+with your script. In particular, you can send signals the usual
+way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
+stop.
+
+@itemize @bullet
+@item
+@value{DBG} displays source code through Emacs.
+@end itemize
+
+Each time @value{DBG} displays a stack frame, Emacs automatically finds the
+source file for that frame and puts an arrow (@samp{=>}) at the
+left margin of the current line. Emacs uses a separate buffer for
+source display, and splits the screen to show both your @value{DBG} session
+and the source.
+
+Explicit @value{DBG} @code{list} or search commands still produce output as
+usual, but you probably have no reason to use them from Emacs.
+
+@quotation
+@emph{Warning:} If the directory where your script resides is not your
+current directory, it can be easy to confuse Emacs about the location of
+the source files, in which case the auxiliary display buffer does not
+appear to show your source. @value{DBG} can find programs by searching your
+environment's @code{PATH} variable, so the @value{DBG} input and output
+session proceeds normally; but Emacs does not get enough information
+back from @value{DBG} to locate the source files in this situation. To
+avoid this problem, either start @value{DBG} mode from the directory where
+your script resides, or specify an absolute file name when prompted for the
+@kbd{M-x gdb} argument.
+
+A similar confusion can result if you use the @value{DBG} @code{file} command to
+switch to debugging a program in some other location, from an existing
+@value{DBG} buffer in Emacs.
+@end quotation
+
+By default, @kbd{M-x bashdb} calls the @code{bash --debugger}. If you
+need to call @value{DBG} by a different name (for example, if you
+keep several configurations around, with different names) you can set
+the Emacs variable @code{gud-bashdb-command-name}; for example,
+
+@example
+(setq gud-bashdb-command-name "bash-debugger")
+@end example
+
+@noindent
+(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
+in your @file{.emacs} file) makes Emacs call the program named
+``@code{bash-debugger}'' instead.
+
+In the @value{DBG} I/O buffer, you can use these special Emacs commands in
+addition to the standard Shell mode commands:
+
+@table @kbd
+@item C-h m
+Describe the features of Emacs' @value{DBG} Mode.
+
+@item M-s
+Execute to another source line, like the @value{DBG} @code{step} command; also
+update the display window to show the current file and location.
+
+@item M-n
+Execute to next source line in this function, skipping all function
+calls, like the @value{DBG} @code{next} command. Then update the display window
+to show the current file and location.
+
+@item C-c C-f
+Execute until exit from the selected stack frame, like the @value{DBG}
+@code{finish} command.
+
+@item M-c
+Continue execution of your script, like the @value{DBG} @code{continue}
+command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
+
+@item M-u
+Go up the number of frames indicated by the numeric argument
+(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
+like the @value{DBG} @code{up} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
+
+@item M-d
+Go down the number of frames indicated by the numeric argument, like the
+@value{DBG} @code{down} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
+
+@item C-x &
+Read the number where the cursor is positioned, and insert it at the end
+of the @value{DBG} I/O buffer. For example, if you wish to disassemble code
+around an address that was displayed earlier, type @kbd{disassemble};
+then move the cursor to the address display, and pick up the
+argument for @code{disassemble} by typing @kbd{C-x &}.
+
+You can customize this further by defining elements of the list
+@code{gdb-print-command}; once it is defined, you can format or
+otherwise process numbers picked up by @kbd{C-x &} before they are
+inserted. A numeric argument to @kbd{C-x &} indicates that you
+wish special formatting, and also acts as an index to pick an element of the
+list. If the list element is a string, the number to be inserted is
+formatted using the Emacs function @code{format}; otherwise the number
+is passed as an argument to the corresponding list element.
+@end table
+
+In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
+tells @value{DBG} to set a breakpoint on the source line point is on.
+
+If you accidentally delete the source-display buffer, an easy way to get
+it back is to type the command @code{frame} in the @value{DBG} buffer, to
+request a frame display; when you run under Emacs, this recreates
+the source buffer if necessary to show you the context of the current
+frame.
+
+The source files displayed in Emacs are in ordinary Emacs buffers
+which are visiting the source files in the usual way. You can edit
+the files with these buffers if you wish; but keep in mind that @value{DBG}
+communicates with Emacs in terms of line numbers. If you add or
+delete lines from the text, the line numbers that @value{DBG} knows cease
+to correspond properly with the code.
+
+@node DDD
+@section Using @value{DBG} from @value{DDD}
+@cindex DDD
+
+@value{DBG} support is rather new in @value{DDD}. As a programming
+language, @value{DBG} is not feature rich: there are no record
+structures or hash tables (yet), no pointers, package variable scoping
+or methods. So much of the data display and visualization features of
+@value{DDD} are disabled.
+
+As with any scripting or interpreted language (e.g. Perl), one can't
+step by a single machine-language instruction. So the ddd Stepi/Nexti
+commands are disabled.
+
+Some @value{BASH} settings are essential for @value{DDD} to work
+correctly. These settings with their correct values are:
+
+@example
+set annotate 1
+set prompt set prompt bashdb$_Dbg_less$_Dbg_greater$_Dbg_space
+@end example
+
+@value{DDD} sets these values automatically when invoking
+@value{BASH}; if these values are changed, there may be some
+malfunctions.
+
+Pay special attention when the prompt has extra angle brackets (a
+nested shell) or has any parenthesis (is in a subshell). Quitting may
+merely exit out of one of these nested (sub)shells rather than leave
+the program.
+
+@node BASH Debugger Bugs
+@chapter Reporting Bugs
+@cindex bugs
+@cindex reporting bugs
+
+Your bug reports play an essential role in making the BASH debugger reliable.
+
+Reporting a bug may help you by bringing a solution to your problem, or it
+may not. But in any case the principal function of a bug report is to help
+the entire community by making the next version of @value{DBG} work better. Bug
+reports are your contribution to the maintenance of @value{DBG}.
+
+In order for a bug report to serve its purpose, you must include the
+information that enables us to fix the bug.
+
+@menu
+* Bug Criteria:: Have you found a bug?
+* Bug Reporting:: How to report bugs
+@end menu
+
+@node Bug Criteria
+@section Have you found a bug?
+@cindex bug criteria
+
+If you are not sure whether you have found a bug, here are some guidelines:
+
+@itemize @bullet
+@cindex fatal signal
+@cindex debugger crash
+@cindex crash of debugger
+@item
+If the debugger gets a fatal signal, for any input whatever, that is a
+@value{DBG} bug. Reliable debuggers never crash.
+
+@cindex error on valid input
+@item
+If @value{DBG} produces an error message for valid input, that is a
+bug. (Note that if you're cross debugging, the problem may also be
+somewhere in the connection to the target.)
+
+@cindex invalid input
+@item
+If @value{DBG} does not produce an error message for invalid input,
+that is a bug. However, you should note that your idea of
+``invalid input'' might be our idea of ``an extension'' or ``support
+for traditional practice''.
+
+@item
+If you are an experienced user of debugging tools, your suggestions
+for improvement of @value{DBG} are welcome in any case.
+@end itemize
+
+@node Bug Reporting
+@section How to report bugs
+@cindex bug reports
+@cindex BASH debugger bugs, reporting
+
+Submit bug reports for @value{DBG}. Until better mechanism is set up
+the prefered method is to submit them directly using
+@email{mailto:rocky@@panix.com}. There are also a bug tracking system
+and, help, developer and open discussion forums which can be found via
+@uref{http://http://sourceforge.net/forum/?group_id=37260}.
+
+Although this code shares a lot with BASH, the debugger is of course
+not yet supported by the BASH team, so if there is a debugger problem
+reporting it via bashbug or to @email{bug-bash@@gnu.org} or posted to
+the newsgroup @code{gnu.bash.bug} probably won't help, unless you are
+sure the bug resides in the vanilla bash code and and show that.
+
+The fundamental principle of reporting bugs usefully is this:
+@strong{report all the facts}. If you are not sure whether to state a
+fact or leave it out, state it!
+
+Often people omit facts because they think they know what causes the
+problem and assume that some details do not matter. Thus, you might
+assume that the name of the variable you use in an example does not matter.
+Well, probably it does not, but one cannot be sure. Perhaps the bug is a
+stray memory reference which happens to fetch from the location where that
+name is stored in memory; perhaps, if the name were different, the contents
+of that location would fool the debugger into doing the right thing despite
+the bug. Play it safe and give a specific, complete example. That is the
+easiest thing for you to do, and the most helpful.
+
+Keep in mind that the purpose of a bug report is to enable us to fix the
+bug. It may be that the bug has been reported previously, but neither
+you nor we can know that unless your bug report is complete and
+self-contained.
+
+Sometimes people give a few sketchy facts and ask, ``Does this ring a
+bell?'' Those bug reports are useless, and we urge everyone to
+@emph{refuse to respond to them} except to chide the sender to report
+bugs properly.
+
+To enable us to fix the bug, you should include all these things:
+
+@itemize @bullet
+@item
+The version of @value{DBG}. @value{DBG} announces it if you start
+with no arguments; you can also print it at any time using @code{version}
+command.
+
+Without this, we will not know whether there is any point in looking for
+the bug in the current version of @value{DBG}.
+
+@item
+The type of machine you are using, and the operating system name and
+version number.
+
+@item
+What compiler (and its version) was used to compile BASH---e.g.
+``@value{GCC}--3.1''.
+
+@item
+The command arguments you gave the compiler to compile your example and
+observe the bug. For example, did you use @samp{-O}? To guarantee
+you will not omit something important, list them all. A copy of the
+Makefile (or the output from make) is sufficient.
+
+If we were to try to guess the arguments, we would probably guess wrong
+and then we might not encounter the bug.
+
+@item
+A complete input script, and all necessary source files, that will
+reproduce the bug.
+
+@item
+A description of what behavior you observe that you believe is
+incorrect. For example, ``It gets a fatal signal.''
+
+Of course, if the bug is that @value{DBG} gets a fatal signal, then we
+will certainly notice it. But if the bug is incorrect output, we might
+not notice unless it is glaringly wrong. You might as well not give us
+a chance to make a mistake.
+
+Even if the problem you experience is a fatal signal, you should still
+say so explicitly. Suppose something strange is going on, such as, your
+copy of @value{DBG} is out of synch, or you have encountered a bug in
+the C library on your system. (This has happened!) Your copy might
+crash and ours would not. If you told us to expect a crash, then when
+ours fails to crash, we would know that the bug was not happening for
+us. If you had not told us to expect a crash, then we would not be able
+to draw any conclusion from our observations.
+
+@item
+If you wish to suggest changes to the @value{DBG} source, send us context
+diffs. If you even discuss something in the @value{DBG} source, refer to
+it by context, not by line number.
+
+The line numbers in our development sources will not match those in your
+sources. Your line numbers would convey no useful information to us.
+
+@end itemize
+
+Here are some things that are not necessary:
+
+@itemize @bullet
+@item
+A description of the envelope of the bug.
+
+Often people who encounter a bug spend a lot of time investigating
+which changes to the input file will make the bug go away and which
+changes will not affect it.
+
+This is often time consuming and not very useful, because the way we
+will find the bug is by running a single example under the debugger
+with breakpoints, not by pure deduction from a series of examples.
+We recommend that you save your time for something else.
+
+Of course, if you can find a simpler example to report @emph{instead}
+of the original one, that is a convenience for us. Errors in the
+output will be easier to spot, running under the debugger will take
+less time, and so on.
+
+However, simplification is not vital; if you do not want to do this,
+report the bug anyway and send us the entire test case you used.
+
+@item
+A patch for the bug.
+
+A patch for the bug does help us if it is a good one. But do not omit
+the necessary information, such as the test case, on the assumption that
+a patch is all we need. We might see problems with your patch and decide
+to fix the problem another way, or we might not understand it at all.
+
+Sometimes with a program as complicated as @value{DBG} it is very hard to
+construct an example that will make the program follow a certain path
+through the code. If you do not send us the example, we will not be able
+to construct one, so we will not be able to verify that the bug is fixed.
+
+And if we cannot understand what bug you are trying to fix, or why your
+patch should be an improvement, we will not install it. A test case will
+help us to understand.
+
+@item
+A guess about what the bug is or what it depends on.
+
+Such guesses are usually wrong. Even we cannot guess right about such
+things without first using the debugger to find the facts.
+@end itemize
+
+@node History and Acknowledgments
+@chapter History and Acknowledgments
+
+The suggestion for a debugger for a Bourne-like shell came from the book
+``Learning the Korn Shell'', by Bill Rosenblatt Copyright (C) 1993 by
+O'Reilly and Associates, Inc. Others such as Cigy Cyriac, Chet Ramey,
+Rocky Bernstein, and Gary V. Vaughan expanded and improved on that.
+
+However Bourne-Shell debuggers rely on a signal mechanism
+(@code{SIGDEBUG}) to call a debugger routine. In the Korn shell as
+well as @sc{bash} in versions prior to 2.05, there was a fundamental
+flaw: the routine that you registered in the trap, got called
+@emph{after} the statement was executed. It takes little imagination
+to realize that this is a bit too late to find and correct errors,
+especially if the offending command happens to do serious damage like
+remove filesystems or reboot a server. As a horrible hack, these
+debuggers added one to the line number that was just executed on the
+wishful thinking that this would then be the line of next statement to
+execute. Sometimes this was correct, but it was too often wrong, such
+as in loops and conditionals, comments, or commands that are continued
+on the next line.
+
+Another failing of these debuggers was the inability to debug into
+functions or into sourced files, provide a stack trace, dynamically
+skip a statement to be run, unconditionally trace into a function, or
+stop when a subroutine or a sourced file completed. In truth, the crux
+of the problem lay in debugging support in BASH. Given that there was
+limited bash debugging support, it is not surprising that these
+debuggers could not do any of the things listed above and could debug
+only a single source file: lines could be listed only from a single
+text, breakpoints were set into the text which was in fact a copy of
+the script name prepended with debugger routines.
+
+In version 2.04 of BASH, Rocky Bernstein started hacking on BASH to
+add call-stack information, source file information, allow for
+debugging into functions and for reporting line numbers in functions
+as relative to the file rather than the beginning of a function whose
+origin line number was not accessible from BASH. He started changing
+the user commands in bashdb to be like other more-advanced debuggers,
+in particular @code{perl5db} and @code{gdb}. However he gave up on
+this project when realizing that stopping before a line was crucial. A
+patch for this was nontrivial and wildly changed
+semantics. Furthermore the chance of getting his other patches into
+BASH was was not going to happen in version 2.04.
+
+In version 2.05, the fundamental necessary change to the semantics of
+@code{SIGDEBUG} trap handling (suggested at least two years earlier)
+was made. Also, version 2.05 changed the line-number reporting in a
+function to be relative to the beginning of the file rather than the
+beginning of a function---sometimes. Rocky then picked up where he
+left off and this then became this debugger. A complete rewrite of the
+debugger, some of which started in 2.04 was undertaken. Debugger
+internals were changed to support multiple file names, save and
+restore the calling environment (such as variables @code{$1} and
+@code{$?}) and install debugger signal handlers. Work was also done on
+the BASH in conjunction with the debugger to save stack trace
+information, provide a means for stopping after a routine finished and
+so on. And a number of changes were made to BASH just to improve the
+accuracy of the line number reporting which is crucial in a debugger.
+
+This documentation was modified from the GNU Debugger (GDB) Reference
+manual.
+
+@quotation
+Additions to this section are particularly welcome. If you or your
+friends (or enemies, to be evenhanded) have been unfairly omitted from
+this list, we would like to add your names!
+@end quotation
+
+The following have contributed directly or indrectly to bashdb:
+
+Rocky Bernstein (initial full-featured bashdb with stack tracing and
+multi-file support)
+
+Masatake YAMATO (help to merge Rocky's hack to the official bash source tree)
+
+Bill Rosenblatt (kshdb),
+Michael Loukides (kshdb),
+Cigy Cyriac (proto bashdb),
+Chet Ramey (proto bashdb),
+and
+Gary V. Vaughan (proto bashdb).
+
+Authors of per5ldb:
+
+Ray Lischner,
+Johan Vromans,
+and
+Ilya Zakharevich.
+
+Authors of GDB:
+
+Richard Stallman,
+Andrew Cagney,
+Jim Blandy,
+Jason Molenda,
+Stan Shebs,
+Fred Fish,
+Stu Grossman,
+John Gilmore,
+Jim Kingdon,
+and
+Randy Smith (to name just a few).
+
+Authors of GUD:
+
+Eric S. Raymond.
+
+@c The readline documentation is distributed with the readline code
+@c and consists of the two following files:
+@c rluser.texinfo
+@c inc-hist.texinfo
+@c Use -I with makeinfo to point to the appropriate directory,
+@c environment var TEXINPUTS with TeX.
+@c @include rluser.texinfo
+@c @include hsuser.texinfo
+
+
+@node Formatting Documentation
+@appendix Formatting Documentation
+
+@ifset FINISHED
+@cindex @value{DBG} reference card
+@cindex reference card
+The @value{DBG} 4 release includes an already-formatted reference card, ready
+for printing with PostScript or Ghostscript, in the @file{gdb}
+subdirectory of the main source directory@footnote{In
+@file{gdb-@value{BASHRELEASE}/gdb/refcard.ps} of the version @value{BASHRELEASE}
+release.}. If you can use PostScript or Ghostscript with your printer,
+you can print the reference card immediately with @file{refcard.ps}.
+
+The release also includes the source for the reference card. You
+can format it, using @TeX{}, by typing:
+
+@example
+make refcard.dvi
+@end example
+
+The @value{DBG} reference card is designed to print in @dfn{landscape}
+mode on US ``letter'' size paper;
+that is, on a sheet 11 inches wide by 8.5 inches
+high. You will need to specify this form of printing as an option to
+your @sc{dvi} output program.
+
+@cindex documentation
+
+All the documentation for @value{DBG} comes as part of the machine-readable
+distribution. The documentation is written in Texinfo format, which is
+a documentation system that uses a single source file to produce both
+on-line information and a printed manual. You can use one of the Info
+formatting commands to create the on-line version of the documentation
+and @TeX{} (or @code{texi2roff}) to typeset the printed version.
+
+@value{DBG} includes an already formatted copy of the on-line Info
+version of this manual in the @file{gdb} subdirectory. The main Info
+file is @file{gdb-@value{BASHRELEASE}/gdb/gdb.info}, and it refers to
+subordinate files matching @samp{gdb.info*} in the same directory. If
+necessary, you can print out these files, or read them with any editor;
+but they are easier to read using the @code{info} subsystem in @sc{gnu}
+Emacs or the standalone @code{info} program, available as part of the
+@sc{gnu} Texinfo distribution.
+
+If you want to format these Info files yourself, you need one of the
+Info formatting programs, such as @code{texinfo-format-buffer} or
+@code{makeinfo}.
+
+If you have @code{makeinfo} installed, and are in the top level
+@value{DBG} source directory (@file{gdb-@value{BASHRELEASE}}, in the case of
+version @value{BASHRELEASE}), you can make the Info file by typing:
+
+@example
+cd gdb
+make gdb.info
+@end example
+
+If you want to typeset and print copies of this manual, you need @TeX{},
+a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
+Texinfo definitions file.
+
+@TeX{} is a typesetting program; it does not print files directly, but
+produces output files called @sc{dvi} files. To print a typeset
+document, you need a program to print @sc{dvi} files. If your system
+has @TeX{} installed, chances are it has such a program. The precise
+command to use depends on your system; @kbd{lpr -d} is common; another
+(for PostScript devices) is @kbd{dvips}. The @sc{dvi} print command may
+require a file name without any extension or a @samp{.dvi} extension.
+
+@TeX{} also requires a macro definitions file called
+@file{texinfo.tex}. This file tells @TeX{} how to typeset a document
+written in Texinfo format. On its own, @TeX{} cannot either read or
+typeset a Texinfo file. @file{texinfo.tex} is distributed with GDB
+and is located in the @file{gdb-@var{version-number}/texinfo}
+directory.
+
+If you have @TeX{} and a @sc{dvi} printer program installed, you can
+typeset and print this manual. First switch to the the @file{gdb}
+subdirectory of the main source directory (for example, to
+@file{gdb-@value{BASHRELEASE}/gdb}) and type:
+
+@example
+make gdb.dvi
+@end example
+
+Then give @file{gdb.dvi} to your @sc{dvi} printing program.
+@end ifset
+
+@node Installing bashdb
+@appendix Installing @value{DBG}
+@cindex configuring @value{DBG}
+@cindex installation
+
+@ifset FINISHED
+@value{DBG} comes with a @code{configure} script that automates the process
+of preparing @value{DBG} for installation; you can then use @code{make} to
+build the @code{gdb} program.
+@iftex
+@c irrelevant in info file; it's as current as the code it lives with.
+@footnote{If you have a more recent version of @value{DBG} than @value{BASHRELEASE},
+look at the @file{README} file in the sources; we may have improved the
+installation procedures since publishing this manual.}
+@end iftex
+
+The @value{DBG} distribution includes all the source code you need for
+@value{DBG} in a single directory, whose name is usually composed by
+appending the version number to @samp{gdb}.
+
+For example, the @value{DBG} version @value{BASHRELEASE} distribution is in the
+@file{gdb-@value{BASHRELEASE}} directory. That directory contains:
+
+@table @code
+@item gdb-@value{BASHRELEASE}/configure @r{(and supporting files)}
+script for configuring @value{DBG} and all its supporting libraries
+
+@item gdb-@value{BASHRELEASE}/gdb
+the source specific to @value{DBG} itself
+
+@item gdb-@value{BASHRELEASE}/bfd
+source for the Binary File Descriptor library
+
+@item gdb-@value{BASHRELEASE}/include
+@sc{gnu} include files
+
+@item gdb-@value{BASHRELEASE}/libiberty
+source for the @samp{-liberty} free software library
+
+@item gdb-@value{BASHRELEASE}/opcodes
+source for the library of opcode tables and disassemblers
+
+@item gdb-@value{BASHRELEASE}/readline
+source for the @sc{gnu} command-line interface
+
+@item gdb-@value{BASHRELEASE}/glob
+source for the @sc{gnu} filename pattern-matching subroutine
+
+@item gdb-@value{BASHRELEASE}/mmalloc
+source for the @sc{gnu} memory-mapped malloc package
+@end table
+
+The simplest way to configure and build @value{DBG} is to run @code{configure}
+from the @file{gdb-@var{version-number}} source directory, which in
+this example is the @file{gdb-@value{BASHRELEASE}} directory.
+
+First switch to the @file{gdb-@var{version-number}} source directory
+if you are not already in it; then run @code{configure}. Pass the
+identifier for the platform on which @value{DBG} will run as an
+argument.
+
+For example:
+
+@example
+cd gdb-@value{BASHRELEASE}
+./configure @var{host}
+make
+@end example
+
+@noindent
+where @var{host} is an identifier such as @samp{sun4} or
+@samp{decstation}, that identifies the platform where @value{DBG} will run.
+(You can often leave off @var{host}; @code{configure} tries to guess the
+correct value by examining your system.)
+
+Running @samp{configure @var{host}} and then running @code{make} builds the
+@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
+libraries, then @code{gdb} itself. The configured source files, and the
+binaries, are left in the corresponding source directories.
+
+@need 750
+@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
+system does not recognize this automatically when you run a different
+shell, you may need to run @code{sh} on it explicitly:
+
+@example
+sh configure @var{host}
+@end example
+
+If you run @code{configure} from a directory that contains source
+directories for multiple libraries or programs, such as the
+@file{gdb-@value{BASHRELEASE}} source directory for version @value{BASHRELEASE}, @code{configure}
+creates configuration files for every directory level underneath (unless
+you tell it not to, with the @samp{--norecursion} option).
+
+You can run the @code{configure} script from any of the
+subordinate directories in the @value{DBG} distribution if you only want to
+configure that subdirectory, but be sure to specify a path to it.
+
+For example, with version @value{BASHRELEASE}, type the following to configure only
+the @code{bfd} subdirectory:
+
+@example
+@group
+cd gdb-@value{BASHRELEASE}/bfd
+../configure @var{host}
+@end group
+@end example
+
+You can install @code{@value{DBG}} anywhere; it has no hardwired paths.
+However, you should make sure that the shell on your path (named by
+the @samp{SHELL} environment variable) is publicly readable. Remember
+that @value{DBG} uses the shell to start your script---some systems refuse to
+let @value{DBG} debug child processes whose programs are not readable.
+
+@menu
+* Separate Objdir:: Compiling @value{DBG} in another directory
+* Config Names:: Specifying names for hosts and targets
+* Configure Options:: Summary of options for configure
+@end menu
+
+@node Separate Objdir
+@section Compiling @value{DBG} in another directory
+
+If you want to run @value{DBG} versions for several host or target machines,
+you need a different @code{gdb} compiled for each combination of
+host and target. @code{configure} is designed to make this easy by
+allowing you to generate each configuration in a separate subdirectory,
+rather than in the source directory. If your @code{make} program
+handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
+@code{make} in each of these directories builds the @code{gdb}
+program specified there.
+
+To build @code{gdb} in a separate directory, run @code{configure}
+with the @samp{--srcdir} option to specify where to find the source.
+(You also need to specify a path to find @code{configure}
+itself from your working directory. If the path to @code{configure}
+would be the same as the argument to @samp{--srcdir}, you can leave out
+the @samp{--srcdir} option; it is assumed.)
+
+For example, with version @value{BASHRELEASE}, you can build @value{DBG} in a
+separate directory for a Sun 4 like this:
+
+@example
+@group
+cd gdb-@value{BASHRELEASE}
+mkdir ../gdb-sun4
+cd ../gdb-sun4
+../gdb-@value{BASHRELEASE}/configure sun4
+make
+@end group
+@end example
+
+When @code{configure} builds a configuration using a remote source
+directory, it creates a tree for the binaries with the same structure
+(and using the same names) as the tree under the source directory. In
+the example, you'd find the Sun 4 library @file{libiberty.a} in the
+directory @file{gdb-sun4/libiberty}, and @value{DBG} itself in
+@file{gdb-sun4/gdb}.
+
+One popular reason to build several @value{DBG} configurations in separate
+directories is to configure @value{DBG} for cross-compiling (where
+@value{DBG} runs on one machine---the @dfn{host}---while debugging
+programs that run on another machine---the @dfn{target}).
+You specify a cross-debugging target by
+giving the @samp{--target=@var{target}} option to @code{configure}.
+
+When you run @code{make} to build a program or library, you must run
+it in a configured directory---whatever directory you were in when you
+called @code{configure} (or one of its subdirectories).
+
+The @code{Makefile} that @code{configure} generates in each source
+directory also runs recursively. If you type @code{make} in a source
+directory such as @file{gdb-@value{BASHRELEASE}} (or in a separate configured
+directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{BASHRELEASE}}), you
+will build all the required libraries, and then build GDB.
+
+When you have multiple hosts or targets configured in separate
+directories, you can run @code{make} on them in parallel (for example,
+if they are NFS-mounted on each of the hosts); they will not interfere
+with each other.
+
+@node Config Names
+@section Specifying names for hosts and targets
+
+The specifications used for hosts and targets in the @code{configure}
+script are based on a three-part naming scheme, but some short predefined
+aliases are also supported. The full naming scheme encodes three pieces
+of information in the following pattern:
+
+@example
+@var{architecture}-@var{vendor}-@var{os}
+@end example
+
+For example, you can use the alias @code{sun4} as a @var{host} argument,
+or as the value for @var{target} in a @code{--target=@var{target}}
+option. The equivalent full name is @samp{sparc-sun-sunos4}.
+
+The @code{configure} script accompanying @value{DBG} does not provide
+any query facility to list all supported host and target names or
+aliases. @code{configure} calls the Bourne shell script
+@code{config.sub} to map abbreviations to full names; you can read the
+script, if you wish, or you can use it to test your guesses on
+abbreviations---for example:
+
+@smallexample
+% sh config.sub i386-linux
+i386-pc-linux-gnu
+% sh config.sub alpha-linux
+alpha-unknown-linux-gnu
+% sh config.sub hp9k700
+hppa1.1-hp-hpux
+% sh config.sub sun4
+sparc-sun-sunos4.1.1
+% sh config.sub sun3
+m68k-sun-sunos4.1.1
+% sh config.sub i986v
+Invalid configuration `i986v': machine `i986v' not recognized
+@end smallexample
+
+@noindent
+@code{config.sub} is also distributed in the @value{DBG} source
+directory (@file{gdb-@value{BASHRELEASE}}, for version @value{BASHRELEASE}).
+
+@node Configure Options
+@section @code{configure} options
+
+Here is a summary of the @code{configure} options and arguments that
+are most often useful for building @value{DBG}. @code{configure} also has
+several other options not listed here. @inforef{What Configure
+Does,,configure.info}, for a full explanation of @code{configure}.
+
+@example
+configure @r{[}--help@r{]}
+ @r{[}--prefix=@var{dir}@r{]}
+ @r{[}--exec-prefix=@var{dir}@r{]}
+ @r{[}--srcdir=@var{dirname}@r{]}
+ @r{[}--norecursion@r{]} @r{[}--rm@r{]}
+ @r{[}--target=@var{target}@r{]}
+ @var{host}
+@end example
+
+@noindent
+You may introduce options with a single @samp{-} rather than
+@samp{--} if you prefer; but you may abbreviate option names if you use
+@samp{--}.
+
+@table @code
+@item --help
+Display a quick summary of how to invoke @code{configure}.
+
+@item --prefix=@var{dir}
+Configure the source to install programs and files under directory
+@file{@var{dir}}.
+
+@item --exec-prefix=@var{dir}
+Configure the source to install programs under directory
+@file{@var{dir}}.
+
+@c avoid splitting the warning from the explanation:
+@need 2000
+@item --srcdir=@var{dirname}
+@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
+@code{make} that implements the @code{VPATH} feature.}@*
+Use this option to make configurations in directories separate from the
+@value{DBG} source directories. Among other things, you can use this to
+build (or maintain) several configurations simultaneously, in separate
+directories. @code{configure} writes configuration specific files in
+the current directory, but arranges for them to use the source in the
+directory @var{dirname}. @code{configure} creates directories under
+the working directory in parallel to the source directories below
+@var{dirname}.
+
+@item --norecursion
+Configure only the directory level where @code{configure} is executed; do not
+propagate configuration to subdirectories.
+
+@item --target=@var{target}
+Configure @value{DBG} for cross-debugging programs running on the specified
+@var{target}. Without this option, @value{DBG} is configured to debug
+programs that run on the same machine (@var{host}) as @value{DBG} itself.
+
+There is no convenient way to generate a list of all available targets.
+
+@item @var{host} @dots{}
+Configure @value{DBG} to run on the specified @var{host}.
+
+There is no convenient way to generate a list of all available hosts.
+@end table
+
+There are many other options available as well, but they are generally
+needed for special purposes only.
+@end ifset
+
+@include gpl.texi
+
+@include fdl.texi
+
+@node Function Index
+@unnumbered Function Index
+@printindex fn
+
+@node Command Index
+@unnumbered Command Index
+@printindex ky
+
+@node Variable Index
+@unnumbered Variable Index
+@printindex vr
+
+@node General Index
+@unnumbered General Index
+@printindex cp
+
+@tex
+% I think something like @colophon should be in texinfo. In the
+% meantime:
+\long\def\colophon{\hbox to0pt{}\vfill
+\centerline{The body of this manual is set in}
+\centerline{\fontname\tenrm,}
+\centerline{with headings in {\bf\fontname\tenbf}}
+\centerline{and examples in {\tt\fontname\tentt}.}
+\centerline{{\it\fontname\tenit\/},}
+\centerline{{\bf\fontname\tenbf}, and}
+\centerline{{\sl\fontname\tensl\/}}
+\centerline{are used for emphasis.}\vfill}
+\page\colophon
+% Blame: doc@cygnus.com, 1991.
+@end tex
+
+@bye
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/bashdb.texi~ cvs/debugger/doc/bashdb.texi~
--- bash-2.05b/debugger/doc/bashdb.texi~ 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/bashdb.texi~ 2003-08-30 07:31:23.000000000 +0200
@@ -0,0 +1,3752 @@
+\input texinfo @c -*-texinfo-*-
+@c Copyright 2002, 2003
+@c Rocky Bernstein for the Free Software Foundation
+@c
+@c TODO:
+@c - add examples for commands
+@c - clean up/improve sample session
+@c - help text is inaccurate and formatted too much to right.
+@c
+
+@c Sets version and release names and dates. Frees us from changing
+@c this file when a new release comes along.
+
+@c %**start of header
+@c makeinfo ignores cmds prev to setfilename, so its arg cannot make use
+@c of @set vars. However, you can override filename with makeinfo -o.
+@setfilename bashdb.info
+@c
+@c Name of Bash program. Used in running text.
+@set BASH @acronym{BASH}
+
+@c
+@c Name of debugger program. Used also for prompt string.
+@set DBG the @value{BASH} debugger
+@set dBGP The @value{BASH} debugger
+@set DDD @acronym{DDD}
+
+@settitle @value{BASH} Debugger
+@setchapternewpage odd
+@setcontentsaftertitlepage
+
+@c %**end of header
+
+@include version.texi
+
+@c A simple macro for optional variables.
+@macro ovar{varname}
+@r{[}@var{\varname\}@r{]}
+@end macro
+
+@macro DDD {}
+@acronym{DDD}
+@end macro
+
+@macro BASH {}
+@acronym{@value{BASH}}
+@end macro
+
+@macro DBG {}
+@value{DBG}
+@end macro
+
+@iftex
+@c @smallbook
+@c @cropmarks
+@end iftex
+
+@finalout
+
+@c readline appendices use @vindex, @findex and @ftable,
+@c annotate.texi and gdbmi use @findex.
+@c @syncodeindex vr cp
+@c @syncodeindex fn cp
+
+@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
+
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* @value{DBG}: (@value{DBG}). The @sc{bash} debugger.
+@end direntry
+
+@ifinfo
+This file documents the @sc{bash} debugger @value{BASH}.
+
+
+This is the @value{EDITION} Edition, @value{UPDATED-MONTH},
+of @cite{Debugging with BASHDB: the @sc{gnu} Source-Level Debugger}
+for REBASH
+
+Copyright (C) 2002,2003 Rocky Bernstein for the Free Software Foundation.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+@ifset DEBIANHASBECOMEREASONABLE
+@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on
+@c Sat, 23 Aug 2003 14:24:44 +0200
+@c
+@c I personally see the invariant sections as the thing in the
+@c GFDL, which hinders me in uploading the package to the archives.
+@c I don't have any problem, if some other Debian developer makes a
+@c bashdb package built from separate sources.
+@c
+@c I am aware that Debian ships other packages containing documentation
+@c covered by the GFDL (and one of them for which I do the packaging as
+@c well), but I won't add a new package, which I maintain. So before an
+@c upload of a bashdb package built from the bash sources either
+@c
+@c
+@c - Debian has a position on the GFDL, which allows inclusion
+@c
+@c - the bashdb manual does not have invariant sections, or is
+@c relicensed, or dual licensed.
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Free Software'' and ``Free Software Needs
+Free Documentation'', with the Front-Cover Texts being ``A GNU
+Manual,'' and with the Back-Cover Texts as in (a) below.
+
+(a) The Free Software Foundation's Back-Cover Text is: ``You have
+freedom to copy and modify this GNU Manual, like GNU software. Copies
+published by the Free Software Foundation raise funds for GNU
+development.''
+@else
+any later version published by the Free Software Foundation.
+@end ifset
+@end ifinfo
+
+@titlepage
+@title Debugging with BASHDB
+@sp 1
+@subtitle @value{EDITION} Edition, for BASH
+@subtitle @value{UPDATED-MONTH}
+@author Rocky Bernstein
+@page
+@tex
+{\parskip=0pt
+\hfill (Send bugs and comments on bashdb to bug-bashdb\@sourceforge.net.)\par
+\hfill {\it Debugging with BASH}\par
+\hfill \TeX{}info \texinfoversion\par
+}
+@end tex
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2002,2003 Rocky Bernstein for the Free Software
+Foundation.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+@ifset DEBIANHASBECOMEREASONABLE
+@c From Matthias Klose <doko@cs.tu-berlin.de> a Debian maintainer on
+@c Sat, 23 Aug 2003 14:24:44 +0200
+@c
+@c I personally see the invariant sections as the thing in the
+@c GFDL, which hinders me in uploading the package to the archives.
+@c I don't have any problem, if some other Debian developer makes a
+@c bashdb package built from separate sources.
+@c
+@c I am aware that Debian ships other packages containing documentation
+@c covered by the GFDL (and one of them for which I do the packaging as
+@c well), but I won't add a new package, which I maintain. So before an
+@c upload of a bashdb package built from the bash sources either
+@c
+@c
+@c - Debian has a position on the GFDL, which allows inclusion
+@c
+@c - the bashdb manual does not have invariant sections, or is
+@c relicensed, or dual licensed.
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``Free Software'' and ``Free Software Needs
+Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below.
+
+(a) The Free Software Foundation's Back-Cover Text is: ``You have
+freedom to copy and modify this GNU Manual, like GNU software. Copies
+published by the Free Software Foundation raise funds for GNU
+development.''
+else
+any later version published by the Free Software Foundation.
+@end ifset
+@end titlepage
+@page
+
+@ifnottex
+@node Top, Summary, (dir), (dir)
+
+@top Debugging with @DBG
+
+This file describes @value{DBG}, the @sc{bash} symbolic debugger.
+
+This is the @value{EDITION} Edition, @value{UPDATED-MONTH}, for REBASH.
+
+Copyright (C) 2002,2003 Rocky Bernstein
+
+@menu
+* Summary:: Overview of Debugger with a sample session
+
+* Invocation:: Getting in and out
+* Running:: Script setup inside the BASH debugger
+* Debugger Command Reference:: BASH debugger command reference
+
+* Front Ends:: Using @DBG from a front-end user interface
+
+* BASH Debugger Bugs:: Reporting bugs
+* History and Acknowledgments:: History and Acknowledgments
+
+Appendices
+* Formatting Documentation:: How to format and print @DBG documentation
+
+* Installing bashdb:: Installing bashdb
+* Copying:: GNU General Public License says
+ how you can copy and share bashdb
+* GNU Free Documentation License:: The license for this documentation
+
+Indexes (nodes containing large menus)
+* Function Index:: An item for each function name.
+* Command Index:: An item for each command name.
+* Variable Index:: An item for each documented variable.
+* General Index:: An item for each concept.
+@end menu
+
+@end ifnottex
+
+@contents
+
+@node Summary
+@chapter Summary of the BASH Debugger
+
+The purpose of a debugger such as @DBG is to allow you to see what is
+going on ``inside'' a bash script while it executes.
+
+@DBG can do four main kinds of things (plus other things in support of
+these) to help you catch bugs in the act:
+
+@itemize @bullet
+@item
+Start your script, specifying anything that might affect its behavior.
+
+@item
+Make your script stop on specified conditions.
+
+@item
+Examine what has happened, when your script has stopped.
+
+@item
+Change things in your script, so you can experiment with correcting the
+effects of one bug and go on to learn about another.
+@end itemize
+
+Although you can use the BASH debugger to debug scripts written in
+BASH, it can also be used just as a front-end for learning more
+about programming in BASH. As an additional aid, the debugger can
+be used within the context of an existing script with its functions
+and variables that have already been initialized; fragments of the
+existing can be experimented with by entering them inside the debugger.
+
+@menu
+* Sample Session:: A Sample BASH Debugger session
+* Free Software:: Freely redistributable software
+@end menu
+
+@node Sample Session
+@section A Sample BASH Debugger Session
+
+You can use this manual at your leisure to read all about @value{DBG}.
+However, a handful of commands are enough to get started using the
+debugger. This chapter illustrates those commands.
+
+@iftex
+In this sample session, we emphasize user input like this: @b{input},
+to make it easier to pick out from the surrounding output.
+@end iftex
+
+Below we will debug a script that contains a function to compute the
+factorial of a number: fact(0) is 1 and fact(n) is n*fact(n-1).
+
+@smallexample
+$ @b{bashdb -L . fact.sh}
+Bourne-Again Shell Debugger, release bash-@value{BASHRELEASE}
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+(fact.sh:9):
+9: echo fact 0 is: `fact 0`
+bashdb<0> @b{-}
+ 1: #!/usr/local/bin/bash
+ 2: fact() @{
+ 3: ((n==0)) && echo 1 && return
+ 4: ((nm1=n-1))
+ 5: ((result=n*`fact $nm1`))
+ 6: return $result
+ 7: @}
+ 8:
+ 9:==> echo fact 0 is: `fact 0`
+bashdb<1> @b{l}
+ 10: echo fact 3 is: $(fact 3)
+@end smallexample
+
+@noindent
+
+The command invocation uses the option ``-L .'' Here we assume that
+the @command{bashdb} script and the debugger files are in the same
+location. If you are running from the source code, this will be the
+case. However if bashdb has been installed this probably won't be true
+and here you probably don't need to use ``-L .'' Instead you would
+type simply @code{bashdb fact.sh}.
+
+The first debugger command we gave @kbd{-}, we listed a window of
+lines @emph{before} where we were executing. Because the window, 10
+lines, is larger than the number of lines to the top of the file we
+printed only 9 lines here. The next command list starting from the
+current line and again wants to print 10 lines but because there are
+only one remaining line, that is what is printed.
+
+@smallexample
+bashdb<2> @b{step}
+(fact.sh:9):
+9: echo fact 0 is: `fact 0`
+bashdb<3> @b{@key{RET}}
+2: fact() @{
+bashdb<4> @b{@key{RET}}
+3: ((n==0)) && echo 1 && return
+bashdb<5> @b{print $n}
+
+@end smallexample
+
+Ooops... The variable @kbd{n} isn't initialized.
+
+The first @kbd{step} command steps the script one instruction. It may
+seem odd that the line printed is exactly the same one as before. What
+has happened though is that we've ``stepped'' into the subshell needed
+to run @kbd{`fact 0`}; we haven't however started running anything
+inside that subshell yet though---the function call.
+
+The first @kbd{step} command steps the script one instruction; it
+didn't advance the line number at all. That is because we were
+stopping before the command substitution or backtick is to take
+place. The second command we entered was just hitting the return key;
+bashdb remembers that you entered @code{step} previously, so it runs
+the step rather than @kbd{next}, the other alternative when you hit
+@key{RET}. Step one more instruction and we are just before running
+the first statement of the function.
+
+Next, we print the value of the variable @kbd{n}. Notice we need to add
+a preceding dollar simple to get the substitution or value of n. As we
+will see later, if the @kbd{pe} command were used this would not be
+necessary.
+
+We now modify the file to add an assignment to local variable @kbd{n} and
+restart.
+
+@smallexample
+bashdb<6> @b{restart}
+Restarting with: /usr/local/bin/bashdb -L . fact.sh
+(fact.sh:10):
+10: echo fact 0 is: `fact 0`
+bashdb<0> @b{list 1}
+ 1: #!/usr/local/bin/bash
+ 2: fact() @{
+ 3: local -i n=$@{1:0@}
+ 4: ((n==0)) && echo 1 && return
+ 5: ((nm1=n-1))
+ 6: ((result=n*`fact $nm1`))
+ 7: return $result
+ 8: @}
+ 9:
+ 10:==> echo fact 0 is: `fact 0`
+bashdb<1> @b{s 3}
+(fact.sh:3):
+3: local -i n=$@{1:0@}
+bashdb<2> @b{step}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+bashdb<3> @b{print $n}
+print $n
+0
+@end smallexample
+
+@noindent
+This time we use the @code{list} debugger command to list the lines in
+the file. From before we know it takes three @code{steps} commands
+before we get into the fact() function, so we add a count onto the
+@code{step} command. Notice we abbreviate @code{step} with @code{s};
+we could have done likewise and abbreviated @code{list} with @code{l}.
+
+@smallexample
+bashdb<4> @b{@key{RET}}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+echo 1
+bashdb<5> @b{@key{RET}}
+(fact.sh:4):
+4: ((n==0)) && echo 1 && return
+return
+@end smallexample
+
+@noindent
+Again we just use @key{RET} to repeat the last @code{step}
+commands. And again the fact that we are staying on the same line 4
+means that the next condition in the line is about to be
+executed. Notice that we see the command (@code{echo 1} or
+@code{return}) listed when we stay on the same line which has multiple
+stopping points in it. Given the information above, we know that the
+value echo'ed on return will be 1.
+
+@smallexample
+bashdb<6> @b{@key{RET}}
+fact 0 is: 1
+(fact.sh:12):
+12: echo fact 3 is: $(fact 3)
+bashdb<7> @b{break 5}
+Breakpoint 1 set in file fact.sh, line 5.
+bashdb<8> @b{continue}
+@end smallexample
+
+@noindent
+We saw that we could step with a count into the function
+fact(). However above took another approach: we set a stopping point or
+``breakpoint'' at line 5 to get us a little ways into the fact()
+subroutine. Just before line 5 is to executed, we will get back into
+the debugger. The @code{continue} command just resumes execution until
+the next stopping point which has been set up in some way.
+
+@smallexample
+(fact.sh:5):
+5: ((nm1=n-1))
+Breakpoint 1 hit(1 times).
+bashdb<8> @b{x n-1}
+2
+bashdb<9> @b{s}
+(fact.sh:5):
+6: ((result=n*`fact $nm1`))
+bashdb<10> @b{c}
+fact.sh: line 6: ((: result=n*: syntax error: operand expected (error token is "*")
+bashdb<7> @b{R}
+Restarting with: bash --debugger fact.sh
+11: echo fact 0 is: `fact 0`
+bashdb<0> @b{l fact}
+ 2: fact ()
+ 3: @{
+ 4: local -i n=$@{1:0@};
+ 5: (( "n==0" )) && echo 1 && return;
+ 6: (( nm1=n-1 ));
+ 7: ((fact_nm1=`fact $nm1`))
+ 8: (( "result=n*fact_nm1" ));
+ 9: echo $result
+10: @}
+@end smallexample
+
+@noindent
+In addition to listing by line numbers, we can also list giving a
+function name. Below, instead of setting a breakpoint at line 5 and
+running ``continue'' as we did above, we try something slightly shorter
+and slightly different. We give the line number on the ``continue''
+statement. This is a little different in that a one-time break is made
+on line 5. Once that statement is reached the breakpoint is removed.
+
+@smallexample
+bashdb<1> @b{continue 5}
+One-time breakpoint 1 set in file fact.sh, line 5.
+fact 0 is: 1
+(fact.sh:5):
+5: ((nm1=n-1))
+bashdb<2> @b{s}
+6: ((fact_nm1=`fact $nm1`))
+bashdb<2> @b{s}
+2: fact() @{
+bashdb<3> @b{T}
+->0 in file `fact.sh' at line 2
+##1 fact("3") called from file `fact.sh' at line 12
+##2 source("fact.sh") called from file `/usr/local/bin/bashdb' at line 154
+##3 main("fact.sh") called from file `/usr/local/bin/bashdb' at line 0
+bashdb<4> @b{c}
+fact 3 is: 6
+Debugged program terminated normally. Use q to quit or R to restart.
+@end smallexample
+
+@noindent
+When we stop at line 5 above, we have already run fact(0) and output
+the correct results. The output from the program ``fact 0 is: 1'' is
+intermixed with the debugger output. The @code{T} command above
+requests call stack output and this confirms that we are not in the
+fact(0) call but in the fact(3) call. There are 4 lines listed in the
+stack trace even though there is just one call from the main
+program. The top line of the trace doesn't really represent a call,
+it's just where we currently are in the program. That last line is an
+artifact of invoking bash from the bashdb script rather than running
+@code{bash --debugger}.
+
+The last message in the output above @samp{Debugged program exited
+normally.} is from @value{DBG}; it indicates script has finished
+executing. We can end our @value{DDGP} session with the @value{GDBP}
+@code{quit} command.
+
+Above we did our debugging session on the command line. If you are a
+GNU Emacs user, you can do your debugging inside that. Also there is
+a(nother) GUI interface called DDD that supports @value{DBG}.
+
+@node Free Software
+@unnumberedsec Free software
+
+@DBG is @dfn{free software}, protected by the @sc{gnu}
+General Public License
+(GPL). The GPL gives you the freedom to copy or adapt a licensed
+program---but every person getting a copy also gets with it the
+freedom to modify that copy (which means that they must get access to
+the source code), and the freedom to distribute further copies.
+Typical software companies use copyrights to limit your freedoms; the
+Free Software Foundation uses the GPL to preserve these freedoms.
+
+Fundamentally, the General Public License is a license which says that
+you have these freedoms and that you cannot take these freedoms away
+from anyone else.
+
+@unnumberedsec Free Software Needs Free Documentation
+
+The biggest deficiency in the free software community today is not in
+the software---it is the lack of good free documentation that we can
+include with the free software. Many of our most important
+programs do not come with free reference manuals and free introductory
+texts. Documentation is an essential part of any software package;
+when an important free software package does not come with a free
+manual and a free tutorial, that is a major gap. We have many such
+gaps today.
+
+Consider Perl, for instance. The tutorial manuals that people
+normally use are non-free. How did this come about? Because the
+authors of those manuals published them with restrictive terms---no
+copying, no modification, source files not available---which exclude
+them from the free software world.
+
+That wasn't the first time this sort of thing happened, and it was far
+from the last. Many times we have heard a GNU user eagerly describe a
+manual that he is writing, his intended contribution to the community,
+only to learn that he had ruined everything by signing a publication
+contract to make it non-free.
+
+Free documentation, like free software, is a matter of freedom, not
+price. The problem with the non-free manual is not that publishers
+charge a price for printed copies---that in itself is fine. (The Free
+Software Foundation sells printed copies of manuals, too.) The
+problem is the restrictions on the use of the manual. Free manuals
+are available in source code form, and give you permission to copy and
+modify. Non-free manuals do not allow this.
+
+The criteria of freedom for a free manual are roughly the same as for
+free software. Redistribution (including the normal kinds of
+commercial redistribution) must be permitted, so that the manual can
+accompany every copy of the program, both on-line and on paper.
+
+Permission for modification of the technical content is crucial too.
+When people modify the software, adding or changing features, if they
+are conscientious they will change the manual too---so they can
+provide accurate and clear documentation for the modified program. A
+manual that leaves you no choice but to write a new manual to document
+a changed version of the program is not really available to our
+community.
+
+Some kinds of limits on the way modification is handled are
+acceptable. For example, requirements to preserve the original
+author's copyright notice, the distribution terms, or the list of
+authors, are ok. It is also no problem to require modified versions
+to include notice that they were modified. Even entire sections that
+may not be deleted or changed are acceptable, as long as they deal
+with nontechnical topics (like this one). These kinds of restrictions
+are acceptable because they don't obstruct the community's normal use
+of the manual.
+
+However, it must be possible to modify all the @emph{technical}
+content of the manual, and then distribute the result in all the usual
+media, through all the usual channels. Otherwise, the restrictions
+obstruct the use of the manual, it is not free, and we need another
+manual to replace it.
+
+Please spread the word about this issue. Our community continues to
+lose manuals to proprietary publishing. If we spread the word that
+free software needs free reference manuals and free tutorials, perhaps
+the next person who wants to contribute by writing documentation will
+realize, before it is too late, that only free manuals contribute to
+the free software community.
+
+If you are writing documentation, please insist on publishing it under
+the GNU Free Documentation License or another free documentation
+license. Remember that this decision requires your approval---you
+don't have to let the publisher decide. Some commercial publishers
+will use a free license if you insist, but they will not propose the
+option; it is up to you to raise the issue and say firmly that this is
+what you want. If the publisher you are dealing with refuses, please
+try other publishers. If you're not sure whether a proposed license
+is free, write to @email{licensing@@gnu.org}.
+
+You can encourage commercial publishers to sell more free, copylefted
+manuals and tutorials by buying them, and particularly by buying
+copies from the publishers that paid for their writing or for major
+improvements. Meanwhile, try to avoid buying non-free documentation
+at all. Check the distribution terms of a manual before you buy it,
+and insist that whoever seeks your business must respect your freedom.
+Check the history of the book, and try to reward the publishers that
+have paid or pay the authors to work on it.
+
+The Free Software Foundation maintains a list of free documentation
+published by other publishers, at
+@url{http://www.fsf.org/doc/other-free-books.html}.
+
+@node Invocation
+@chapter Getting in and out
+
+This chapter discusses how to start @value{DBG}, and how to get out of it.
+The essentials are:
+@itemize @bullet
+@item
+type @samp{bash --debugger @emph{script-name}} or @samp{bashdb
+@emph{script-name}} to start @value{DBG}.
+@item
+type @kbd{quit} or @kbd{C-d} inside the debugger to exit.
+@end itemize
+
+But also note there are two front-ends available as well. One can also
+enter the debugger inside emacs via the command @code{M-x bashdb}
+after loading Emacs' Grand Unified Debugger, @code{gud}. See
+@ref{Emacs,,Using the BASH debugger from @sc{gnu} Emacs}. And there is
+support in a @value{DDD} for bash.
+
+@menu
+* Starting the BASH debugger:: How to enter the BASH debugger
+* Quitting the BASH debugger:: How to leave the BASH debugger
+@end menu
+
+@node Starting the BASH debugger
+@section Starting the BASH debugger
+
+@emph{Note: it is important to use a debugger-enabled bash. You wil
+get an error message if the debugger is run under a version of BASH
+that does not have debugging support.}
+
+As mentioned above, one can enter @DBG via Emacs or
+DDD. However you don't have to use either of these. And these still
+need a way on their own to get things started.
+
+There are in fact two @emph{other} ways to start @value{DBG}. The
+first way is to pass the @samp{--debugger} option to bash with the
+name of your script the scripts arguments following that, or with a
+command string (@code{-c}).
+
+@example
+bash --debugger @var{script} @var{script-arguments...}
+bash --debugger -c @var{command-string}...
+@end example
+
+This calls a debugger initialization script. It works much like a
+@BASH login profile which may set variables and define
+functions. But this shell profile is customized for debugging and as
+such arranges for itself to get called before each statement is
+executed. Although there are some problems at present in I/O
+redirection that the method described next doesn't have, it is
+expected that over time more features will be enabled in bash when the
+@samp{--debugger} option is in effect. By default, both debugging in
+Emacs via GUD (@ref{Emacs,,Using the BASH debugger under Emacs}) and
+debugging via @value{DDD} work via this method.
+
+The form @samp{bash --debugger -c ...} can be used to get into the
+debugger without having to give a script name to debug. Sometimes you
+may want to do this just to see how the debugger works: try some
+debugger commands or maybe get online help. If you run @code{ddd
+--bash} without giving a script name, it in fact uses this form.
+
+In order for the @samp{--debugger} option to work however, you must
+have the debugger scripts installed in a place where @DBG can
+find them. For this reason, in developing @value{DBG}, I use a second
+method more often; it doesn't require the bash debugger to be
+installed. This method uses another script called @code{bashdb} which
+after taking its own options takes the name of the script to debugged
+and the arguments to pass to that script. Using this method, one
+would start the debugger like this:
+
+@example
+bash @var{path-to-bashdb}/bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
+@end example
+
+As with the first method, @code{bash} should be a debugger-enabled
+bash. If @code{bashdb} has the path to bash in it at the top (e.g. via
+@code{#!}), and @code{bashdb} can be found in your program-search
+path, then this might be equivalent to the above:
+
+@example
+bashdb @var{bashdb-options} @var{script} @var{script-arguments...}
+@end example
+
+There are two or three disadvantages however of running a debugger
+this way. First @code{$0} will have the value @code{bashdb} rather
+than the script you are trying to run. For some scripts this may
+change the behavior of the debugged script. Second a traceback will
+contain additional lines showing the ``source''-ing of the debugged
+script from @code{bashdb}. And third, although this way works better
+than the first method, over time this way may come into disuse.
+
+An option that you'll probably need to use if bashdb isn't installed
+but run out of the source code directory is @samp{-L} which specifies
+the directory that contains the debugger script files.
+
+You can further control how bashdb starts up by using command-line
+options. bashdb itself can remind you of the options available.
+
+@noindent
+Type
+
+@example
+bashdb -h
+@end example
+
+@noindent
+to display all available options and briefly describe their use.
+
+When the bash debugger is invoked either by the @code{bashdb}
+front-end script or @code{bash --debugging}, the first argument that
+does not have an associated option flag for @code{bashdb} or
+@code{bash} (as the case may be) is used as the name a the script file
+to be debugged, and any following options get passed the debugged
+script.
+
+Options for the @code{bashdb} front-end are shown in the
+following list.
+
+@menu
+* Options for the bashdb script:: Options you can pass in starting bashdb
+@end menu
+
+@node Options for the bashdb script
+@subsection Command-line options for @code{bashdb} script
+
+You can run @DBG in various alternative modes---for example, in
+batch mode or quiet mode.
+
+@table @code
+@item -h
+@cindex @code{-h}
+This option causes @value{DBG} to print some basic help and exit.
+
+@item -V
+@cindex @code{-V}
+This option causes @DBG to print its version number and
+no-warranty blurb, and exit.
+
+@item -n
+@cindex @code{-n}
+Do not execute commands found in any initialization files. Normally,
+@BASH executes the commands in these files after all the command
+options and arguments have been processed. @xref{Command Files,,Command
+files}.
+
+@item -q
+@cindex @code{-q}
+``Quiet''. Do not print the introductory and copyright messages. These
+messages are also suppressed in batch mode.
+
+@item -t
+@cindex @code{-t}
+``Terminal output''. Set the file or terminal that you want debugger command
+output to go to. Note that the debugger output is independent of the
+debugged script output.
+
+@item -L @var{directory}
+@cindex @code{-L}
+Set directory where debugger files reside to @var{directory}. The
+default location is @code{../lib/bashdb} relative to the place that
+the bashdb script is located. For example if bashdb is located in
+@code{/usr/local/bin/bashdb}, the default library location will be
+@code{/usr/local/lib/bashdb} which may or may not exist. If it doesn't
+you'll get an error when you run bashdb. Only if the default location
+is incorrect, should you need to use the @code{-L} option.
+
+@item -T @var{directory}
+@cindex @code{-T}
+Set directory to use for writing temporary files.
+
+@end table
+
+@node Quitting the BASH debugger
+@section Quitting the BASH debugger
+
+@cindex interrupt
+An interrupt (often @kbd{C-c}) does not exit from @value{DBG}, but
+rather terminates the action of any @DBG command that is in
+progress and returns to @value{DBG} command level. Inside a debugger
+command interpreter, use @code{quit} command (@pxref{Quit, ,Quitting
+the BASH debugger}).
+
+@node Running
+@chapter Script Setup inside the BASH Debugger
+
+@menu
+* Starting:: Starting your script
+* Command Files:: Command files
+* Arguments:: Your script's arguments
+* Input/Output:: Your script's input and output
+* Script/Debugger Interaction:: Keeping out of each other's harm
+@end menu
+
+@need 2000
+@node Starting
+@section Starting your script
+@cindex starting
+@cindex running
+
+@table @code
+@kindex restart
+@kindex run @r{(@code{restart})}
+@kindex R @r{(@code{restart})}
+@item restart @ovar{options to debugged script}
+@itemx run
+@itemx R
+Use the @code{restart} command to restart your script under
+@value{DBG}. Without any arguments, the script name and parameters
+from the last invocation are used. @value{dBGP} tries to maintain the
+settings, watchpoints, breakpoints, actions and so on. Internally it
+uses line numbers and filenames to record he position of interesting
+places in your porgram; so if your program changes some or all of
+these numbers may be off. Environment variable
+@code{BASHDB_RESTART_FILE} is and a temporary file are used to signal
+a restart, so you shouldn't uset @code{BASHDB_RESTART_FILE} (or any
+environment variable starting with @code{BASHDB_}.
+
+@end table
+
+@node Command Files
+@section Command files
+
+@cindex command files
+A command file for @DBG is a file of lines that are @DBG
+commands. Comments (lines starting with @kbd{#}) may also be included.
+An empty line in a command file does nothing; it does not mean to repeat
+the last command, as it would from the terminal.
+
+@cindex init file
+@cindex @file{.bashdbinit}
+@cindex @file{bashdb.ini}
+When you start @value{DBG}, it automatically executes commands from its
+@dfn{init files}, normally called @file{.bashdbinit}@footnote{The DJGPP
+port of @DBG uses the name @file{bashdb.ini} instead, due to the
+limitations of file names imposed by DOS filesystems.}.
+During startup, @DBG does the following:
+
+@enumerate
+@item
+Reads the init file (if any) in your home directory@footnote{On
+DOS/Windows systems, the home directory is the one pointed to by the
+@code{HOME} environment variable.}.
+
+@item
+Processes command line options and operands.
+
+@item
+Reads the init file (if any) in the current working directory.
+
+@item
+Reads command files specified by the @samp{-x} option.
+@end enumerate
+
+The init file in your home directory can set options (such as @samp{set
+complaints}) that affect subsequent processing of command line options
+and operands. Init files are not executed if you use the @samp{-x}
+option (@pxref{Options for the bashdb script, ,bashdb script options}).
+
+@cindex init file name
+On some configurations of @value{DBG}, the init file is known by a
+different name (these are typically environments where a specialized
+form of @DBG may need to coexist with other forms, hence a
+different name for the specialized version's init file). These are the
+environments with special init file names:
+
+You can also request the execution of a command file with the
+@code{source} command:
+
+@table @code
+@kindex source
+@item source @var{filename}
+Execute the command file @var{filename}.
+@end table
+
+The lines in a command file are executed sequentially. They are not
+printed as they are executed. If there is an error, execution
+proceeds to the next command in the file.
+
+@node Arguments
+@section Your script's arguments
+
+@cindex arguments (to your script)
+The arguments to your script can be specified by the arguments of the
+@code{restart} command.
+They are passed to a shell, which expands wildcard characters and
+performs redirection of I/O, and thence to your script.
+
+@code{restart} with no arguments uses the same arguments used by the previous
+@code{restart}, or those set by the @code{set args} command..
+
+@table @code
+@kindex set args
+@item set args
+Specify the arguments to be used the next time your program is run. If
+@code{set args} has no arguments, @code{restart} executes your program
+with no arguments. Once you have run your program with arguments,
+using @code{set args} before the next @code{restart} is the only way to run
+it again without arguments.
+
+@kindex show args
+@item show args
+Show the arguments to give your program when it is started.
+@end table
+
+@node Input/Output
+@section Your script's input and output
+
+@cindex redirection
+@cindex I/O
+@cindex terminal
+By default, the script you run under the BASH debugger does input and
+output to the same terminal that BASH uses. Before running the script
+to be debugged, the debugger records the tty that was in effect. All
+of its output is then written to that. However you can change this
+when using the @samp{bashdb} script using the @samp{-t} option.
+
+
+@table @code
+@kindex info terminal
+@item info terminal
+Displays information recorded by @DBG about the terminal modes your
+program is using.
+@end table
+
+@kindex tty
+@cindex controlling terminal
+Another way to specify where your script should do input and output is
+with the @code{tty} command. This command accepts a file name as
+argument, and causes this file to be the default for future @code{restart}
+commands. It also resets the controlling terminal for the child
+process, for future @code{restart} commands. For example,
+
+@example
+tty /dev/ttyb
+@end example
+
+@noindent
+directs that processes started with subsequent @code{restart} commands
+default to do input and output on the terminal @file{/dev/ttyb} and have
+that as their controlling terminal.
+
+An explicit redirection in @code{restart} overrides the @code{tty} command's
+effect on the input/output device, but not its effect on the controlling
+terminal.
+
+When you use the @code{tty} command or redirect input in the @code{restart}
+command, only the input @emph{for your script} is affected. The input
+for @DBG still comes from your terminal.
+
+@node Script/Debugger Interaction
+@section Script/Debugger Interaction
+
+@value{dBGP} and your program live in the same variable space so
+to speak. @BASH does not have a notion of module scoping or lexical
+hiding (yet) and this then imposes some additional care and awareness.
+
+Most of the variables and functions used inside @DBG start
+@code{_Dbg_}, so please don't use variables or functions with these
+names in your program.
+
+@emph{Note: there are some other variables that begin with just an
+underscore (@code{_}); over time these will be phased out. But until
+then, avoid those or consult what is used by the debugger. Run
+@samp{bashdb --debugger -c 'declare -p'} to list all the variables in
+use including those used by the debugger.}
+
+A number of @DBG environment variables are also reserved for
+use; these start with @code{BASHDB_}. For example:
+@env{BASHDB_INPUT}, @env{BASHDB_LEVEL} and,
+@env{BASHDB_QUIT_ON_QUIT} (@pxref{Debug, ,Debug}),
+@env{BASHDB_RESTART_FILE} (@pxref{Starting, ,Starting}), to name a
+few. Finally, there are some @BASH environment dynamic
+variables and these start with @env{BASH_}. For example
+@env{BASH_SUBSHELL} (@pxref{Debug, ,Debug}), @env{BASH_COMMAND}
+(@pxref{Command Display, ,Command Display}), @env{BASH_LINENO}, and
+@env{BASH_SOURCE} to name a few.
+
+In order to do its work @value{dBGP} sets up a @code{DEBUG}
+trap. Consequently a script shouldn't reset this or the debugger will
+lose control. @value{dBGP} also sets up an @code{EXIT} handler so that
+it can gain control after the script finishes. Another signal
+intercepted is the an interrupt or @code{INT} signal. For more
+information about signal handling, @pxref{Signals, ,Signals}
+
+@node Debugger Command Reference
+@chapter BASH Debugger Command Reference
+
+You can abbreviate the long name of @DBG command to the first
+few letters of the command name, if that abbreviation is unambiguous;
+and you can repeat the @code{next} o r@code{step} commands by typing
+just @key{RET}. Some commands which require a parameter, such as
+@code{print} remember the argument that was given to them.
+
+@menu
+* Command Syntax:: How to give commands to the BASH debugger
+* Help:: How to ask for help (help)
+* Quit:: Leaving the debugger (quit)
+* Information:: Status and Debugger settings (info, show)
+* Stopping:: Stopping and continuing (break, watch, step, cont...)
+* Stack:: Examining the stack (where, up, down, frame)
+* List:: Printing source files (list)
+* Search:: Searching source files (/pat/ ?pat?)
+* Data:: Examining data (print, examine, info variables)
+* Evaluation/Execution:: Arbitrary execution (eval, shell)
+* Auto Display:: Executing expressions on stop (display, undisplay)
+* Controlling bashdb:: Controlling bashdb (set, history)
+@end menu
+
+@node Command Syntax
+@section Command syntax
+
+A BASH debugger command is a single line of input. There is no limit on
+how long it can be. It starts with a command name, which is followed by
+arguments whose meaning depends on the command name. For example, the
+command @code{step} accepts an argument which is the number of times to
+step, as in @samp{step 5}. You can also use the @code{step} command
+with no arguments. Some commands do not allow any arguments.
+
+@cindex repeating next/step commands
+@kindex RET @r{(repeat last command)}
+A blank line as input to @DBG (typing just @key{RET}) means to
+repeat the previous next or step command.
+
+@kindex # @r{(a comment)}
+@cindex comment
+Any text from a @kbd{#} to the end of the line is a comment; it does
+nothing. This is useful mainly in command files (@pxref{Command
+Files,,Command files}).
+
+@node Help
+@section Getting help (@samp{help})
+@cindex online documentation
+
+Once inside the BASH debugger, you can always ask it for information on its
+commands, using the command @code{help}.
+
+@table @code
+@kindex h @r{(@code{help})}
+@item help
+@itemx h
+You can use @code{help} (abbreviated @code{h}) with no arguments to
+display a short list of named classes of commands:
+@end table
+
+@flushleft
+@smallexample
+bashdb<0> @b{help}
+bashdb commands:
+List/search source lines: Control script execution:
+------------------------- -------------------------
+ l [start|.] [cnt] List cnt lines T [n] Stack trace
+ from line start s [n] Single step [n times]
+ l sub List source code fn n [n] Next, steps over subs
+ - or . List previous/current line <CR>/<Enter> Repeat last n or s
+ w [line] List around line c [linespec] Continue [to linespec]
+ f filename View source in file L List all breakpoints
+ /pat/ Search forward for pat b linespec Set breakpoint
+ ?pat? Search backward for pat del [n].. or D Delete a/all breaks
+ by entry number
+Debugger controls: skip skip execution of cmd
+------------------------- cl linespec Delete breakpoints by
+ H [num] Show last num commands line spec
+ q [exp] or ^D Quit returning exp R [args] Attempt a restart
+ info [cmd] Get info on cmd. u [n] Go up stack by n or 1.
+ !n or hi n Run debugger history n do [n] Go down stack by n or 1.
+ h or ? [cmd] Get help on command W [var] Add watchpoint. If no
+ info [cmd] Get info on cmd no expr, delete all
+ show [cmd] Show settings We [expr] Add Watchpoint arith
+ expr
+ so file read in dbg commands t Toggle trace
+ en/di n enable/disable brkpt,
+ set x y set a debugger variable watchpoint, or display
+ e bash-cmd evaluate a bash command tb linespec Add one-time break
+ disp expr add a display expr a linespec cmd eval "cmd" at linespec
+ M Show module versions A delete all actions
+ x expr evaluate expression ret jump out of fn or source
+ (via declare, let, eval) finish execute until return
+ deb debug into another cond n exp set breakpoint condition
+ shell script
+ !! cmd [args] execute shell command "cmd" with "args"
+
+Data Examination: also see e, t, x
+-------------------------
+ p variable Print variable
+ V [[!]pat] List variable(s) matching or not (!) matching pattern pat
+ S [[!]pat] List subroutine names [not] matching pattern pat
+
+Readline command line editing (emacs/vi mode) is available
+For more help, type h <cmd> or consult online-documentation.
+@end smallexample
+@end flushleft
+@c the above line break eliminates huge line overfull...
+
+@table @code
+@item help @var{command}
+With a command name as @code{help} argument, the BASH debugger displays
+short information on how to use that command.
+
+@example
+bashdb<0> @b{help list}
+l linespec List window lines starting at linespec.
+l min incr List incr lines starting at 'min' linespec.
+l List next window of lines.
+l . Same as above.
+ Long command name: list.
+@end example
+
+In addition to @code{help}, you can use the debugger command
+@code{info} to inquire about the state of your script, or the state of
+@DBG itself. The listings under @code{info} in the Index
+point to all the sub-commands. @xref{Command Index}.
+@end table
+
+@c @group
+@table @code
+@kindex info
+@kindex i @r{(@code{info})}
+@item info
+This command (abbreviated @code{i}) is for describing the state of
+your program. For example, you can list the arguments given to your
+script with @code{info args}, or list the breakpoints you have set
+with @code{info breakpoints}. You can get a complete list of the
+@code{info} sub-commands with @w{@code{help info}}.
+
+@example
+bashdb<0> @b{info}
+Info subcommands are: args breakpoints display files source sources stack terminal variables watchpoints
+bashdb<1> @b{info source}
+Current script file is parm.sh
+Contains 34 lines.
+@end example
+@end table
+
+
+@node Quit
+@section Quitting the BASH debugger (@samp{quit})
+
+@table @code
+@kindex quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
+@kindex q @r{(@code{quit})}
+@item quit @ovar{expression}
+@item quit @r{[}@var{expression} @ovar{subshell-levels}@r{]}
+@itemx q
+
+To exit @value{DBG}, use the @code{quit} command (abbreviated
+@code{q}), or type an end-of-file character (usually @kbd{C-d}). If
+you do not supply @var{expression}, @DBG will try to terminate
+normally or with exit code 0. Otherwise it will terminate using the
+result of @var{expression} as the exit code.
+
+A simple @code{quit} tries to terminate all nested subshells that may
+be in effect. If you are nested a subshell, this is normally
+indicated in a debugger prompt by the number of parentheses that the
+history number is inside --- no parenthesis means there is no subshell
+in effect. The dynamic variable @env{BASH_SUBSHELL} also contains the
+number of subshells in effect.
+
+If you want only to terminate some number of subshells but not all of
+them, you can give a count of the number of subshells to leave after
+the return-code expression. To leave just one level of subshell
+@code{return} does almost the same thing. (See @pxref{Returning,
+,Returning}) There is a subtle difference between the two though:
+@code{return} will leave you at the beginning of the next statement
+while @code{quit} may leave you at the place the subshell was invoked
+which may be in the middle of another command such as an assingment
+statement or condition test.
+
+If the environment variable @code{BASHDB_QUIT_ON_QUIT} is set, when the
+program terminates, the debugger will also terminate too. This may be
+useful if you are debugging a script which calls another script and
+you want this inner script just to return to the outer script.
+@end table
+
+@node Stopping
+@section Stopping and Resuming Execution (@samp{break}, @samp{watch}, @samp{step}, @samp{cont})
+
+One important use of a debugger is to stop your program before it
+terminates so that, if your script might run into trouble, you can
+investigate and find out why. However should your script accidently
+continue to termination, @DBG has arranged for it not to leave the
+debugger without your explicit instruction. That way, you can restart
+the program using the same command arguments.
+
+Inside @value{DBG}, your script may stop for any of several reasons,
+such as a signal, a breakpoint, or reaching a new line after a
+debugger command such as @code{step}. You may then examine and
+change variables, set new breakpoints or remove old ones, and then
+continue execution.
+
+@menu
+* Breakpoints:: Breakpoints, watchpoints (break, watch, clear)
+* Resuming Execution:: Resuming execution (continue, step, next, skip, debug)
+* Signals:: Signals
+@end menu
+
+@node Breakpoints
+@subsection Breakpoints, watchpoints
+
+@cindex breakpoints
+A @dfn{breakpoint} makes your script stop whenever a certain point in
+the program is reached. For each breakpoint, you can add conditions to
+control in finer detail whether your script stops.
+
+You can set breakpoints with the @code{break} command and its variants
+(@pxref{Set Breaks, ,Setting breakpoints}), to specify the place where
+your script should stop by line number. or function name in the
+debugged script.
+
+@cindex watchpoints
+@cindex breakpoint on variable modification
+A @dfn{watchpoint} is a special breakpoint that stops your script when
+the value of an expression changes. There is a different command to
+set watchpoints (@pxref{Set Watchpoints, ,Setting watchpoints}).
+
+But aside from that, you can manage a watchpoint like any other
+breakpoint: you delete enable, and disable both breakpoints and
+watchpoints using the same commands.
+
+You can arrange to have values from your program displayed automatically
+whenever @value{BASH} stops at a breakpoint. @xref{Auto Display,,
+Automatic display}.
+
+@cindex breakpoint numbers
+@cindex numbers for breakpoints
+@DBG assigns a number to each breakpoint and watchpoint when
+you create it; these numbers are successive integers starting with
+one. In many of the commands for controlling various features of
+breakpoints you use the breakpoint number to say which breakpoint you
+want to change. Each breakpoint may be @dfn{enabled} or
+@dfn{disabled}; if disabled, it has no effect on your script until you
+enable it again.
+
+@cindex watchpoints numbers
+@cindex numbers for watchpoints
+Watchpoint numbers however are distiguished from breakpoint numbers by
+virtue of their being suffixed with the either an upper- or lower-case
+`W'. For example, to enable breakpoint entry 0 along with watchpoint
+entry 1 you would write @samp{enable 1 2w}, the ``2w'' refers to the
+watchpoint; ``2W'' would work just as well.
+
+@ifset FINISHED
+@cindex breakpoint ranges
+@cindex ranges of breakpoints
+Some @DBG commands accept a range of breakpoints on which to
+operate. A breakpoint range is either a single breakpoint number, like
+@samp{5}, or two such numbers, in increasing order, separated by a
+hyphen, like @samp{5-7}. When a breakpoint range is given to a command,
+all breakpoint in that range are operated on.
+@end ifset
+
+@menu
+* Set Breaks:: Setting breakpoints (break, tbreak)
+* Set Watchpoints:: Setting watchpoints (watch, watche)
+* Delete Breaks:: Deleting breakpoints (delete, clear)
+* Disabling:: Disabling breakpoints (disable, enable)
+* Conditions:: Break conditions (condition)
+@end menu
+
+@node Set Breaks
+@subsubsection Setting breakpoints (@samp{break} @samp{tbreak})
+
+@kindex break
+@kindex b @r{(@code{break})}
+@cindex latest breakpoint
+Breakpoints are set with the @code{break} command (abbreviated
+@code{b}).
+
+@table @code
+@item break @var{function}
+Set a breakpoint at entry to function @var{function}.
+
+@item break @var{linenum}
+Set a breakpoint at line @var{linenum} in the current source file.
+The current source file is the last file whose source text was printed.
+The breakpoint will stop your script just before it executes any of the
+code on that line.
+
+@item break @var{filename}:@var{linenum}
+Set a breakpoint at line @var{linenum} in source file @var{filename};
+@var{filename} has to be one of the files previously read in and has
+to be specified exactly as the name used when read in. For a list of
+read-in files, use the @samp{info files} command.
+
+@ifset FINISHED
+@item break
+When called without any arguments, @code{break} sets a breakpoint at
+the next instruction to be executed in the selected stack frame
+(@pxref{Stack, ,Examining the Stack}). In any selected frame but the
+innermost, this makes your script stop as soon as control returns to
+that frame. If you use @code{break} without an argument in the
+innermost frame, @DBG stops the next time it reaches the
+current location; this may be useful inside loops.
+@end ifset
+
+@item break @dots{} if @var{cond}
+Set a breakpoint with condition @var{cond}; evaluate the expression
+@var{cond} each time the breakpoint is reached, and stop only if the
+value is nonzero---that is, if @var{cond} evaluates as true. The
+expression is evaluated via the @code{let} builtin funtion.
+@samp{@dots{}} stands for one of the possible arguments described
+above (or no argument) specifying where to break. The word ``if'' is
+often optional and is necessary only @samp{@dots{}} is
+omitted. @xref{Conditions, ,Break conditions}, for more information on
+breakpoint conditions.
+
+Examples:
+@example
+bashdb<0> @b{break fn1}
+Breakpoint 1 set in file parm.sh, line 3.
+bashdb<1> @b{break 28}
+Breakpoint 2 set in file parm.sh, line 28.
+bashdb<2> @b{break parm.sh:29}
+Breakpoint 3 set in file parm.sh, line 29.
+bashdb<3> @b{break 28 if x==5}
+Breakpoint 4 set in file parm.sh, line 28.
+@end example
+
+@kindex tbreak
+@item tbreak @var{args}
+Set a breakpoint enabled only for one stop. @var{args} are the
+same as for the @code{break} command, and the breakpoint is set in the same
+way, but the breakpoint is automatically deleted after the first time your
+program stops there. @xref{Disabling, ,Disabling breakpoints}.
+
+@kindex info breakpoints
+@cindex @code{$_} and @code{info breakpoints}
+@item info breakpoints @ovar{n}
+@itemx info break @ovar{n}
+@itemx info watchpoints @ovar{n}
+Print a table of all breakpoints, watchpoints set and not deleted,
+with the following columns for each breakpoint:
+
+@table @emph
+@item Breakpoint Numbers (@samp{Num})
+@item Enabled or Disabled (@samp{Enb})
+Enabled breakpoints are marked with @samp{1}. @samp{0} marks breakpoints
+that are disabled (not enabled).
+@item Count
+The number of times that breakpoint or watchpoint has been hit.
+@item Condition
+The arithmetic expression
+@item File and Line (@samp{file:line})
+The filename and line number inside that file where of breakpoint in
+the script. The file and line are separated with a colon.
+@end table
+
+@noindent
+If a breakpoint is conditional, @code{info break} shows the condition on
+the line following the affected breakpoint; breakpoint commands, if any,
+are listed after that.
+
+@noindent
+@code{info break} displays a count of the number of times the breakpoint
+has been hit.
+
+@code{info break} with a breakpoint number @var{n} as argument lists
+only that breakpoint.
+
+Examples:
+@example
+bashdb<4> @b{info break}
+Breakpoints at following places:
+Num Type Disp Enb What
+1 breakpoint keep y parm.sh:3
+2 breakpoint keep y parm.sh:28
+3 breakpoint keep y parm.sh:29
+4 breakpoint keep y parm.sh:28
+No watch expressions have been set.
+bashdb<5> @b{info break 4}
+Num Type Disp Enb What
+4 breakpoint keep y parm.sh:28
+No watch expressions have been set.
+@end example
+@end table
+
+
+@ifset FINISHED
+This is especially useful in conjunction with the
+@code{ignore} command. You can ignore a large number of breakpoint
+hits, look at the breakpoint info to see how many times the breakpoint
+was hit, and then run again, ignoring one less than that number. This
+will get you quickly to the last hit of that breakpoint.
+@end ifset
+
+@DBG allows you to set any number of breakpoints at the same place in
+your script. There is nothing silly or meaningless about this. When
+the breakpoints are conditional, this is even useful
+(@pxref{Conditions, ,Break conditions}).
+
+@node Set Watchpoints
+@subsubsection Setting watchpoints (@samp{watch}, @samp{watche})
+
+@cindex setting watchpoints
+You can use a watchpoint to stop execution whenever the value of an
+expression changes, without having to predict a particular place where
+this may happen. As with the @code{print} (@pxref{Data,,Examining
+Data}), the idiosyncracies of a BASH or any POSIX shell derivative
+suggest using two commands. The @code{watch} command is just for a
+single variables; the @code{watche} command uses the builtin ``let''
+command to evaluate an expression. If the variable you are tracking
+can take a string value, issuing something like @samp{watch foo} will
+not have the desired effect---any string assignment to @code{foo} will
+have a value 0 when it is assigned via ``let.''
+
+@table @code
+@kindex watch
+@item watch @var{var}
+Set a watchpoint for a variable. @DBG will break when the
+value of @var{var} changes. In this command do not add a leading
+dollar symbol to @var{var}.
+
+@item watche @var{expr}
+Set a watchpoint for an expression via the builtin ``let'' command.
+@DBG will break when @var{expr} is written into by the program
+and its value changes. Not that this may not work for tracking
+arbitrary string value changes. For that use @code{watch} described
+earlier.
+@end table
+
+@node Delete Breaks
+@subsubsection Deleting breakpoints (@samp{clear}, @samp{delete})
+
+@cindex clearing breakpoints, watchpoints
+@cindex deleting breakpoints, watchpoints
+It is often necessary to eliminate a breakpoint or watchpoint once it
+has done its job and you no longer want your script to stop there.
+This is called @dfn{deleting} the breakpoint. A breakpoint that has
+been deleted no longer exists; it is forgotten.
+
+With the @code{clear} command you can delete breakpoints according to
+where they are in your script. With the @code{delete} command you can
+delete individual breakpoints, or watchpoints by specifying their
+breakpoint numbers. @emph{Note: as described below under the ``clear''
+command, ``d'' is an alias for ``clear'', not ``delete''. }
+
+It is not necessary to delete a breakpoint to proceed past it. @DBG
+automatically ignores breakpoints on the first instruction to be executed
+when you continue execution.
+
+@table @code
+@kindex clear
+@kindex d @r{(@code{clear})}
+@item clear
+Delete any breakpoints at the next instruction to be executed in the
+selected stack frame (@pxref{Selection, ,Selecting a frame}). When
+the innermost frame is selected, this is a good way to delete a
+breakpoint where your script just stopped.
+
+It may seem odd that we have an alias ``d'' for ``clear.'' It so
+happens that Perl's debugger use ``d'' for its delete command and the
+delete concept in Perl's debugger corresponds to ``clear'' in
+GDB. (Perl doesn't have a notion of breakpoint entry numbers). So in
+order to be compatible with both debugger interfaces, ``d'' is used as
+an alias for ``clear.'' Clear?
+
+@item clear @var{function}
+@itemx clear @var{filename}:@var{function}
+Delete any breakpoints set at entry to the function @var{function}.
+
+@item clear @var{linenum}
+@itemx d @var{linenum}
+@ifset FINISHED
+@itemx clear @var{filename}:@var{linenum}
+@end ifset
+Delete any breakpoints set at or within the code of the specified line.
+
+@cindex delete breakpoints
+@kindex delete
+@kindex de @r{(@code{delete})}
+@item delete @ovar{breakpoints}
+Delete the breakpoints, watchpoints specified as arguments.
+
+If no argument is specified, delete all breakpoints (@DBG asks
+confirmation, unless you have @code{set confirm off}). You can
+abbreviate this command as @code{de}.
+
+
+Note that for compatibility with Perl's debugger, @code{d} means
+something else: @code{clear}.
+
+@end table
+
+@node Disabling
+@subsubsection Disabling breakpoints (@samp{disable}, @samp{enable})
+
+Rather than deleting a breakpoint or watchpoint, you might
+prefer to @dfn{disable} it. This makes the breakpoint inoperative as if
+it had been deleted, but remembers the information on the breakpoint so
+that you can @dfn{enable} it again later.
+
+You disable and enable breakpoints, watchpoints, and catchpoints with
+the @code{enable} and @code{disable} commands, optionally specifying one
+or more breakpoint numbers as arguments. Use @code{info break} or
+@code{info watch} to print a list of breakpoints, watchpoints, and
+catchpoints if you do not know which numbers to use.
+
+A breakpoint, watchpoint, or catchpoint can have any of four different
+states of enablement:
+
+@itemize @bullet
+@item
+Enabled. The breakpoint stops your program. A breakpoint set
+with the @code{break} command starts out in this state.
+@item
+Disabled. The breakpoint has no effect on your program.
+@item
+Enabled once. The breakpoint stops your program, but then becomes
+disabled.
+@item
+Enabled for deletion. The breakpoint stops your program, but
+immediately after it does so it is deleted permanently. A breakpoint
+set with the @code{tbreak} command starts out in this state.
+@end itemize
+
+You can use the following commands to enable or disable breakpoints,
+watchpoints, and catchpoints:
+
+@table @code
+@kindex disable breakpoints
+@kindex disable
+@kindex dis @r{(@code{disable})}
+@item disable @ovar{breakpoints}
+Disable the specified breakpoints---or all breakpoints, if none are
+listed. A disabled breakpoint has no effect but is not forgotten. All
+options such as ignore-counts, conditions and commands are remembered in
+case the breakpoint is enabled again later. You may abbreviate
+@code{disable} as @code{dis}.
+
+@kindex enable breakpoints
+@kindex enable
+@item enable @ovar{breakpoints}
+Enable the specified breakpoints (or all defined breakpoints). They
+become effective once again in stopping your program.
+@end table
+
+@c FIXME: I think the following ``Except for [...] @code{tbreak}'' is
+@c confusing: tbreak is also initially enabled.
+Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks,
+,Setting breakpoints}), breakpoints that you set are initially enabled;
+subsequently, they become disabled or enabled only when you use one of
+the commands above. (The command @code{until} can set and delete a
+breakpoint of its own, but it does not change the state of your other
+breakpoints; see @ref{Resuming Execution, ,Resuming Execution}.)
+
+@node Conditions
+@subsubsection Break conditions (@samp{condition})
+@cindex conditional breakpoints
+@cindex breakpoint conditions
+
+The simplest sort of breakpoint breaks every time your script reaches
+a specified place. You can also specify a @dfn{condition} for a
+breakpoint. A condition is just a BASH expression.
+
+Break conditions can be specified when a breakpoint is set, by using
+@samp{if} in the arguments to the @code{break} command. @xref{Set
+Breaks, ,Setting breakpoints}. A breakpoint with a condition
+evaluates the expression each time your script reaches it, and your
+script stops only if the condition is @emph{true}.
+
+@cindex one-time breakpoints
+There is also a notion of a ``one-time'' breakpoint which gets deleted
+as soon as it is hit, so that that breakpoint is executed once only.
+
+Conditions are also accepted for watchpoints; you may not need them,
+since a watchpoint is inspecting the value of an expression anyhow---but
+it might be simpler, say, to just set a watchpoint on a variable name,
+and specify a condition that tests whether the new value is an interesting
+one.
+
+Break conditions can be specified when a breakpoint is set, by using
+@samp{if} in the arguments to the @code{break} command. @xref{Set
+Breaks, ,Setting breakpoints}. They can also be changed at any time
+with the @code{condition} command.
+
+@ifset FINISHED
+You can also use the @code{if} keyword with the @code{watch} command.
+The @code{catch} command does not recognize the @code{if} keyword;
+@code{condition} is the only way to impose a further condition on a
+catchpoint.
+@end ifset
+
+@table @code
+@kindex condition
+@item condition @var{bnum} @var{expression}
+Specify @var{expression} as the break condition for breakpoint
+@var{bnum}. After you set a condition, breakpoint @var{bnum} stops
+your program only if the value of @var{expression} is true (nonzero).
+
+@item condition @var{bnum}
+Remove the condition from breakpoint number @var{bnum}. It becomes
+an ordinary unconditional breakpoint.
+@end table
+
+@ifset FINISHED
+When you use @code{condition}, @DBG checks @var{expression}
+immediately for syntactic correctness, and to determine whether
+symbols in it have referents in the context of your breakpoint. If
+@var{expression} uses symbols not referenced in the context of the
+breakpoint, @DBG prints an error message:
+
+@example
+No symbol "foo" in current context.
+@end example
+@end ifset
+
+@noindent
+@BASH does
+not actually evaluate @var{expression} at the time the @code{condition}
+command (or a command that sets a breakpoint with a condition, like
+@code{break if @dots{}}) is given, however.
+
+Examples;
+@example
+condition 1 x>5 # Stop on breakpoint 0 only if x>5 is true.
+condition 1 # Change that! Unconditinally stop on breakpoint 1.
+@end example
+
+@node Resuming Execution
+@subsection Resuming Execution
+
+@cindex stepping
+@cindex continuing
+@cindex resuming execution
+@dfn{Continuing} means resuming program execution until your script
+completes normally. In contrast, @dfn{stepping} means executing just
+one more ``step'' of your script, where ``step'' may mean either one
+line of source code. Either when continuing or when stepping,
+your script may stop even sooner, due to a breakpoint or a signal.
+
+@menu
+* Step:: running the next statement (step)
+* Next:: running the next statement skipping over functions (skip)
+* Finish:: running until the return of a function or ``source'' (finish)
+* Skip:: skipping the next statement (skip)
+* Continue:: continuing execution (continue)
+* Debug:: debugging into another program (debug)
+* Returning:: returning
+@end menu
+
+@node Step
+@subsubsection Step (@samp{step})
+@table @code
+@kindex step
+@kindex s @r{(@code{step})}
+@item step
+Continue running your script until control reaches a different source
+line, then stop it and return control to @value{DBG}. This command is
+abbreviated @code{s}.
+
+The @code{step} command only stops at the first instruction of a source
+line. This prevents the multiple stops that could otherwise occur in
+@code{switch} statements, @code{for} loops, etc. @code{step} continues
+to stop if a function that has debugging information is called within
+the line. In other words, @code{step} @emph{steps inside} any functions
+called within the line.
+
+@item step @ovar{count}
+Continue running as in @code{step}, but do so @var{count} times. If a
+breakpoint is reached, or a signal not related to stepping occurs before
+@var{count} steps, stepping stops right away.
+@end table
+
+@node Next
+@subsubsection Next (@samp{next})
+@table @code
+@kindex next
+@kindex n @r{(@code{next})}
+@item next @ovar{count}
+Continue to the next source line in the current (innermost) stack frame.
+This is similar to @code{step}, but function calls that appear within
+the line of code are executed without stopping. Execution stops when
+control reaches a different line of code at the original stack level
+that was executing when you gave the @code{next} command. This command
+is abbreviated @code{n}.
+
+An argument @var{count} is a repeat count, as for @code{step}.
+@end table
+
+@node Finish
+@subsubsection Finish (@samp{finish})
+@table @code
+@kindex finish
+@item finish
+Continue running until just after function returns. @emph{Currently,
+the line shown on a return is the function header, unless the
+@code{return} builtin function is executed in which case it is the
+line number of the @code{return} function.}
+
+Contrast this with the @code{return} command (@pxref{Returning,
+,Returning from a function}) and the @code{quit} (@pxref{Quitting the
+BASH debugger, ,Quitting the BASH debugger}).
+
+@end table
+
+@node Skip
+@subsubsection Skip (@samp{skip})
+@table @code
+@kindex skip
+@item skip @ovar{count}
+Skip exection of the next source line.
+This may be useful if you have an action that ``fixes'' existing code in
+the script. The @code{debug} command internally uses the @code{skip} command
+to skip over existing non-debugged invocation that was presumably just
+run.
+@end table
+
+@node Continue
+@subsubsection Continue (@samp{continue})
+@table @code
+@kindex continue
+@kindex c @r{(@code{continue})}
+@item continue @ovar{linespec}
+@itemx c @ovar{line-number}
+Resume program execution, at the address where your script last
+stopped; any breakpoints set at that address are bypassed. The
+optional argument @var{linespec} allows you to specify a linespec (a
+line number, function, or filename linenumber combination) to set. A
+one-time breakpoint is deleted when that breakpoint is reached. Should
+the program stop before that breakpoint is reached, for example,
+perhaps another breakpoint or watchpoint is reached first, in a
+listing of the breakpoints you will see this entry with the condition
+9999 which indicates a one-time breakpoint.
+@end table
+
+To resume execution at a different place, you can use @code{return}
+(@pxref{Returning, ,Returning from a function}) to go back to the
+calling function or sourced script. If you are nested inside a
+subshell, @code{quit} with a value for the number of subshells to
+exit also functions like a return.
+
+A typical technique for using stepping is to set a breakpoint
+(@pxref{Breakpoints, ,Breakpoints; watchpoints}) at the
+beginning of the function or the section of your script where a problem
+is believed to lie, run your script until it stops at that breakpoint,
+and then step through the suspect area, examining the variables that are
+interesting, until you see the problem happen.
+
+@node Debug
+@subsubsection Debug (@samp{debug})
+@table @code
+@kindex debug
+@item debug @ovar{script-name}
+Debug into @var{script-name}. If no name is given the current source line
+is used. In either case the options are prepended to cause the
+debugger to run.
+
+The nesting level of the debugger is saved inside environment variable
+@code{BASHDB_LEVEL}. The debugger prompt indicates the level of nesting
+by enclosing the history in that many nestings of @code{<>} symbols.
+
+@end table
+
+@node Returning
+@subsubsection Returning from a function, sourced file, or subshell (@samp{return})
+
+@table @code
+@cindex returning from a function, sourced file or subshell
+@kindex return
+@item return
+@itemx return
+You can cancel execution of a function call or a subshell with the
+@code{return} command.
+@end table
+
+The @code{return} command does not resume execution; it leaves the
+program stopped in the state that would exist if the function had just
+returned. See also the @code{quit} command (@ref{Quit, ,Quitting the
+BASH debugger}). In some situations @code{return} is similar to
+@code{quit}: in particular when the script is @emph{not} currenlty
+inside in a function and the number of subshells in effect is 0, or
+when a subshell count of 1 is given on the @code{quit} command.
+
+@ifset FINISHED
+In contrast, the @code{finish} command (@pxref{Continuing
+and Stepping, ,Continuing and stepping}) resumes execution until the
+selected stack frame returns naturally.
+@end ifset
+
+@node Signals
+@subsection Signals
+@cindex signals
+
+A signal is an asynchronous event that can happen in a program. The
+operating system defines the possible kinds of signals, and gives each
+kind a name and a number. For example, in Unix @code{SIGINT} is the
+signal a program gets when you type an interrupt character (often
+@kbd{C-c}); @code{SIGALRM} occurs when the alarm clock timer goes off
+(which happens only if your program has requested an alarm).
+
+Some signal handlers are installed and changed for @value{DBG}'s
+normal use: @code{SIGDEBUG} and @code{SIGEXIT}. @code{SIGDEBUG} is
+used by the debugger to potentially stop your program before execution
+of each statement occurs, and @code{SIGEXIT} is used to catch your
+program just before it is set to leave so you have the option of
+restarting the program with the same options (and not leave the
+debugger) or let the program quit.
+
+Signal handlers that the debugged script might have installed are
+saved and called before the corresponding debugger handler. Thus, the
+debugged program should work roughly in the same fashion as when it is
+not debugged. However there are some call-stack variables which
+inevitably will differ. To try to hedge this a little so the behaviour
+is the same, @value{DBG} will modify arguments to the traps if it
+finds one of the call-stack that change as a result of the debugger
+being in place. In particluar @env{$LINENO} will get replaced with
+@env{$@{BASH_LINENO[0]@}}; also @env{$@{BASH_LINENO[0]@}} and
+@env{$@{BASH_SOURCE[0]@}} get replaced with
+@env{$@{BASH_LINENO[1]@}} and @env{$@{BASH_SOURCE[1]@}}
+respectively.
+
+The debugger also installs an interrupt handler @code{SIGINT} so that
+errant programs can be interrupted and you can find out where the
+program was when you interrupted it.
+
+@cindex fatal signals
+Some signals, including @code{SIGALRM}, are a normal part of the
+functioning of your program. Others, such as @code{SIGSEGV}, indicate
+errors; these signals are @dfn{fatal} (they kill your program immediately) if the
+program has not specified in advance some other way to handle the signal.
+@code{SIGINT} does not indicate an error in your program, but it is normally
+fatal so it can carry out the purpose of the interrupt: to kill the program.
+
+@BASH has the ability to detect any occurrence of a signal in your
+program. You can tell @BASH in advance what to do for each kind of
+signal.
+
+@cindex handling signals
+Normally, @BASH is set up to let the non-erroneous signals like
+@code{SIGALRM} be silently passed to your program
+(so as not to interfere with their role in the program's functioning)
+but to stop your program immediately whenever an error signal happens.
+You can change these settings with the @code{handle} command.
+
+@table @code
+@kindex info signals
+@item info signals
+@itemx info handle
+Print a table of all the kinds of signals and how @BASH has been told to
+handle each one. You can use this to see the signal numbers of all
+the defined types of signals.
+
+@code{info handle} is an alias for @code{info signals}.
+
+@kindex handle
+@item handle @var{signal} @var{keywords}@dots{}
+Change the way @BASH handles signal @var{signal}. @var{signal}
+can be the number of a signal or its name (with or without the
+@samp{SIG} at the beginning); a list of signal numbers of the form
+@samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the
+known signals. The @var{keywords} say what change to make.
+@end table
+
+@c @group
+The keywords allowed by the @code{handle} command can be abbreviated.
+Their full names are:
+
+@table @code
+@item stop
+@BASH should stop your program when this signal happens. This implies
+the @code{print} keyword as well.
+
+@item nostop
+@BASH should not stop your program when this signal happens. It may
+still print a message telling you that the signal has come in.
+
+@item print
+@BASH should print a message when this signal happens.
+
+@item noprint
+@BASH should not mention the occurrence of the signal at all.
+
+@item stack
+@BASH should print a stack trace when this signal happens.
+
+@item nostack
+@BASH should not print a stack trace when this signal occurs.
+
+@ifset FINISHED
+@item pass
+@itemx noignore
+@BASH should allow your program to see this signal; your program
+can handle the signal, or else it may terminate if the signal is fatal
+and not handled. @code{pass} and @code{noignore} are synonyms.
+
+@item nopass
+@itemx ignore
+@BASH should not allow your program to see this signal.
+@code{nopass} and @code{ignore} are synonyms.
+@end ifset
+@end table
+@c @end group
+
+@ifset FINISHED
+When a signal stops your program, the signal is not visible to the
+program until you
+continue. Your program sees the signal then, if @code{pass} is in
+effect for the signal in question @emph{at that time}. In other words,
+after @BASH reports a signal, you can use the @code{handle}
+command with @code{pass} or @code{nopass} to control whether your
+program sees that signal when you continue.
+
+The default is set to @code{nostop}, @code{noprint}, @code{pass} for
+non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and
+@code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the
+erroneous signals.
+
+You can also use the @code{signal} command to prevent your program from
+seeing a signal, or cause it to see a signal it normally would not see,
+or to give it any signal at any time. For example, if your program stopped
+due to some sort of memory reference error, you might store correct
+values into the erroneous variables and continue, hoping to see more
+execution; but your program would probably terminate immediately as
+a result of the fatal signal once it saw the signal. To prevent this,
+you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your
+program a signal}.
+@end ifset
+
+@node Information
+@section Status and Debugger Settings (@samp{info}, @samp{show})
+
+In addition to @code{help}, you can use the @BASH commands @code{info}
+and @code{show} to inquire about the state of your program, or the state
+of @BASH itself. Each command supports many topics of inquiry; this
+manual introduces each of them in the appropriate context. The listings
+under @code{info} and under @code{show} in the Index point to
+all the sub-commands. @xref{Command Index}.
+
+@c @group
+@table @code
+@kindex info
+@kindex i @r{(@code{info})}
+@item info
+This command (abbreviated @code{i}) is for describing the state of
+your program. For example, you canlist the current @code{$1}, @code{$2}
+parameters with @code{info args}, or list the breakpoints you have set
+with @code{info breakpoints} or @code{info watchpoints}. You can get
+a complete list of the @code{info} sub-commands with @w{@code{help
+info}}.
+
+@kindex set
+@item set
+You can assign the result of an expression to an environment variable
+with @code{set}. For example, you can set the number of lines
+@BASH will list by default to 20 with @code{set listsize 20}.
+
+@kindex show
+@item show
+In contrast to @code{info}, @code{show} is for describing the state of
+@BASH itself.
+You can change most of the things you can @code{show}, by using the
+related command @code{set};
+
+The distinction between @code{info} and @code{show} however is a bit
+fuzzy. For example, to list the arguments given to your script use
+@code{show args}; @code{info args} does something different.
+
+@kindex info set
+To display all the settable parameters and their current
+values, you can use @code{show} with no arguments; you may also use
+@code{info set}. Both commands produce the same display.
+@c FIXME: "info set" violates the rule that "info" is for state of
+@c FIXME...program. Ck w/ GNU: "info set" to be called something else,
+@c FIXME...or change desc of rule---eg "state of prog and debugging session"?
+@end table
+@c @end group
+
+Here are three miscellaneous @code{show} subcommands, all of which are
+exceptional in lacking corresponding @code{set} commands:
+
+@table @code
+@kindex show version
+@cindex version number
+@item show version
+Show what version of @BASH is running. You should include this
+information in @BASH bug-reports. If multiple versions of
+@BASH are in use at your site, you may need to determine which
+version of @BASH you are running; as @BASH evolves, new
+commands are introduced, and old ones may wither away. Also, many
+system vendors ship variant versions of @value{BASH}, and there are
+variant versions of @BASH in @sc{gnu}/Linux distributions as well.
+The version number is the same as the one announced when you start
+@value{BASH}.
+
+@kindex show copying
+@item show copying
+Display information about permission for copying @value{BASH}.
+
+@kindex show warranty
+@item show warranty
+Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty,
+if your version of @DBG comes with one.
+
+@end table
+
+@node Stack
+@section Examining the Stack (@samp{where}, @samp{frame}, @samp{up}, @samp{down})
+
+When your script has stopped, one thing you'll probably want to know
+is where it stopped and some idea of how it got there.
+
+@cindex call stack
+Each time your script performs a function call (either as part of a
+command substitution or not), or `source's a file, information about
+this action is saved. The call stack then is this a history of the
+calls that got you to the point that you are currently stopped at.
+
+@cindex selected frame
+One of the stack frames is @dfn{selected} by @DBG and many
+@DBG commands refer implicitly to the selected frame. In
+particular, whenever you ask @DBG to list lines without giving
+a line number or location the value is found in the selected frame.
+There are special @DBG commands to select whichever frame you
+are interested in. @xref{Selection, ,Selecting a frame}.
+
+When your program stops, @BASH automatically selects the
+currently executing frame and describes it briefly, similar to the
+@code{frame} command.
+
+
+@menu
+* Frames:: Stack frames
+* Backtrace:: Backtraces (where)
+* Selection:: Selecting a frame (up, down, frame)
+
+@end menu
+
+@node Frames
+@subsection Stack frames
+
+@cindex frame, definition
+@cindex stack frame
+The call stack is divided up into contiguous pieces called @dfn{stack
+frames}, or @dfn{frames} for short; each frame is the data associated
+with one call to one function. The frame contains the line number of
+the caller of the function, the source-file name that the line refers
+to and function name (which could be the built-in name ``source'')..
+
+@cindex initial frame
+@cindex outermost frame
+@cindex innermost frame
+When your script is started, the stack has only one frame, that of the
+function @code{main}. This is called the @dfn{initial} frame or the
+@dfn{outermost} frame. Each time a function is called, a new frame is
+made. Each time a function returns, the frame for that function invocation
+is eliminated. If a function is recursive, there can be many frames for
+the same function. The frame for the function in which execution is
+actually occurring is called the @dfn{innermost} frame. This is the most
+recently created of all the stack frames that still exist.
+
+@cindex frame number
+@value{DBG} assigns numbers to all existing stack frames, starting with
+zero for the innermost frame, one for the frame that called it,
+and so on upward. These numbers do not really exist in your script;
+they are assigned by @value{DBG} to give you a way of designating stack
+frames in @value{DBG} commands.
+
+@node Backtrace
+@subsection Backtraces (@samp{where})
+
+@cindex backtraces
+@cindex tracebacks
+@cindex stack traces
+A backtrace is essentially the same as the call stack: a summary of
+how your script got where it is. It shows one line per frame, for
+many frames, starting with the place that you sare stopped at (frame
+zero), followed by its caller (frame one), and on up the stack.
+
+@table @code
+@kindex backtrace
+@kindex bt @r{(@code{backtrace})}
+@item backtrace
+@itemx bt
+@itemx where
+@itemx T
+Print a backtrace of the entire stack: one line per frame for all
+frames in the stack.
+
+@item backtrace @var{n}
+@itemx bt @var{n}
+@itemx where @var{n}
+@itemx T @var{n}
+Similar, but print only the innermost @var{n} frames.
+
+@ifset FINISHED
+@item backtrace -@var{n}
+@itemx bt -@var{n}
+@itemx where -@var{n}
+@itemx T -@var{n}
+Similar, but print only the outermost @var{n} frames.
+@end ifset
+@end table
+
+@kindex where
+The names @code{where} and @code{T} are additional aliases for
+@code{backtrace}.
+
+Each line in the backtrace shows the frame number and the function
+name, the source file name and line number, as well as the function name.
+
+Here is an example of a backtrace taken a program in the
+regression-tests @file{parm.sh}.
+
+@smallexample
+@group
+% ../bashdb -n -L .. parm.sh
+Bourne-Again Shell Debugger, release @value{BASHRELEASE}
+Copyright 2002,2003 Rocky Bernstein
+This is free software, covered by the GNU General Public License, and you are
+welcome to change it and/or distribute copies of it under certain conditions.
+
+(./parm.sh:21):
+21: fn1 5
+bashdb<0> @b{continue fn3}
+One-time breakpoint 1 set in file ./parm.sh, line 17.
+fn2: testing 1 2 3
+(./parm.sh:17):
+17: fn3() @{
+bashdb<1> @b{where}
+->0 in file `./parm.sh' at line 14
+##1 fn3() called from file `./parm.sh' at line 14
+##2 fn2("testing 1", "2 3") called from file `parm.sh' at line 5
+##3 fn1("0") called from file `parm.sh' at line 9
+##4 fn1("1") called from file `parm.sh' at line 9
+##5 fn1("2") called from file `parm.sh' at line 9
+##6 fn1("3") called from file `parm.sh' at line 9
+##7 fn1("4") called from file `parm.sh' at line 9
+##8 fn1("5") called from file `parm.sh' at line 21
+##9 source("parm.sh") called from file `bashdb' at line 143
+##10 main("-n", "-L", "..", "parm.sh") called from file `bashdb' at line 0
+@end group
+@end smallexample
+
+@noindent
+The display for ``frame'' zero isn't a frame at all, although it has
+the same information minus a function name; it just indicates that
+your script has stopped at the code for line @code{14}
+of @code{./parm.sh}.
+
+@node Selection
+@subsection Selecting a frame (@samp{up}, @samp{down}, @samp{frame})
+
+Commands for listing source code in your script work on whichever
+stack frame is selected at the moment. Here are the commands for
+selecting a stack frame; all of them finish by printing a brief
+description of the stack frame just selected.
+
+@table @code
+@kindex up
+@item up @var{n}
+Move @var{n} frames up the stack. For positive numbers @var{n}, this
+advances toward the outermost frame, to higher frame numbers, to frames
+that have existed longer. @var{n} defaults to one.
+
+@kindex down
+@kindex do @r{(@code{down})}
+@item down @var{n}
+Move @var{n} frames down the stack. For positive numbers @var{n}, this
+advances toward the innermost frame, to lower frame numbers, to frames
+that were created more recently. @var{n} defaults to one. You may
+abbreviate @code{down} as @code{do}.
+@end table
+
+All of these commands end by printing two lines of output describing the
+frame. The first line shows the frame number, the function name, the
+arguments, and the source file and line number of execution in that
+frame. The second line shows the text of that source line.
+
+@need 100
+For example:
+
+@smallexample
+@group
+bashdb<8> @b{up}
+19: sourced_fn
+bashdb<8> @b{T}
+##0 in file `./bashtest-sourced' at line 8
+->1 sourced_fn() called from file `bashtest-sourced' at line 19
+##2 source() called from file `bashdb-test1' at line 23
+##3 fn2() called from file `bashdb-test1' at line 33
+##4 fn1() called from file `bashdb-test1' at line 42
+##5 main() called from file `bashdb-test1' at line 0
+@end group
+@end smallexample
+
+After such a printout, the @code{list} command with no arguments
+prints ten lines centered on the point of execution in the frame.
+@xref{List, ,Printing source lines}.
+
+@table @code
+@kindex frame
+@cindex current stack frame
+@item frame @var{args}
+The @code{frame} command allows you to move from one stack frame to
+another, and to print the stack frame you select. @var{args} is the
+the stack frame number. Without an argument, @code{frame} prints the
+current stack frame.
+@end table
+
+@node List
+@section Examining Source Files (@samp{list})
+
+@value{DBG} can print parts of your script's source. When your
+script stops, @value{DBG} spontaneously prints the line where it
+stopped. Likewise, when you select a stack frame (@pxref{Selection,
+,Selecting a frame}), @value{DBG} prints the line where execution in
+that frame has stopped. You can print other portions of source files
+by explicit command.
+
+If you use @value{DBG} through its @sc{gnu} Emacs interface, you may
+prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
+@value{DBG} under @sc{gnu} Emacs}.
+
+@kindex list
+@kindex l @r{(@code{list})}
+To print lines from a source file, use the @code{list} command
+(abbreviated @code{l}). By default, ten lines are printed.
+There are several ways to specify what part of the file you want to print.
+
+Here are the forms of the @code{list} command most commonly used:
+
+@table @code
+@item list @var{linenum}
+@itemx l @var{linenum}
+Print lines centered around line number @var{linenum} in the
+current source file.
+
+@item list @var{function}
+@itemx l @var{function}
+Print the text of @var{function}.
+
+@item list
+@itemx l
+Print more lines. If the last lines printed were printed with a
+@code{list} command, this prints lines following the last lines
+printed; however, if the last line printed was a solitary line printed
+as part of displaying a stack frame (@pxref{Stack, ,Examining the
+Stack}), this prints lines centered around that line.
+
+@item list -
+@itemx l -
+Print lines just before the lines last printed.
+@end table
+
+By default, @value{DBG} prints ten source lines with any of these forms of
+the @code{list} command.
+You can change this using @code{set listsize}:
+
+@table @code
+@kindex set listsize
+@item set listsize @var{count}
+Make the @code{list} command display @var{count} source lines (unless
+the @code{list} argument explicitly specifies some other number).
+
+@kindex show listsize
+@item show listsize
+Display the number of lines that @code{list} prints.
+@end table
+
+Repeating a @code{list} command with @key{RET} discards the argument,
+so it is equivalent to typing just @code{list}. This is more useful
+than listing the same lines again. An exception is made for an
+argument of @samp{-}; that argument is preserved in repetition so that
+each repetition moves up in the source file.
+
+@cindex linespec
+In general, the @code{list} command expects you to supply a
+@dfn{linespecs}. Linespecs specify source lines; there are several ways
+of writing them, but the effect is always to specify some source line.
+
+Here is a complete description of the possible arguments for @code{list}:
+
+@table @code
+@item list @var{linespec}
+Print lines centered around the line specified by @var{linespec}.
+
+@item list @var{first} @var{increment}
+Print @var{increment} lines starting from @var{first}
+
+@item list @var{first}
+Print lines starting with @var{first}.
+
+@item list -
+Print lines just before the lines last printed.
+
+@item list .
+Print lines after where the script is stopped.
+
+@item list
+As described in the preceding table.
+@end table
+
+Here are the ways of specifying a single source line---all the
+kinds of linespec.
+
+@table @code
+@item @var{number}
+Specifies line @var{number} of the current source file.
+When a @code{list} command has two linespecs, this refers to
+the same source file as the first linespec.
+
+@item @var{filename}:@var{number}
+Specifies line @var{number} in the source file @var{filename}.
+
+@item @var{function}
+Specifies the line that function @var{function} is listed on.
+
+@ifset FINISHED
+@item @var{filename}:@var{function}
+Specifies the line of function @var{function} in the file
+@var{filename}. You only need the file name with a function name to
+avoid ambiguity when there are identically named functions in
+different source files.
+@end ifset
+@end table
+
+@node Search
+@section Searching source files (@samp{search}, @samp{reverse}, @samp{/.../}, @samp{?..?})
+@cindex searching
+@kindex reverse-search
+
+There are two commands for searching through the current source file for a
+BASH extended pattern-matching expression.
+
+@table @code
+@kindex search
+@kindex forward
+@item forward @var{bash-pattern}
+@itemx search @var{bash-pattern}
+The command @samp{forward @var{bash-pattern}} checks each line,
+starting with the one following the current line, for a match for
+@var{bash-pattern} which is an extended bash pattern-matching
+expression. It lists the line that is found. You can use the synonym
+@samp{search @var{bash-pattern}} or abbreviate the command name as
+@code{fo} or @code{/@var{pat}/}.
+
+@item reverse @var{bash-pattern}
+The command @samp{reverse @var{bash-pattern}} checks each line, starting
+with the one before the last line listed and going backward, for a match
+for @var{bash-pattern}. It lists the line that is found. You can abbreviate
+this command as @code{rev} or @code{?@var{bash-pattern}?}.
+@end table
+
+@node Data
+@section Examining Data (@samp{print}, @samp{examine}, @samp{info variables})
+
+@cindex printing data
+@cindex examining data
+@kindex print
+
+One way to examine string data in your script is with the @code{print}
+command (abbreviated @code{p}). However a more versatile print command
+is @code{x}; it can print variable and function definitions and can do
+arithmetic computations. Finally, the most general method would be
+via @code{eval echo}.
+
+@table @code
+@kindex print
+@kindex p @r{(@code{print})}
+@item print @var{expr}
+
+Use @code{print} to dispay strings as you would from @code{echo}. And
+as such, variable names to be substituted have to be preceded with a
+dollar sign. As with echo, filename expansion, e.g. tilde expansion,
+is performed on unquoted strings. So for example if you want to print
+a *, you would write @samp{print "*"}, not @samp{print *}. If you want
+to have the special characters dollars sign appear, use a backslash.
+
+@item print
+@itemx p
+If you omit @var{expr}, @value{DBG} displays the last expression again.
+
+@item x @ovar{expr}
+@kindex x
+
+This is a smarter, more versatile ``print'' command, and although sometimes
+it might not be what you want, and you may want to resort to either
+@code{print} or @code{eval echo...}.
+
+As with @code{print}, if you omit @var{expr}, @value{DBG} displays
+the last expression again.
+
+The @code{x} command first checks if @var{expr} is single variable. If
+it is, the definition and value are printed via @value{BASH}'s
+@code{declare -p} command. This will show the variable's attributes
+such as if it is read only or if it is an integer. If the variable is
+an array, that is show and the array values are printed.
+
+If instead @var{expr} is a function, the function definition is
+printed via @value{BASH}'s @code{declare -f} command. If @var{expr}
+was neither a variable nor an expression, then we try to get a value
+via @code{let}. And if this returns an error, as a last resort we call
+@code{print} and give what it outputs.
+
+Since @code{let} may be used internally and since (to my thinking)
+@code{let} does funny things, the results may seem odd unless you
+understand the sequence tried above and how @code{let} works. For
+example if the variable @code{foo} has value 5, then @samp{x foo} show
+the definition of foo with value 5, and @samp{x foo+5} prints 10 as
+expected. So far so good. However if @code{foo} is has value
+``string'', @samp{x foo+5} prints 5 because @code{let} has turned the
+string into 0; @samp{p foo+5} will simply print ``foo+5''; if you want
+the value of ``foo'' substituted inside a string, for example you
+expect ``the value of foo is $foo'' to come out ``the value of foo is
+5'', then the right command to use is @code{print} rather than
+@code{x}, making sure you add the dollar onto the beginning of the
+variable.
+
+@item V @ovar{!}@ovar{pattern}
+@kindex V
+
+If you want to @emph{all} list variables and there values or a set of
+variables by pattern, use this command.
+
+@smallexample
+@group
+bashdb<0> @b{V dq*}
+dq_args="dq_*"
+dq_cmd="V"
+@end group
+@end smallexample
+
+@end table
+
+@node Evaluation/Execution
+@section Running Arbitrary BASH and Shell commands (@samp{eval}, @samp{shell})
+
+The two most general commands and most ``low-level'' are @code{eval}
+and @code{shell}.
+
+@table @code
+@item eval
+@itemx e
+@kindex e
+
+In contrast to the commands of the last section the most general way
+to examine data is through @code{eval}. But you do much more with
+this; you can change the values of variables, since, you are just
+evaluating BASH code.
+
+If you expect output, you should arrange that in the command, such as
+via @code{echo} or @code{printf}. For example, to print the value of
+@var{foo}, you would type @samp{e echo $foo}. This is bit longer than
+@samp{p $foo} or (when possible) @samp{x foo}. However suppose you
+wanted to find out how the builtin test operator @samp{[} works with
+the @samp{-z} test condition. You could use @code{eval} to do this
+such as @samp{e [ -z "$foo"] && echo "yes"}.
+
+@kindex shell
+@kindex !! @r{(@code{shell})}
+@cindex shell escape
+@item shell @var{command string}
+@itemx !!
+
+If you need to execute occasional shell commands during your
+debugging session, there is no need to leave or suspend @value{DBG}; you can
+just use the @code{shell} command or its alias @code{!!}.
+
+Invoke a shell to execute @var{command string}.
+
+@end table
+
+@node Auto Display
+@section Automatic display (@samp{display}, @samp{undisplay})
+@cindex automatic display
+@cindex display of expressions
+
+If you find that you want to print the value of an expression
+frequently (to see how it changes), you might want to add it to the
+@dfn{automatic display list} so that @value{DBG} evaluates a
+statement each time your program stops. Each expression added to the
+list is given a number to identify it; to remove an expression from
+the list, you specify that number. The automatic display looks like
+this:
+
+@example
+2 (echo $x): 38
+@end example
+
+@noindent
+This display shows item numbers, expressions and their current values.
+
+@table @code
+@kindex display
+@item display @var{expr}
+Add the expression @var{expr} to the list of expressions to display
+each time your program stops.
+@end table
+
+@table @code
+@kindex delete display
+@kindex undisplay
+@item undisplay @var{dnums}@dots{}
+@itemx delete display @var{dnums}@dots{}
+Remove item numbers @var{dnums} from the list of expressions to display.
+
+@code{undisplay} does not repeat if you press @key{RET} after using it.
+(Otherwise you would just get the error @samp{No display number @dots{}}.)
+
+@kindex disable display
+@item disable display @var{dnums}@dots{}
+Disable the display of item numbers @var{dnums}. A disabled display
+item is not printed automatically, but is not forgotten. It may be
+enabled again later.
+
+@kindex enable display
+@item enable display @var{dnums}@dots{}
+Enable display of item numbers @var{dnums}. It becomes effective once
+again in auto display of its expression, until you specify otherwise.
+
+@item display
+Display the current values of the expressions on the list, just as is
+done when your program stops.
+
+@kindex info display
+@item info display
+Print the list of expressions previously set up to display
+automatically, each one with its item number, but without showing the
+values. This includes disabled expressions, which are marked as such.
+It also includes expressions which would not be displayed right now
+because they refer to automatic variables not currently available.
+@end table
+
+@node Controlling bashdb
+@section Controlling @DBG (@samp{set}, @samp{history})
+
+You can alter the way @BASH interacts with you by using the
+@code{set} command.
+
+@menu
+* Annotate:: Annotation Level (set annotate)
+* Prompt:: Prompt (set prompt, show prompt)
+* Editing:: Command editing (set editing, show editing)
+* Command Display:: Command display (set showcommand)
+* History:: Command history (history, !, H)
+@end menu
+
+@node Annotate
+@subsection Annotation Level (@samp{set annoatate})
+
+The annotation level controls how much information does @value{DBG}
+print together with its prompt, values of expressions, source lines,
+and other types of output. Level 0 is the normal, level 1 is for use
+when @value{DBG} is run as a subprocess of @sc{gnu} Emacs of @value{DDD},
+level 2 is the maximum annotation suitable for programs that control
+@value{DBGN}.
+
+@node Prompt
+@subsection Prompt (@samp{set prompt}, @samp{show prompt})
+
+@cindex prompt
+
+@value{dBGP} indicates its readiness to read a command by printing a
+string called the @dfn{prompt}. This string is normally:
+@example
+bashdb$@{_Dbg_less@}$@{#_Dbg_history[@@]@}$@{_Dbg_greater@}$_Dbg_space
+@end example
+
+When variables inside the the prompt string are evaluated, the above
+becomes something like @samp{bashdb<5>} if this is the fifth command
+executed or perhaps @samp{bashdb<<2>>} if you have called the debugger
+from inside a debugger session and this is the second command inside
+the debugger session or perhaps @samp{bashdb<(6)>} if you
+entered a subshell after the fifth command.
+
+You can change the prompt string with the @code{set prompt} command,
+although it is not normally advisable to do so without understanding
+the implications. If you are using the @value{DDD} GUI, it changes the
+changes the prompt and should not do so. In certain other
+circumstances (such as writing a GUI like @value{DDD}), it may be is useful
+to change the prompt.
+
+@emph{Note:} @code{set prompt} does not add a space for you after the
+prompt you set. This allows you to set a prompt which ends in a space
+or a prompt that does not. Furthermore due to a implementation
+limitation (resulting from a limitation of the bash built-in function
+``read''), to put a space at the end of the prompt use the
+@samp{$_Dbg_space} variable.
+
+@table @code
+@kindex set prompt
+@item set prompt @var{newprompt}
+Directs @value{DBG} to use @var{newprompt} as its prompt string
+henceforth.
+
+@emph{Warning: changing the prompt can @value{DDD}'s ability to
+understand when the debugger is waiting for input.}
+
+@kindex show prompt
+@item show prompt
+Prints a line of the form: @samp{bashdb's prompt is: @var{your-prompt}}
+@end table
+
+@node Editing
+@subsection Command editing (@samp{set editing}, @samp{show editing})
+@cindex readline
+@cindex command line editing
+
+@value{DBG} reads its input commands through bash which uses via the
+@dfn{readline} interface. This @sc{gnu} library provides consistent
+behavior for programs which provide a command line interface to the
+user. Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline
+editing of commands, @code{csh}-like history substitution, and a
+storage and recall of command history across debugging sessions.
+
+You may control the behavior of command line editing in @BASH with the
+command @code{set}.
+
+@table @code
+@kindex set editing
+@cindex editing
+@item set editing
+@itemx set editing on
+Enable command line editing (enabled by default).
+
+@item set editing off
+Disable command line editing.
+
+@kindex show editing
+@item show editing
+Show whether command line editing is enabled.
+@end table
+
+
+@node Command Display
+@subsection Command Display (@samp{set showcommand})
+
+The debugger normally lists the line number and source line of the for
+the statement to be next executed. Often this line contains one
+expression or one statement and it is clear from this line what's
+going to happen. However @BASH allows many expressions or
+statements to be put on a single source line; some lines
+contain several units of execution. Some examples of this
+behavior are listed below:
+
+@smallexample
+x=1; y=2; x=3
+(( x > 5 )) && x=5
+y=`echo *`
+@end smallexample
+
+In the first line of the example above, we have three assignment
+statements on a single line. In the second line of the example above
+we have a statement which gets run only if a condition tests true. And
+in the third line of the example above, we have a command that gets
+run and then the output of that is substituted in an assignemnt
+statement. If you were single stepping inside the debugger, each line
+might get listed more than once before each of the actions that might
+get performed. (In the case of the conditional statement, the
+line gets listed only once when the condition is false.)
+
+In order to assist understanding where you are, the enhanced version
+of @BASH maintains a dynamic variable @env{BASH_COMMAND} that
+contains piece of code next to be run (or is currently being run). The
+debugger has arranged to save this and can display this information
+or not. This is controlled by @code{set showcommand}.
+
+@table @code
+@kindex set showcommand
+@item set showcommand @r{[}auto | on | off @r{]}
+controls whether or not to show the saved @env{BASH_COMMAND} for the
+command next to be executed.
+@end table
+
+When the value is @code{auto} the following heuristic is used to
+determine whether or not to display the saved @env{BASH_COMMAND}. If
+the last time you stopped you were at the same place and the command
+string has changed, then show the command. When the value @code{on} is
+used, the debugger always shows @env{BASH_COMMAND} and when
+@code{off} is used, the debugger nevers shows
+@env{BASH_COMMAND}. Note that listing the text of the source line is
+independent of whether or not the command is also listed.
+
+Some examples:
+@smallexample
+set showcommand auto @b{This is the default}
+set showcommand on @b{Always show the next command to be executed}
+set showcommand off @b{Never show the next command to be executed}
+@end smallexample
+
+@node History
+@subsection Command history (@samp{H}, @samp{history}, @samp{!})
+
+@value{dBGP} can keep track of the commands you type during your
+debugging sessions, so that you can be certain of precisely what
+happened. If the prompt has not been changed (see @ref{Prompt,
+,Prompt}), the history number that will be in use next is by default
+listed in the debugger prompt. Invalid commands and history commands
+are not saved on the history stack.
+
+@table @code
+@kindex H @r{[}@var{start-number} @ovar{end-number}@r{]}
+@item H @r{[}@var{start-number} @ovar{end-number}@r{]}
+@item H @ovar{-count}
+@itemx !@r{[}-@r{]}@var{n}:p
+
+You can list what is in the history stack with @code{H}. Debugger
+commands in ths history stack are listed from most recent to least recent.
+If no @var{start-number} is given we start with the most recently
+executed command and end with the first entry in the history stack.
+If @var{start-number} is given, that history number is listed first. If
+@var{end-number} is given, that history number is listed last. If a
+single negative number is given list that many history commands.
+
+An alternate form is @code{!@emph{n}:p} or @code{!-@emph{n}:p} where
+@emph{n} is an integer. If a minus sign is used, @emph{n} is taken as
+the count to go back from the end rather than as a absolute history
+number. In contrast @code{H}, this form only prints a @emph{single}
+history item.
+
+Some examples:
+@smallexample
+H @b{List entire history}
+H -2 @b{List the last two history items}
+!-2:p @b{List a single history item starting at the same place as above}
+H 5 @b{List history from history number 5 to the begining (number 0)}
+H 5 0 @b{Same as above}
+H 5 3 @b{List history from history number 5 down to history number 3}
+!5:p @b{List a single history item 5}
+@end smallexample
+
+@kindex history @r{[}-@r{]}@r{[}@var{n}@r{]}
+@kindex !@r{[}-@r{]}@var{n} @r{(@code{history})}
+@item history @r{[}@r{[}-@r{]}@var{n}@r{]}
+@itemx !@r{[}-@r{]}@var{n}
+
+Use this command to reexecute a given history number. If no number is
+given, the last debugger command in the history is executed.
+
+An alternate form is @code{!@emph{n}} or @code{!-@emph{n}} where
+@emph{n} is an integer.
+
+If a minus sign is used in in either form, @emph{n} is taken as the
+count to go back from the end rather than as a absolute history
+number.
+
+@end table
+
+@ifset FINISHED
+Use these commands to manage the @value{DBGN} command
+history facility.
+
+@table @code
+@cindex history substitution
+@cindex history file
+@kindex set history filename
+@kindex GDBHISTFILE
+@item set history filename @var{fname}
+Set the name of the @BASH command history file to @var{fname}.
+This is the file where @BASH reads an initial command history
+list, and where it writes the command history from this session when it
+exits. You can access this list through history expansion or through
+the history command editing characters listed below. This file defaults
+to the value of the environment variable @code{GDBHISTFILE}, or to
+@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
+is not set.
+
+@cindex history save
+@kindex set history save
+@item set history save
+@itemx set history save on
+Record command history in a file, whose name may be specified with the
+@code{set history filename} command. By default, this option is disabled.
+
+@item set history save off
+Stop recording command history in a file.
+
+@cindex history size
+@kindex set history size
+@item set history size @var{size}
+Set the number of commands which @BASH keeps in its history list.
+This defaults to the value of the environment variable
+@code{HISTSIZE}, or to 256 if this variable is not set.
+@end table
+
+@cindex history expansion
+History expansion assigns special meaning to the character @kbd{!}.
+
+Since @kbd{!} is also the logical not operator in C, history expansion
+is off by default. If you decide to enable history expansion with the
+@code{set history expansion on} command, you may sometimes need to
+follow @kbd{!} (when it is used as logical not, in an expression) with
+a space or a tab to prevent it from being expanded. The readline
+history facilities do not attempt substitution on the strings
+@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
+
+The commands to control history expansion are:
+
+@table @code
+@kindex set history expansion
+@item set history expansion on
+@itemx set history expansion
+Enable history expansion. History expansion is off by default.
+
+@item set history expansion off
+Disable history expansion.
+
+The readline code comes with more complete documentation of
+editing and history expansion features. Users unfamiliar with @sc{gnu} Emacs
+or @code{vi} may wish to read it.
+
+@c @group
+@kindex show history
+@item show history
+@itemx show history filename
+@itemx show history save
+@itemx show history size
+@itemx show history expansion
+These commands display the state of the @BASH history parameters.
+@code{show history} by itself displays all four states.
+@c @end group
+@end table
+
+@table @code
+@kindex shows
+@item show commands
+Display the last ten commands in the command history.
+
+@item show commands @var{n}
+Print ten commands centered on command number @var{n}.
+
+@item show commands +
+Print ten commands just after the commands last printed.
+@end table
+@end ifset
+
+@node Front Ends
+@chapter Using @value{DBG} from a front-end user interface
+
+There are two front-ends available that can use @value{DBG} as a back-end
+debugger are @sc{gnu} Emacs and @value{DDD}.
+
+@menu
+* Emacs:: Using @value{DBG} from @sc{gnu} Emacs
+* DDD:: Using @value{DBG} from @value{DDD}
+@end menu
+
+
+@node Emacs
+@section Using @value{DBG} from @sc{gnu} Emacs
+
+@cindex Emacs
+@cindex @sc{gnu} Emacs
+A special interface allows you to use @sc{gnu} Emacs to view (and
+edit) the source files for the program you are debugging with
+@value{DBG}.
+
+To use this interface, use the command @kbd{M-x bashdb} in Emacs.
+Give the executable file you want to debug as an argument. This
+command starts @value{DBG} as a subprocess of Emacs, with input and
+output through a newly created Emacs buffer.
+
+Using @value{DBG} under Emacs is just like using @value{DBG}
+normally except for two things:
+
+@itemize @bullet
+@item
+All ``terminal'' input and output goes through the Emacs buffer.
+@end itemize
+
+This applies both to @value{DBG} commands and their output, and to the input
+and output done by the program you are debugging.
+
+This is useful because it means that you can copy the text of previous
+commands and input them again; you can even use parts of the output
+in this way.
+
+All the facilities of Emacs' Shell mode are available for interacting
+with your script. In particular, you can send signals the usual
+way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
+stop.
+
+@itemize @bullet
+@item
+@value{DBG} displays source code through Emacs.
+@end itemize
+
+Each time @value{DBG} displays a stack frame, Emacs automatically finds the
+source file for that frame and puts an arrow (@samp{=>}) at the
+left margin of the current line. Emacs uses a separate buffer for
+source display, and splits the screen to show both your @value{DBG} session
+and the source.
+
+Explicit @value{DBG} @code{list} or search commands still produce output as
+usual, but you probably have no reason to use them from Emacs.
+
+@quotation
+@emph{Warning:} If the directory where your script resides is not your
+current directory, it can be easy to confuse Emacs about the location of
+the source files, in which case the auxiliary display buffer does not
+appear to show your source. @value{DBG} can find programs by searching your
+environment's @code{PATH} variable, so the @value{DBG} input and output
+session proceeds normally; but Emacs does not get enough information
+back from @value{DBG} to locate the source files in this situation. To
+avoid this problem, either start @value{DBG} mode from the directory where
+your script resides, or specify an absolute file name when prompted for the
+@kbd{M-x gdb} argument.
+
+A similar confusion can result if you use the @value{DBG} @code{file} command to
+switch to debugging a program in some other location, from an existing
+@value{DBG} buffer in Emacs.
+@end quotation
+
+By default, @kbd{M-x bashdb} calls the @code{bash --debugger}. If you
+need to call @value{DBG} by a different name (for example, if you
+keep several configurations around, with different names) you can set
+the Emacs variable @code{gud-bashdb-command-name}; for example,
+
+@example
+(setq gud-bashdb-command-name "bash-debugger")
+@end example
+
+@noindent
+(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
+in your @file{.emacs} file) makes Emacs call the program named
+``@code{bash-debugger}'' instead.
+
+In the @value{DBG} I/O buffer, you can use these special Emacs commands in
+addition to the standard Shell mode commands:
+
+@table @kbd
+@item C-h m
+Describe the features of Emacs' @value{DBG} Mode.
+
+@item M-s
+Execute to another source line, like the @value{DBG} @code{step} command; also
+update the display window to show the current file and location.
+
+@item M-n
+Execute to next source line in this function, skipping all function
+calls, like the @value{DBG} @code{next} command. Then update the display window
+to show the current file and location.
+
+@item C-c C-f
+Execute until exit from the selected stack frame, like the @value{DBG}
+@code{finish} command.
+
+@item M-c
+Continue execution of your script, like the @value{DBG} @code{continue}
+command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
+
+@item M-u
+Go up the number of frames indicated by the numeric argument
+(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
+like the @value{DBG} @code{up} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
+
+@item M-d
+Go down the number of frames indicated by the numeric argument, like the
+@value{DBG} @code{down} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
+
+@item C-x &
+Read the number where the cursor is positioned, and insert it at the end
+of the @value{DBG} I/O buffer. For example, if you wish to disassemble code
+around an address that was displayed earlier, type @kbd{disassemble};
+then move the cursor to the address display, and pick up the
+argument for @code{disassemble} by typing @kbd{C-x &}.
+
+You can customize this further by defining elements of the list
+@code{gdb-print-command}; once it is defined, you can format or
+otherwise process numbers picked up by @kbd{C-x &} before they are
+inserted. A numeric argument to @kbd{C-x &} indicates that you
+wish special formatting, and also acts as an index to pick an element of the
+list. If the list element is a string, the number to be inserted is
+formatted using the Emacs function @code{format}; otherwise the number
+is passed as an argument to the corresponding list element.
+@end table
+
+In any source file, the Emacs command @kbd{C-x SPC} (@code{gud-break})
+tells @value{DBG} to set a breakpoint on the source line point is on.
+
+If you accidentally delete the source-display buffer, an easy way to get
+it back is to type the command @code{frame} in the @value{DBG} buffer, to
+request a frame display; when you run under Emacs, this recreates
+the source buffer if necessary to show you the context of the current
+frame.
+
+The source files displayed in Emacs are in ordinary Emacs buffers
+which are visiting the source files in the usual way. You can edit
+the files with these buffers if you wish; but keep in mind that @value{DBG}
+communicates with Emacs in terms of line numbers. If you add or
+delete lines from the text, the line numbers that @value{DBG} knows cease
+to correspond properly with the code.
+
+@node DDD
+@section Using @value{DBG} from @value{DDD}
+@cindex DDD
+
+@value{DBG} support is rather new in @value{DDD}. As a programming
+language, @value{DBG} is not feature rich: there are no record
+structures or hash tables (yet), no pointers, package variable scoping
+or methods. So much of the data display and visualization features of
+@value{DDD} are disabled.
+
+As with any scripting or interpreted language (e.g. Perl), one can't
+step by a single machine-language instruction. So the ddd Stepi/Nexti
+commands are disabled.
+
+Some @value{BASH} settings are essential for @value{DDD} to work
+correctly. These settings with their correct values are:
+
+@example
+set annotate 1
+set prompt set prompt bashdb$_Dbg_less$_Dbg_greater$_Dbg_space
+@end example
+
+@value{DDD} sets these values automatically when invoking
+@value{BASH}; if these values are changed, there may be some
+malfunctions.
+
+Pay special attention when the prompt has extra angle brackets (a
+nested shell) or has any parenthesis (is in a subshell). Quitting may
+merely exit out of one of these nested (sub)shells rather than leave
+the program.
+
+@node BASH Debugger Bugs
+@chapter Reporting Bugs
+@cindex bugs
+@cindex reporting bugs
+
+Your bug reports play an essential role in making the BASH debugger reliable.
+
+Reporting a bug may help you by bringing a solution to your problem, or it
+may not. But in any case the principal function of a bug report is to help
+the entire community by making the next version of @value{DBG} work better. Bug
+reports are your contribution to the maintenance of @value{DBG}.
+
+In order for a bug report to serve its purpose, you must include the
+information that enables us to fix the bug.
+
+@menu
+* Bug Criteria:: Have you found a bug?
+* Bug Reporting:: How to report bugs
+@end menu
+
+@node Bug Criteria
+@section Have you found a bug?
+@cindex bug criteria
+
+If you are not sure whether you have found a bug, here are some guidelines:
+
+@itemize @bullet
+@cindex fatal signal
+@cindex debugger crash
+@cindex crash of debugger
+@item
+If the debugger gets a fatal signal, for any input whatever, that is a
+@value{DBG} bug. Reliable debuggers never crash.
+
+@cindex error on valid input
+@item
+If @value{DBG} produces an error message for valid input, that is a
+bug. (Note that if you're cross debugging, the problem may also be
+somewhere in the connection to the target.)
+
+@cindex invalid input
+@item
+If @value{DBG} does not produce an error message for invalid input,
+that is a bug. However, you should note that your idea of
+``invalid input'' might be our idea of ``an extension'' or ``support
+for traditional practice''.
+
+@item
+If you are an experienced user of debugging tools, your suggestions
+for improvement of @value{DBG} are welcome in any case.
+@end itemize
+
+@node Bug Reporting
+@section How to report bugs
+@cindex bug reports
+@cindex BASH debugger bugs, reporting
+
+Submit bug reports for @value{DBG}. Until better mechanism is set up
+the prefered method is to submit them directly using
+@email{mailto:rocky@@panix.com}. There are also a bug tracking system
+and, help, developer and open discussion forums which can be found via
+@uref{http://http://sourceforge.net/forum/?group_id=37260}.
+
+Although this code shares a lot with BASH, the debugger is of course
+not yet supported by the BASH team, so if there is a debugger problem
+reporting it via bashbug or to @email{bug-bash@@gnu.org} or posted to
+the newsgroup @code{gnu.bash.bug} probably won't help, unless you are
+sure the bug resides in the vanilla bash code and and show that.
+
+The fundamental principle of reporting bugs usefully is this:
+@strong{report all the facts}. If you are not sure whether to state a
+fact or leave it out, state it!
+
+Often people omit facts because they think they know what causes the
+problem and assume that some details do not matter. Thus, you might
+assume that the name of the variable you use in an example does not matter.
+Well, probably it does not, but one cannot be sure. Perhaps the bug is a
+stray memory reference which happens to fetch from the location where that
+name is stored in memory; perhaps, if the name were different, the contents
+of that location would fool the debugger into doing the right thing despite
+the bug. Play it safe and give a specific, complete example. That is the
+easiest thing for you to do, and the most helpful.
+
+Keep in mind that the purpose of a bug report is to enable us to fix the
+bug. It may be that the bug has been reported previously, but neither
+you nor we can know that unless your bug report is complete and
+self-contained.
+
+Sometimes people give a few sketchy facts and ask, ``Does this ring a
+bell?'' Those bug reports are useless, and we urge everyone to
+@emph{refuse to respond to them} except to chide the sender to report
+bugs properly.
+
+To enable us to fix the bug, you should include all these things:
+
+@itemize @bullet
+@item
+The version of @value{DBG}. @value{DBG} announces it if you start
+with no arguments; you can also print it at any time using @code{version}
+command.
+
+Without this, we will not know whether there is any point in looking for
+the bug in the current version of @value{DBG}.
+
+@item
+The type of machine you are using, and the operating system name and
+version number.
+
+@item
+What compiler (and its version) was used to compile BASH---e.g.
+``@value{GCC}--3.1''.
+
+@item
+The command arguments you gave the compiler to compile your example and
+observe the bug. For example, did you use @samp{-O}? To guarantee
+you will not omit something important, list them all. A copy of the
+Makefile (or the output from make) is sufficient.
+
+If we were to try to guess the arguments, we would probably guess wrong
+and then we might not encounter the bug.
+
+@item
+A complete input script, and all necessary source files, that will
+reproduce the bug.
+
+@item
+A description of what behavior you observe that you believe is
+incorrect. For example, ``It gets a fatal signal.''
+
+Of course, if the bug is that @value{DBG} gets a fatal signal, then we
+will certainly notice it. But if the bug is incorrect output, we might
+not notice unless it is glaringly wrong. You might as well not give us
+a chance to make a mistake.
+
+Even if the problem you experience is a fatal signal, you should still
+say so explicitly. Suppose something strange is going on, such as, your
+copy of @value{DBG} is out of synch, or you have encountered a bug in
+the C library on your system. (This has happened!) Your copy might
+crash and ours would not. If you told us to expect a crash, then when
+ours fails to crash, we would know that the bug was not happening for
+us. If you had not told us to expect a crash, then we would not be able
+to draw any conclusion from our observations.
+
+@item
+If you wish to suggest changes to the @value{DBG} source, send us context
+diffs. If you even discuss something in the @value{DBG} source, refer to
+it by context, not by line number.
+
+The line numbers in our development sources will not match those in your
+sources. Your line numbers would convey no useful information to us.
+
+@end itemize
+
+Here are some things that are not necessary:
+
+@itemize @bullet
+@item
+A description of the envelope of the bug.
+
+Often people who encounter a bug spend a lot of time investigating
+which changes to the input file will make the bug go away and which
+changes will not affect it.
+
+This is often time consuming and not very useful, because the way we
+will find the bug is by running a single example under the debugger
+with breakpoints, not by pure deduction from a series of examples.
+We recommend that you save your time for something else.
+
+Of course, if you can find a simpler example to report @emph{instead}
+of the original one, that is a convenience for us. Errors in the
+output will be easier to spot, running under the debugger will take
+less time, and so on.
+
+However, simplification is not vital; if you do not want to do this,
+report the bug anyway and send us the entire test case you used.
+
+@item
+A patch for the bug.
+
+A patch for the bug does help us if it is a good one. But do not omit
+the necessary information, such as the test case, on the assumption that
+a patch is all we need. We might see problems with your patch and decide
+to fix the problem another way, or we might not understand it at all.
+
+Sometimes with a program as complicated as @value{DBG} it is very hard to
+construct an example that will make the program follow a certain path
+through the code. If you do not send us the example, we will not be able
+to construct one, so we will not be able to verify that the bug is fixed.
+
+And if we cannot understand what bug you are trying to fix, or why your
+patch should be an improvement, we will not install it. A test case will
+help us to understand.
+
+@item
+A guess about what the bug is or what it depends on.
+
+Such guesses are usually wrong. Even we cannot guess right about such
+things without first using the debugger to find the facts.
+@end itemize
+
+@node History and Acknowledgments
+@chapter History and Acknowledgments
+
+The suggestion for a debugger for a Bourne-like shell came from the book
+``Learning the Korn Shell'', by Bill Rosenblatt Copyright (C) 1993 by
+O'Reilly and Associates, Inc. Others such as Cigy Cyriac, Chet Ramey,
+Rocky Bernstein, and Gary V. Vaughan expanded and improved on that.
+
+However Bourne-Shell debuggers rely on a signal mechanism
+(@code{SIGDEBUG}) to call a debugger routine. In the Korn shell as
+well as @sc{bash} in versions prior to 2.05, there was a fundamental
+flaw: the routine that you registered in the trap, got called
+@emph{after} the statement was executed. It takes little imagination
+to realize that this is a bit too late to find and correct errors,
+especially if the offending command happens to do serious damage like
+remove filesystems or reboot a server. As a horrible hack, these
+debuggers added one to the line number that was just executed on the
+wishful thinking that this would then be the line of next statement to
+execute. Sometimes this was correct, but it was too often wrong, such
+as in loops and conditionals, comments, or commands that are continued
+on the next line.
+
+Another failing of these debuggers was the inability to debug into
+functions or into sourced files, provide a stack trace, dynamically
+skip a statement to be run, unconditionally trace into a function, or
+stop when a subroutine or a sourced file completed. In truth, the crux
+of the problem lay in debugging support in BASH. Given that there was
+limited bash debugging support, it is not surprising that these
+debuggers could not do any of the things listed above and could debug
+only a single source file: lines could be listed only from a single
+text, breakpoints were set into the text which was in fact a copy of
+the script name prepended with debugger routines.
+
+In version 2.04 of BASH, Rocky Bernstein started hacking on BASH to
+add call-stack information, source file information, allow for
+debugging into functions and for reporting line numbers in functions
+as relative to the file rather than the beginning of a function whose
+origin line number was not accessible from BASH. He started changing
+the user commands in bashdb to be like other more-advanced debuggers,
+in particular @code{perl5db} and @code{gdb}. However he gave up on
+this project when realizing that stopping before a line was crucial. A
+patch for this was nontrivial and wildly changed
+semantics. Furthermore the chance of getting his other patches into
+BASH was was not going to happen in version 2.04.
+
+In version 2.05, the fundamental necessary change to the semantics of
+@code{SIGDEBUG} trap handling (suggested at least two years earlier)
+was made. Also, version 2.05 changed the line-number reporting in a
+function to be relative to the beginning of the file rather than the
+beginning of a function---sometimes. Rocky then picked up where he
+left off and this then became this debugger. A complete rewrite of the
+debugger, some of which started in 2.04 was undertaken. Debugger
+internals were changed to support multiple file names, save and
+restore the calling environment (such as variables @code{$1} and
+@code{$?}) and install debugger signal handlers. Work was also done on
+the BASH in conjunction with the debugger to save stack trace
+information, provide a means for stopping after a routine finished and
+so on. And a number of changes were made to BASH just to improve the
+accuracy of the line number reporting which is crucial in a debugger.
+
+This documentation was modified from the GNU Debugger (GDB) Reference
+manual.
+
+@quotation
+Additions to this section are particularly welcome. If you or your
+friends (or enemies, to be evenhanded) have been unfairly omitted from
+this list, we would like to add your names!
+@end quotation
+
+The following have contributed directly or indrectly to bashdb:
+
+Rocky Bernstein (initial full-featured bashdb with stack tracing and
+multi-file support)
+
+Masatake YAMATO (help to merge Rocky's hack to the official bash source tree)
+
+Bill Rosenblatt (kshdb),
+Michael Loukides (kshdb),
+Cigy Cyriac (proto bashdb),
+Chet Ramey (proto bashdb),
+and
+Gary V. Vaughan (proto bashdb).
+
+Authors of per5ldb:
+
+Ray Lischner,
+Johan Vromans,
+and
+Ilya Zakharevich.
+
+Authors of GDB:
+
+Richard Stallman,
+Andrew Cagney,
+Jim Blandy,
+Jason Molenda,
+Stan Shebs,
+Fred Fish,
+Stu Grossman,
+John Gilmore,
+Jim Kingdon,
+and
+Randy Smith (to name just a few).
+
+Authors of GUD:
+
+Eric S. Raymond.
+
+@c The readline documentation is distributed with the readline code
+@c and consists of the two following files:
+@c rluser.texinfo
+@c inc-hist.texinfo
+@c Use -I with makeinfo to point to the appropriate directory,
+@c environment var TEXINPUTS with TeX.
+@c @include rluser.texinfo
+@c @include hsuser.texinfo
+
+
+@node Formatting Documentation
+@appendix Formatting Documentation
+
+@ifset FINISHED
+@cindex @value{DBG} reference card
+@cindex reference card
+The @value{DBG} 4 release includes an already-formatted reference card, ready
+for printing with PostScript or Ghostscript, in the @file{gdb}
+subdirectory of the main source directory@footnote{In
+@file{gdb-@value{BASHRELEASE}/gdb/refcard.ps} of the version @value{BASHRELEASE}
+release.}. If you can use PostScript or Ghostscript with your printer,
+you can print the reference card immediately with @file{refcard.ps}.
+
+The release also includes the source for the reference card. You
+can format it, using @TeX{}, by typing:
+
+@example
+make refcard.dvi
+@end example
+
+The @value{DBG} reference card is designed to print in @dfn{landscape}
+mode on US ``letter'' size paper;
+that is, on a sheet 11 inches wide by 8.5 inches
+high. You will need to specify this form of printing as an option to
+your @sc{dvi} output program.
+
+@cindex documentation
+
+All the documentation for @value{DBG} comes as part of the machine-readable
+distribution. The documentation is written in Texinfo format, which is
+a documentation system that uses a single source file to produce both
+on-line information and a printed manual. You can use one of the Info
+formatting commands to create the on-line version of the documentation
+and @TeX{} (or @code{texi2roff}) to typeset the printed version.
+
+@value{DBG} includes an already formatted copy of the on-line Info
+version of this manual in the @file{gdb} subdirectory. The main Info
+file is @file{gdb-@value{BASHRELEASE}/gdb/gdb.info}, and it refers to
+subordinate files matching @samp{gdb.info*} in the same directory. If
+necessary, you can print out these files, or read them with any editor;
+but they are easier to read using the @code{info} subsystem in @sc{gnu}
+Emacs or the standalone @code{info} program, available as part of the
+@sc{gnu} Texinfo distribution.
+
+If you want to format these Info files yourself, you need one of the
+Info formatting programs, such as @code{texinfo-format-buffer} or
+@code{makeinfo}.
+
+If you have @code{makeinfo} installed, and are in the top level
+@value{DBG} source directory (@file{gdb-@value{BASHRELEASE}}, in the case of
+version @value{BASHRELEASE}), you can make the Info file by typing:
+
+@example
+cd gdb
+make gdb.info
+@end example
+
+If you want to typeset and print copies of this manual, you need @TeX{},
+a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
+Texinfo definitions file.
+
+@TeX{} is a typesetting program; it does not print files directly, but
+produces output files called @sc{dvi} files. To print a typeset
+document, you need a program to print @sc{dvi} files. If your system
+has @TeX{} installed, chances are it has such a program. The precise
+command to use depends on your system; @kbd{lpr -d} is common; another
+(for PostScript devices) is @kbd{dvips}. The @sc{dvi} print command may
+require a file name without any extension or a @samp{.dvi} extension.
+
+@TeX{} also requires a macro definitions file called
+@file{texinfo.tex}. This file tells @TeX{} how to typeset a document
+written in Texinfo format. On its own, @TeX{} cannot either read or
+typeset a Texinfo file. @file{texinfo.tex} is distributed with GDB
+and is located in the @file{gdb-@var{version-number}/texinfo}
+directory.
+
+If you have @TeX{} and a @sc{dvi} printer program installed, you can
+typeset and print this manual. First switch to the the @file{gdb}
+subdirectory of the main source directory (for example, to
+@file{gdb-@value{BASHRELEASE}/gdb}) and type:
+
+@example
+make gdb.dvi
+@end example
+
+Then give @file{gdb.dvi} to your @sc{dvi} printing program.
+@end ifset
+
+@node Installing bashdb
+@appendix Installing @value{DBG}
+@cindex configuring @value{DBG}
+@cindex installation
+
+@ifset FINISHED
+@value{DBG} comes with a @code{configure} script that automates the process
+of preparing @value{DBG} for installation; you can then use @code{make} to
+build the @code{gdb} program.
+@iftex
+@c irrelevant in info file; it's as current as the code it lives with.
+@footnote{If you have a more recent version of @value{DBG} than @value{BASHRELEASE},
+look at the @file{README} file in the sources; we may have improved the
+installation procedures since publishing this manual.}
+@end iftex
+
+The @value{DBG} distribution includes all the source code you need for
+@value{DBG} in a single directory, whose name is usually composed by
+appending the version number to @samp{gdb}.
+
+For example, the @value{DBG} version @value{BASHRELEASE} distribution is in the
+@file{gdb-@value{BASHRELEASE}} directory. That directory contains:
+
+@table @code
+@item gdb-@value{BASHRELEASE}/configure @r{(and supporting files)}
+script for configuring @value{DBG} and all its supporting libraries
+
+@item gdb-@value{BASHRELEASE}/gdb
+the source specific to @value{DBG} itself
+
+@item gdb-@value{BASHRELEASE}/bfd
+source for the Binary File Descriptor library
+
+@item gdb-@value{BASHRELEASE}/include
+@sc{gnu} include files
+
+@item gdb-@value{BASHRELEASE}/libiberty
+source for the @samp{-liberty} free software library
+
+@item gdb-@value{BASHRELEASE}/opcodes
+source for the library of opcode tables and disassemblers
+
+@item gdb-@value{BASHRELEASE}/readline
+source for the @sc{gnu} command-line interface
+
+@item gdb-@value{BASHRELEASE}/glob
+source for the @sc{gnu} filename pattern-matching subroutine
+
+@item gdb-@value{BASHRELEASE}/mmalloc
+source for the @sc{gnu} memory-mapped malloc package
+@end table
+
+The simplest way to configure and build @value{DBG} is to run @code{configure}
+from the @file{gdb-@var{version-number}} source directory, which in
+this example is the @file{gdb-@value{BASHRELEASE}} directory.
+
+First switch to the @file{gdb-@var{version-number}} source directory
+if you are not already in it; then run @code{configure}. Pass the
+identifier for the platform on which @value{DBG} will run as an
+argument.
+
+For example:
+
+@example
+cd gdb-@value{BASHRELEASE}
+./configure @var{host}
+make
+@end example
+
+@noindent
+where @var{host} is an identifier such as @samp{sun4} or
+@samp{decstation}, that identifies the platform where @value{DBG} will run.
+(You can often leave off @var{host}; @code{configure} tries to guess the
+correct value by examining your system.)
+
+Running @samp{configure @var{host}} and then running @code{make} builds the
+@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
+libraries, then @code{gdb} itself. The configured source files, and the
+binaries, are left in the corresponding source directories.
+
+@need 750
+@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
+system does not recognize this automatically when you run a different
+shell, you may need to run @code{sh} on it explicitly:
+
+@example
+sh configure @var{host}
+@end example
+
+If you run @code{configure} from a directory that contains source
+directories for multiple libraries or programs, such as the
+@file{gdb-@value{BASHRELEASE}} source directory for version @value{BASHRELEASE}, @code{configure}
+creates configuration files for every directory level underneath (unless
+you tell it not to, with the @samp{--norecursion} option).
+
+You can run the @code{configure} script from any of the
+subordinate directories in the @value{DBG} distribution if you only want to
+configure that subdirectory, but be sure to specify a path to it.
+
+For example, with version @value{BASHRELEASE}, type the following to configure only
+the @code{bfd} subdirectory:
+
+@example
+@group
+cd gdb-@value{BASHRELEASE}/bfd
+../configure @var{host}
+@end group
+@end example
+
+You can install @code{@value{DBG}} anywhere; it has no hardwired paths.
+However, you should make sure that the shell on your path (named by
+the @samp{SHELL} environment variable) is publicly readable. Remember
+that @value{DBG} uses the shell to start your script---some systems refuse to
+let @value{DBG} debug child processes whose programs are not readable.
+
+@menu
+* Separate Objdir:: Compiling @value{DBG} in another directory
+* Config Names:: Specifying names for hosts and targets
+* Configure Options:: Summary of options for configure
+@end menu
+
+@node Separate Objdir
+@section Compiling @value{DBG} in another directory
+
+If you want to run @value{DBG} versions for several host or target machines,
+you need a different @code{gdb} compiled for each combination of
+host and target. @code{configure} is designed to make this easy by
+allowing you to generate each configuration in a separate subdirectory,
+rather than in the source directory. If your @code{make} program
+handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
+@code{make} in each of these directories builds the @code{gdb}
+program specified there.
+
+To build @code{gdb} in a separate directory, run @code{configure}
+with the @samp{--srcdir} option to specify where to find the source.
+(You also need to specify a path to find @code{configure}
+itself from your working directory. If the path to @code{configure}
+would be the same as the argument to @samp{--srcdir}, you can leave out
+the @samp{--srcdir} option; it is assumed.)
+
+For example, with version @value{BASHRELEASE}, you can build @value{DBG} in a
+separate directory for a Sun 4 like this:
+
+@example
+@group
+cd gdb-@value{BASHRELEASE}
+mkdir ../gdb-sun4
+cd ../gdb-sun4
+../gdb-@value{BASHRELEASE}/configure sun4
+make
+@end group
+@end example
+
+When @code{configure} builds a configuration using a remote source
+directory, it creates a tree for the binaries with the same structure
+(and using the same names) as the tree under the source directory. In
+the example, you'd find the Sun 4 library @file{libiberty.a} in the
+directory @file{gdb-sun4/libiberty}, and @value{DBG} itself in
+@file{gdb-sun4/gdb}.
+
+One popular reason to build several @value{DBG} configurations in separate
+directories is to configure @value{DBG} for cross-compiling (where
+@value{DBG} runs on one machine---the @dfn{host}---while debugging
+programs that run on another machine---the @dfn{target}).
+You specify a cross-debugging target by
+giving the @samp{--target=@var{target}} option to @code{configure}.
+
+When you run @code{make} to build a program or library, you must run
+it in a configured directory---whatever directory you were in when you
+called @code{configure} (or one of its subdirectories).
+
+The @code{Makefile} that @code{configure} generates in each source
+directory also runs recursively. If you type @code{make} in a source
+directory such as @file{gdb-@value{BASHRELEASE}} (or in a separate configured
+directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{BASHRELEASE}}), you
+will build all the required libraries, and then build GDB.
+
+When you have multiple hosts or targets configured in separate
+directories, you can run @code{make} on them in parallel (for example,
+if they are NFS-mounted on each of the hosts); they will not interfere
+with each other.
+
+@node Config Names
+@section Specifying names for hosts and targets
+
+The specifications used for hosts and targets in the @code{configure}
+script are based on a three-part naming scheme, but some short predefined
+aliases are also supported. The full naming scheme encodes three pieces
+of information in the following pattern:
+
+@example
+@var{architecture}-@var{vendor}-@var{os}
+@end example
+
+For example, you can use the alias @code{sun4} as a @var{host} argument,
+or as the value for @var{target} in a @code{--target=@var{target}}
+option. The equivalent full name is @samp{sparc-sun-sunos4}.
+
+The @code{configure} script accompanying @value{DBG} does not provide
+any query facility to list all supported host and target names or
+aliases. @code{configure} calls the Bourne shell script
+@code{config.sub} to map abbreviations to full names; you can read the
+script, if you wish, or you can use it to test your guesses on
+abbreviations---for example:
+
+@smallexample
+% sh config.sub i386-linux
+i386-pc-linux-gnu
+% sh config.sub alpha-linux
+alpha-unknown-linux-gnu
+% sh config.sub hp9k700
+hppa1.1-hp-hpux
+% sh config.sub sun4
+sparc-sun-sunos4.1.1
+% sh config.sub sun3
+m68k-sun-sunos4.1.1
+% sh config.sub i986v
+Invalid configuration `i986v': machine `i986v' not recognized
+@end smallexample
+
+@noindent
+@code{config.sub} is also distributed in the @value{DBG} source
+directory (@file{gdb-@value{BASHRELEASE}}, for version @value{BASHRELEASE}).
+
+@node Configure Options
+@section @code{configure} options
+
+Here is a summary of the @code{configure} options and arguments that
+are most often useful for building @value{DBG}. @code{configure} also has
+several other options not listed here. @inforef{What Configure
+Does,,configure.info}, for a full explanation of @code{configure}.
+
+@example
+configure @r{[}--help@r{]}
+ @r{[}--prefix=@var{dir}@r{]}
+ @r{[}--exec-prefix=@var{dir}@r{]}
+ @r{[}--srcdir=@var{dirname}@r{]}
+ @r{[}--norecursion@r{]} @r{[}--rm@r{]}
+ @r{[}--target=@var{target}@r{]}
+ @var{host}
+@end example
+
+@noindent
+You may introduce options with a single @samp{-} rather than
+@samp{--} if you prefer; but you may abbreviate option names if you use
+@samp{--}.
+
+@table @code
+@item --help
+Display a quick summary of how to invoke @code{configure}.
+
+@item --prefix=@var{dir}
+Configure the source to install programs and files under directory
+@file{@var{dir}}.
+
+@item --exec-prefix=@var{dir}
+Configure the source to install programs under directory
+@file{@var{dir}}.
+
+@c avoid splitting the warning from the explanation:
+@need 2000
+@item --srcdir=@var{dirname}
+@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
+@code{make} that implements the @code{VPATH} feature.}@*
+Use this option to make configurations in directories separate from the
+@value{DBG} source directories. Among other things, you can use this to
+build (or maintain) several configurations simultaneously, in separate
+directories. @code{configure} writes configuration specific files in
+the current directory, but arranges for them to use the source in the
+directory @var{dirname}. @code{configure} creates directories under
+the working directory in parallel to the source directories below
+@var{dirname}.
+
+@item --norecursion
+Configure only the directory level where @code{configure} is executed; do not
+propagate configuration to subdirectories.
+
+@item --target=@var{target}
+Configure @value{DBG} for cross-debugging programs running on the specified
+@var{target}. Without this option, @value{DBG} is configured to debug
+programs that run on the same machine (@var{host}) as @value{DBG} itself.
+
+There is no convenient way to generate a list of all available targets.
+
+@item @var{host} @dots{}
+Configure @value{DBG} to run on the specified @var{host}.
+
+There is no convenient way to generate a list of all available hosts.
+@end table
+
+There are many other options available as well, but they are generally
+needed for special purposes only.
+@end ifset
+
+@include gpl.texi
+
+@include fdl.texi
+
+@node Function Index
+@unnumbered Function Index
+@printindex fn
+
+@node Command Index
+@unnumbered Command Index
+@printindex ky
+
+@node Variable Index
+@unnumbered Variable Index
+@printindex vr
+
+@node General Index
+@unnumbered General Index
+@printindex cp
+
+@tex
+% I think something like @colophon should be in texinfo. In the
+% meantime:
+\long\def\colophon{\hbox to0pt{}\vfill
+\centerline{The body of this manual is set in}
+\centerline{\fontname\tenrm,}
+\centerline{with headings in {\bf\fontname\tenbf}}
+\centerline{and examples in {\tt\fontname\tentt}.}
+\centerline{{\it\fontname\tenit\/},}
+\centerline{{\bf\fontname\tenbf}, and}
+\centerline{{\sl\fontname\tensl\/}}
+\centerline{are used for emphasis.}\vfill}
+\page\colophon
+% Blame: doc@cygnus.com, 1991.
+@end tex
+
+@bye
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/fdl.texi cvs/debugger/doc/fdl.texi
--- bash-2.05b/debugger/doc/fdl.texi 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/fdl.texi 2003-06-01 16:35:16.000000000 +0200
@@ -0,0 +1,368 @@
+@c -*-texinfo-*-
+@node GNU Free Documentation License
+
+@appendix GNU Free Documentation License
+@center Version 1.1, March 2000
+
+@display
+Copyright (C) 2000 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+@sp 1
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document ``free'' in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@sp 1
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The ``Document'', below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as ``you.''
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not ``Transparent'' is called ``Opaque.''
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+@sp 1
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+@sp 1
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+@sp 1
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.@*
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).@*
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.@*
+D. Preserve all the copyright notices of the Document.@*
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.@*
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.@*
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.@*
+H. Include an unaltered copy of this License.@*
+I. Preserve the section entitled ``History'', and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled ``History'' in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.@*
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the ``History'' section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.@*
+K. In any section entitled ``Acknowledgements'' or ``Dedications'',
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.@*
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.@*
+M. Delete any section entitled ``Endorsements.'' Such a section
+ may not be included in the Modified Version.@*
+N. Do not retitle any existing section as ``Endorsements''
+ or to conflict in title with any Invariant Section.@*
+@sp 1
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+@sp 1
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled ``History''
+in the various original documents, forming one section entitled
+``History''; likewise combine any sections entitled ``Acknowledgements'',
+and any sections entitled ``Dedications.'' You must delete all sections
+entitled ``Endorsements.''
+@sp 1
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+@sp 1
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an ``aggregate'', and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+@sp 1
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+@sp 1
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+@sp 1
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+@end enumerate
+
+@unnumberedsec ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+Copyright (C) @var{year} @var{your name}.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with the Invariant Sections being @var{list their titles}, with the
+Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License."
+@end group
+@end smallexample
+
+If you have no Invariant Sections, write ``with no Invariant Sections''
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write ``no Front-Cover Texts'' instead of
+``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/gpl.texi cvs/debugger/doc/gpl.texi
--- bash-2.05b/debugger/doc/gpl.texi 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/gpl.texi 2003-06-01 16:31:17.000000000 +0200
@@ -0,0 +1,409 @@
+@ignore
+@c Set file name and title for man page.
+@setfilename gpl
+@settitle GNU General Public License
+@c man begin SEEALSO
+gfdl(7), fsf-funding(7).
+@c man end
+@c man begin COPYRIGHT
+Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@c man end
+@end ignore
+@node Copying
+@c man begin DESCRIPTION
+@appendix GNU GENERAL PUBLIC LICENSE
+@center Version 2, June 1991
+
+@display
+Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@unnumberedsec Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software---to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+@iftex
+@unnumberedsec TERMS AND CONDITIONS FOR COPYING,@*DISTRIBUTION AND MODIFICATION
+@end iftex
+@ifnottex
+@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+@end ifnottex
+
+@enumerate 0
+@item
+This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The ``Program'', below,
+refers to any such program or work, and a ``work based on the Program''
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term ``modification''.) Each licensee is addressed as ``you''.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+@item
+You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+@item
+You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+@enumerate a
+@item
+You must cause the modified files to carry prominent notices
+stating that you changed the files and the date of any change.
+
+@item
+You must cause any work that you distribute or publish, that in
+whole or in part contains or is derived from the Program or any
+part thereof, to be licensed as a whole at no charge to all third
+parties under the terms of this License.
+
+@item
+If the modified program normally reads commands interactively
+when run, you must cause it, when started running for such
+interactive use in the most ordinary way, to print or display an
+announcement including an appropriate copyright notice and a
+notice that there is no warranty (or else, saying that you provide
+a warranty) and that users may redistribute the program under
+these conditions, and telling the user how to view a copy of this
+License. (Exception: if the Program itself is interactive but
+does not normally print such an announcement, your work based on
+the Program is not required to print an announcement.)
+@end enumerate
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+@item
+You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+@enumerate a
+@item
+Accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of Sections
+1 and 2 above on a medium customarily used for software interchange; or,
+
+@item
+Accompany it with a written offer, valid for at least three
+years, to give any third party, for a charge no more than your
+cost of physically performing source distribution, a complete
+machine-readable copy of the corresponding source code, to be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+@item
+Accompany it with the information you received as to the offer
+to distribute corresponding source code. (This alternative is
+allowed only for noncommercial distribution and only if you
+received the program in object code or executable form with such
+an offer, in accord with Subsection b above.)
+@end enumerate
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+@item
+You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+@item
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+@item
+Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+@item
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+@item
+If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+@item
+The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and ``any
+later version'', you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+@item
+If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+@iftex
+@heading NO WARRANTY
+@end iftex
+@ifnottex
+@center NO WARRANTY
+@end ifnottex
+
+@item
+BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+@item
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+@end enumerate
+
+@iftex
+@heading END OF TERMS AND CONDITIONS
+@end iftex
+@ifnottex
+@center END OF TERMS AND CONDITIONS
+@end ifnottex
+
+@page
+@unnumberedsec How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the ``copyright'' line and a pointer to where the full notice is found.
+
+@smallexample
+@var{one line to give the program's name and a brief idea of what it does.}
+Copyright (C) @var{year} @var{name of author}
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+@end smallexample
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+@smallexample
+Gnomovision version 69, Copyright (C) @var{year} @var{name of author}
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+@end smallexample
+
+The hypothetical commands @samp{show w} and @samp{show c} should show
+the appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than @samp{show w} and
+@samp{show c}; they could even be mouse-clicks or menu items---whatever
+suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a ``copyright disclaimer'' for the program, if
+necessary. Here is a sample; alter the names:
+
+@smallexample
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+`Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+@var{signature of Ty Coon}, 1 April 1989
+Ty Coon, President of Vice
+@end smallexample
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+@c man end
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/doc/version.texi.in cvs/debugger/doc/version.texi.in
--- bash-2.05b/debugger/doc/version.texi.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/doc/version.texi.in 2003-06-01 16:31:17.000000000 +0200
@@ -0,0 +1,9 @@
+@c $Id: version.texi.in,v 1.1 2003/06/01 14:31:17 rockyb Exp $
+@c This file has version things that change periodically
+@c we use it so that we don't have to muck with the main texinfo file.
+
+@c The name of this bash debugger release: e.g. 2.05b-debugger-0.33
+@set VERSION @BASHVERS@
+@set BASHRELEASE @BASHVERS@-@RELSTATUS@
+@set UPDATED-MONTH April 2002
+@set EDITION @BASHVERS@ @RELSTATUS@
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/emacs/Makefile.am cvs/debugger/emacs/Makefile.am
--- bash-2.05b/debugger/emacs/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/emacs/Makefile.am 2003-08-11 11:59:27.000000000 +0200
@@ -0,0 +1,22 @@
+# Copyright (C) 2002, 2003 Rocky Bernstein rocky@panix.com
+#
+# Bash is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# Bash is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with Bash; see the file COPYING. If not, write to the Free Software
+# Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
+#$Id: Makefile.am,v 1.1 2003/08/11 09:59:27 rockyb Exp $
+
+EXTRA_DIST = bashdb.el
+ELCFILES =
+if INSTALL_EMACS_LISP
+lisp_LISP = bashdb.el
+endif
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/emacs/bashdb.el cvs/debugger/emacs/bashdb.el
--- bash-2.05b/debugger/emacs/bashdb.el 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/emacs/bashdb.el 2002-11-23 02:57:40.000000000 +0100
@@ -0,0 +1,176 @@
+;;; bashdb.el --- BASH Debugger mode via GUD and bashdb
+;;; $Id: bashdb.el,v 1.2 2002/11/23 01:57:40 rockyb Exp $
+
+;; Copyright (C) 2002 Rocky Bernstein (rocky@panix.com)
+;; and Masatake YAMATO (jet@gyve.org)
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;; Commentary:
+;; 1. Add
+;;
+;; (autoload 'bashdb "bashdb" "BASH Debugger mode via GUD and bashdb" t)
+;;
+;; to your .emacs file.
+;; 2. Do M-x bashdb
+
+;; Codes:
+(require 'gud)
+;; ======================================================================
+;; bashdb functions
+
+;;; History of argument lists passed to bashdb.
+(defvar gud-bashdb-history nil)
+
+;; Convert a command line as would be typed normally to run a script
+;; into one that invokes an Emacs-enabled debugging session.
+;; "--debugger" in inserted as the first switch.
+
+(defun gud-bashdb-massage-args (file args)
+ (let* ((new-args (list "--debugger"))
+ (seen-e nil)
+ (shift (lambda ()
+ (setq new-args (cons (car args) new-args))
+ (setq args (cdr args)))))
+
+ ;; Pass all switches and -e scripts through.
+ (while (and args
+ (string-match "^-" (car args))
+ (not (equal "-" (car args)))
+ (not (equal "--" (car args))))
+ (funcall shift))
+
+ (if (or (not args)
+ (string-match "^-" (car args)))
+ (error "Can't use stdin as the script to debug"))
+ ;; This is the program name.
+ (funcall shift)
+
+ (while args
+ (funcall shift))
+
+ (nreverse new-args)))
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(defun gud-bashdb-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ ;; Format of line looks like this:
+ ;; (/etc/init.d/ntp.init:16):
+ ;; but we also allow DOS drive letters
+ ;; (d:/etc/init.d/ntp.init:16):
+ (while (string-match "\\(^\\|\n\\)(\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\)):.*\n"
+ gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (cons (substring gud-marker-acc (match-beginning 2) (match-end 2))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 4)
+ (match-end 4))))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "\032.*\\'" gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+(defun gud-bashdb-find-file (f)
+ (save-excursion
+ (let ((buf (find-file-noselect f 'nowarn)))
+ (set-buffer buf)
+ buf)))
+
+(defcustom gud-bashdb-command-name "bash"
+ "File name for executing bash debugger."
+ :type 'string
+ :group 'gud)
+
+;;;###autoload
+(defun bashdb (command-line)
+ "Run bashdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive
+ (list (read-from-minibuffer "Run bashdb (like this): "
+ (if (consp gud-bashdb-history)
+ (car gud-bashdb-history)
+ (concat gud-bashdb-command-name
+ " "))
+ gud-minibuffer-local-map nil
+ '(gud-bashdb-history . 1))))
+
+ (gud-common-init command-line 'gud-bashdb-massage-args
+ 'gud-bashdb-marker-filter 'gud-bashdb-find-file)
+
+ (set (make-local-variable 'gud-minor-mode) 'bashdb)
+
+ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-tbreak "tbreak %l" "\C-t" "Set temporary breakpoint at current line.")
+ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
+ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
+ (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
+ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
+ (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
+ (gud-def gud-print "pe %e" "\C-p" "Evaluate bash expression at point.")
+
+ ;; Is this right?
+ (gud-def gud-statement "eval %e" "\C-e" "Execute Bash statement at point.")
+
+ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
+ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+
+ (setq comint-prompt-regexp "^bashdb<+(*[0-9]*)*>+ ")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'bashdb-mode-hook)
+ )
+
+(provide 'bashdb)
+;;; bashdb.el ends here
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/emacs/gud.el cvs/debugger/emacs/gud.el
--- bash-2.05b/debugger/emacs/gud.el 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/emacs/gud.el 2002-12-10 07:05:53.000000000 +0100
@@ -0,0 +1,2649 @@
+;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers
+
+;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Maintainer: FSF
+;; Keywords: unix, tools
+
+;; Copyright (C) 1992, 93, 94, 95, 96, 1998, 2000, 2002 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu>
+;; It was later rewritten by rms. Some ideas were due to Masanobu.
+;; Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com>
+;; The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>,
+;; who also hacked the mode to use comint.el. Shane Hartman <shane@spr.com>
+;; added support for xdb (HPUX debugger). Rick Sladkey <jrs@world.std.com>
+;; wrote the GDB command completion code. Dave Love <d.love@dl.ac.uk>
+;; added the IRIX kluge, re-implemented the Mips-ish variant and added
+;; a menu. Brian D. Carlstrom <bdc@ai.mit.edu> combined the IRIX kluge with
+;; the gud-xdb-directories hack producing gud-dbx-directories. Derek L. Davies
+;; <ddavies@world.std.com> added support for jdb (Java debugger.)
+
+;;; Code:
+
+(require 'comint)
+(require 'etags)
+
+;; ======================================================================
+;; GUD commands must be visible in C buffers visited by GUD
+
+(defgroup gud nil
+ "Grand Unified Debugger mode for gdb and other debuggers under Emacs.
+Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb, and bash."
+ :group 'unix
+ :group 'tools)
+
+
+(defcustom gud-key-prefix "\C-x\C-a"
+ "Prefix of all GUD commands valid in C buffers."
+ :type 'string
+ :group 'gud)
+
+(global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh)
+(define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack
+
+(defvar gud-marker-filter nil)
+(put 'gud-marker-filter 'permanent-local t)
+(defvar gud-find-file nil)
+(put 'gud-find-file 'permanent-local t)
+
+(defun gud-marker-filter (&rest args)
+ (apply gud-marker-filter args))
+
+(defvar gud-minor-mode nil)
+(put 'gud-minor-mode 'permanent-local t)
+
+(defun gud-symbol (sym &optional soft minor-mode)
+ "Return the symbol used for SYM in MINOR-MODE.
+MINOR-MODE defaults to `gud-minor-mode.
+The symbol returned is `gud-<MINOR-MODE>-<SYM>'.
+If SOFT is non-nil, returns nil if the symbol doesn't already exist."
+ (unless (or minor-mode gud-minor-mode) (error "Gud internal error"))
+ (funcall (if soft 'intern-soft 'intern)
+ (format "gud-%s-%s" (or minor-mode gud-minor-mode) sym)))
+
+(defun gud-val (sym &optional minor-mode)
+ "Return the value of `gud-symbol' SYM. Default to nil."
+ (let ((sym (gud-symbol sym t minor-mode)))
+ (if (boundp sym) (symbol-value sym))))
+
+(defun gud-find-file (file)
+ ;; Don't get confused by double slashes in the name that comes from GDB.
+ (while (string-match "//+" file)
+ (setq file (replace-match "/" t t file)))
+ (let ((minor-mode gud-minor-mode)
+ (buf (funcall gud-find-file file)))
+ (when buf
+ ;; Copy `gud-minor-mode' to the found buffer to turn on the menu.
+ (with-current-buffer buf
+ (set (make-local-variable 'gud-minor-mode) minor-mode))
+ buf)))
+
+(easy-mmode-defmap gud-menu-map
+ '(([refresh] "Refresh" . gud-refresh)
+ ([remove] "Remove Breakpoint" . gud-remove)
+ ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak
+ :enable (memq gud-minor-mode '(gdb sdb xdb bashdb)))
+ ([break] "Set Breakpoint" . gud-break)
+ ([up] menu-item "Up Stack" gud-up
+ :enable (memq gud-minor-mode '(gdb dbx xdb bashdb)))
+ ([down] menu-item "Down Stack" gud-down
+ :enable (memq gud-minor-mode '(gdb dbx xdb bashdb)))
+ ([print] "Print Expression" . gud-print)
+ ([finish] menu-item "Finish Function" gud-finish
+ :enable (memq gud-minor-mode '(gdb xdb bashdb)))
+ ([stepi] "Step Instruction" . gud-stepi)
+ ([step] "Step Line" . gud-step)
+ ([next] "Next Line" . gud-next)
+ ([cont] "Continue" . gud-cont))
+ "Menu for `gud-mode'."
+ :name "Gud")
+
+(easy-mmode-defmap gud-minor-mode-map
+ `(([menu-bar debug] . ("Gud" . ,gud-menu-map)))
+ "Map used in visited files.")
+
+(let ((m (assq 'gud-minor-mode minor-mode-map-alist)))
+ (if m (setcdr m gud-minor-mode-map)
+ (push (cons 'gud-minor-mode gud-minor-mode-map) minor-mode-map-alist)))
+
+(defvar gud-mode-map
+ ;; Will inherit from comint-mode via define-derived-mode.
+ (make-sparse-keymap)
+ "`gud-mode' keymap.")
+
+;; ======================================================================
+;; command definition
+
+;; This macro is used below to define some basic debugger interface commands.
+;; Of course you may use `gud-def' with any other debugger command, including
+;; user defined ones.
+
+;; A macro call like (gud-def FUNC NAME KEY DOC) expands to a form
+;; which defines FUNC to send the command NAME to the debugger, gives
+;; it the docstring DOC, and binds that function to KEY in the GUD
+;; major mode. The function is also bound in the global keymap with the
+;; GUD prefix.
+
+(defmacro gud-def (func cmd key &optional doc)
+ "Define FUNC to be a command sending STR and bound to KEY, with
+optional doc string DOC. Certain %-escapes in the string arguments
+are interpreted specially if present. These are:
+
+ %f name (without directory) of current source file.
+ %F name (without directory or extension) of current source file.
+ %d directory of current source file.
+ %l number of current source line
+ %e text of the C lvalue or function-call expression surrounding point.
+ %a text of the hexadecimal address surrounding point
+ %p prefix argument to the command (if any) as a number
+
+ The `current' source file is the file of the current buffer (if
+we're in a C file) or the source file current at the last break or
+step (if we're in the GUD buffer).
+ The `current' line is that of the current buffer (if we're in a
+source file) or the source line number at the last break or step (if
+we're in the GUD buffer)."
+ (list 'progn
+ (list 'defun func '(arg)
+ (or doc "")
+ '(interactive "p")
+ (list 'gud-call cmd 'arg))
+ (if key
+ (list 'define-key
+ '(current-local-map)
+ (concat "\C-c" key)
+ (list 'quote func)))
+ (if key
+ (list 'global-set-key
+ (list 'concat 'gud-key-prefix key)
+ (list 'quote func)))))
+
+;; Where gud-display-frame should put the debugging arrow; a cons of
+;; (filename . line-number). This is set by the marker-filter, which scans
+;; the debugger's output for indications of the current program counter.
+(defvar gud-last-frame nil)
+
+;; Used by gud-refresh, which should cause gud-display-frame to redisplay
+;; the last frame, even if it's been called before and gud-last-frame has
+;; been set to nil.
+(defvar gud-last-last-frame nil)
+
+;; All debugger-specific information is collected here.
+;; Here's how it works, in case you ever need to add a debugger to the mode.
+;;
+;; Each entry must define the following at startup:
+;;
+;;<name>
+;; comint-prompt-regexp
+;; gud-<name>-massage-args
+;; gud-<name>-marker-filter
+;; gud-<name>-find-file
+;;
+;; The job of the massage-args method is to modify the given list of
+;; debugger arguments before running the debugger.
+;;
+;; The job of the marker-filter method is to detect file/line markers in
+;; strings and set the global gud-last-frame to indicate what display
+;; action (if any) should be triggered by the marker. Note that only
+;; whatever the method *returns* is displayed in the buffer; thus, you
+;; can filter the debugger's output, interpreting some and passing on
+;; the rest.
+;;
+;; The job of the find-file method is to visit and return the buffer indicated
+;; by the car of gud-tag-frame. This may be a file name, a tag name, or
+;; something else.
+
+;; ======================================================================
+;; speedbar support functions and variables.
+(eval-when-compile (require 'speedbar))
+
+(defvar gud-last-speedbar-buffer nil
+ "The last GUD buffer used.")
+
+(defvar gud-last-speedbar-stackframe nil
+ "Description of the currently displayed GUD stack.
+t means that there is no stack, and we are in display-file mode.")
+
+(defvar gud-speedbar-key-map nil
+ "Keymap used when in the buffers display mode.")
+
+(defun gud-install-speedbar-variables ()
+ "Install those variables used by speedbar to enhance gud/gdb."
+ (if gud-speedbar-key-map
+ nil
+ (setq gud-speedbar-key-map (speedbar-make-specialized-keymap))
+
+ (define-key gud-speedbar-key-map "j" 'speedbar-edit-line)
+ (define-key gud-speedbar-key-map "e" 'speedbar-edit-line)
+ (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line)))
+
+(defvar gud-speedbar-menu-items
+ ;; Note to self. Add expand, and turn off items when not available.
+ '(["Jump to stack frame" speedbar-edit-line t])
+ "Additional menu items to add the the speedbar frame.")
+
+;; Make sure our special speedbar mode is loaded
+(if (featurep 'speedbar)
+ (gud-install-speedbar-variables)
+ (add-hook 'speedbar-load-hook 'gud-install-speedbar-variables))
+
+(defun gud-speedbar-buttons (buffer)
+ "Create a speedbar display based on the current state of GUD.
+If the GUD BUFFER is not running a supported debugger, then turn
+off the specialized speedbar mode."
+ (if (and (save-excursion (goto-char (point-min))
+ (looking-at "Current Stack"))
+ (equal gud-last-last-frame gud-last-speedbar-stackframe))
+ nil
+ (setq gud-last-speedbar-buffer buffer)
+ (let* ((ff (save-excursion (set-buffer buffer) gud-find-file))
+ ;;(lf (save-excursion (set-buffer buffer) gud-last-last-frame))
+ (frames
+ (cond ((eq ff 'gud-gdb-find-file)
+ (gud-gdb-get-stackframe buffer)
+ )
+ ;; Add more debuggers here!
+ (t
+ (speedbar-remove-localized-speedbar-support buffer)
+ nil))))
+ (erase-buffer)
+ (if (not frames)
+ (insert "No Stack frames\n")
+ (insert "Current Stack:\n"))
+ (while frames
+ (insert (nth 1 (car frames)) ":\n")
+ (if (= (length (car frames)) 2)
+ (progn
+; (speedbar-insert-button "[?]"
+; 'speedbar-button-face
+; nil nil nil t)
+ (speedbar-insert-button (car (car frames))
+ 'speedbar-directory-face
+ nil nil nil t))
+; (speedbar-insert-button "[+]"
+; 'speedbar-button-face
+; 'speedbar-highlight-face
+; 'gud-gdb-get-scope-data
+; (car frames) t)
+ (speedbar-insert-button (car (car frames))
+ 'speedbar-file-face
+ 'speedbar-highlight-face
+ (cond ((eq ff 'gud-gdb-find-file)
+ 'gud-gdb-goto-stackframe)
+ (t (error "Should never be here")))
+ (car frames) t))
+ (setq frames (cdr frames)))
+; (let ((selected-frame
+; (cond ((eq ff 'gud-gdb-find-file)
+; (gud-gdb-selected-frame-info buffer))
+; (t (error "Should never be here"))))))
+ )
+ (setq gud-last-speedbar-stackframe gud-last-last-frame)))
+
+
+;; ======================================================================
+;; gdb functions
+
+;;; History of argument lists passed to gdb.
+(defvar gud-gdb-history nil)
+
+(defun gud-gdb-massage-args (file args)
+ (cons "-fullname" args))
+
+(defvar gud-gdb-marker-regexp
+ ;; This used to use path-separator instead of ":";
+ ;; however, we found that on both Windows 32 and MSDOS
+ ;; a colon is correct here.
+ (concat "\032\032\\(.:?[^" ":" "\n]*\\)" ":"
+ "\\([0-9]*\\)" ":" ".*\n"))
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(defvar gud-marker-acc "")
+(make-variable-buffer-local 'gud-marker-acc)
+
+(defun gud-gdb-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ (while (string-match gud-gdb-marker-regexp gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (cons (substring gud-marker-acc (match-beginning 1) (match-end 1))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 2)
+ (match-end 2))))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "\032.*\\'" gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+(defun gud-gdb-find-file (f)
+ (find-file-noselect f 'nowarn))
+
+(easy-mmode-defmap gud-minibuffer-local-map
+ '(("\C-i" . comint-dynamic-complete-filename))
+ "Keymap for minibuffer prompting of gud startup command."
+ :inherit minibuffer-local-map)
+
+(defun gud-query-cmdline (minor-mode &optional init)
+ (let* ((hist-sym (gud-symbol 'history nil minor-mode))
+ (cmd-name (gud-val 'command-name minor-mode)))
+ (unless (boundp hist-sym) (set hist-sym nil))
+ (read-from-minibuffer
+ (format "Run %s (like this): " minor-mode)
+ (or (car-safe (symbol-value hist-sym))
+ (concat (or cmd-name (symbol-name minor-mode)) " " init))
+ gud-minibuffer-local-map nil
+ hist-sym)))
+
+;;;###autoload
+(defun gdb (command-line)
+ "Run gdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive (list (gud-query-cmdline 'gdb)))
+
+ (gud-common-init command-line 'gud-gdb-massage-args
+ 'gud-gdb-marker-filter 'gud-gdb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'gdb)
+
+ (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.")
+ (gud-def gud-remove "clear %f:%l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step %p" "\C-s" "Step one source line with display.")
+ (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
+ (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "cont" "\C-r" "Continue with display.")
+ (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
+ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
+ (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
+ (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
+
+ (local-set-key "\C-i" 'gud-gdb-complete-command)
+ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
+ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+ (setq comint-prompt-regexp "^(.*gdb[+]?) *")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'gdb-mode-hook)
+ )
+
+;; One of the nice features of GDB is its impressive support for
+;; context-sensitive command completion. We preserve that feature
+;; in the GUD buffer by using a GDB command designed just for Emacs.
+
+;; The completion process filter indicates when it is finished.
+(defvar gud-gdb-complete-in-progress)
+
+;; Since output may arrive in fragments we accumulate partials strings here.
+(defvar gud-gdb-complete-string)
+
+;; We need to know how much of the completion to chop off.
+(defvar gud-gdb-complete-break)
+
+;; The completion list is constructed by the process filter.
+(defvar gud-gdb-complete-list)
+
+(defvar gud-comint-buffer nil)
+
+(defun gud-gdb-complete-command ()
+ "Perform completion on the GDB command preceding point.
+This is implemented using the GDB `complete' command which isn't
+available with older versions of GDB."
+ (interactive)
+ (let* ((end (point))
+ (command (buffer-substring (comint-line-beginning-position) end))
+ command-word)
+ ;; Find the word break. This match will always succeed.
+ (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)
+ (setq gud-gdb-complete-break (match-beginning 2)
+ command-word (substring command gud-gdb-complete-break))
+ ;; Temporarily install our filter function.
+ (let ((gud-marker-filter 'gud-gdb-complete-filter))
+ ;; Issue the command to GDB.
+ (gud-basic-call (concat "complete " command))
+ (setq gud-gdb-complete-in-progress t
+ gud-gdb-complete-string nil
+ gud-gdb-complete-list nil)
+ ;; Slurp the output.
+ (while gud-gdb-complete-in-progress
+ (accept-process-output (get-buffer-process gud-comint-buffer))))
+ ;; Protect against old versions of GDB.
+ (and gud-gdb-complete-list
+ (string-match "^Undefined command: \"complete\""
+ (car gud-gdb-complete-list))
+ (error "This version of GDB doesn't support the `complete' command"))
+ ;; Sort the list like readline.
+ (setq gud-gdb-complete-list
+ (sort gud-gdb-complete-list (function string-lessp)))
+ ;; Remove duplicates.
+ (let ((first gud-gdb-complete-list)
+ (second (cdr gud-gdb-complete-list)))
+ (while second
+ (if (string-equal (car first) (car second))
+ (setcdr first (setq second (cdr second)))
+ (setq first second
+ second (cdr second)))))
+ ;; Add a trailing single quote if there is a unique completion
+ ;; and it contains an odd number of unquoted single quotes.
+ (and (= (length gud-gdb-complete-list) 1)
+ (let ((str (car gud-gdb-complete-list))
+ (pos 0)
+ (count 0))
+ (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
+ (setq count (1+ count)
+ pos (match-end 0)))
+ (and (= (mod count 2) 1)
+ (setq gud-gdb-complete-list (list (concat str "'"))))))
+ ;; Let comint handle the rest.
+ (comint-dynamic-simple-complete command-word gud-gdb-complete-list)))
+
+;; The completion process filter is installed temporarily to slurp the
+;; output of GDB up to the next prompt and build the completion list.
+(defun gud-gdb-complete-filter (string)
+ (setq string (concat gud-gdb-complete-string string))
+ (while (string-match "\n" string)
+ (setq gud-gdb-complete-list
+ (cons (substring string gud-gdb-complete-break (match-beginning 0))
+ gud-gdb-complete-list))
+ (setq string (substring string (match-end 0))))
+ (if (string-match comint-prompt-regexp string)
+ (progn
+ (setq gud-gdb-complete-in-progress nil)
+ string)
+ (progn
+ (setq gud-gdb-complete-string string)
+ "")))
+
+;; gdb speedbar functions
+
+(defun gud-gdb-goto-stackframe (text token indent)
+ "Goto the stackframe described by TEXT, TOKEN, and INDENT."
+ (speedbar-with-attached-buffer
+ (gud-basic-call (concat "frame " (nth 1 token)))
+ (sit-for 1)))
+
+(defvar gud-gdb-fetched-stack-frame nil
+ "Stack frames we are fetching from GDB.")
+
+(defvar gud-gdb-fetched-stack-frame-list nil
+ "List of stack frames we are fetching from GDB.")
+
+;(defun gud-gdb-get-scope-data (text token indent)
+; ;; checkdoc-params: (indent)
+; "Fetch data associated with a stack frame, and expand/contract it.
+;Data to do this is retrieved from TEXT and TOKEN."
+; (let ((args nil) (scope nil))
+; (gud-gdb-run-command-fetch-lines "info args")
+;
+; (gud-gdb-run-command-fetch-lines "info local")
+;
+; ))
+
+(defun gud-gdb-get-stackframe (buffer)
+ "Extract the current stack frame out of the GUD GDB BUFFER."
+ (let ((newlst nil)
+ (gud-gdb-fetched-stack-frame-list nil))
+ (gud-gdb-run-command-fetch-lines "backtrace" buffer)
+ (if (and (car gud-gdb-fetched-stack-frame-list)
+ (string-match "No stack" (car gud-gdb-fetched-stack-frame-list)))
+ ;; Go into some other mode???
+ nil
+ (while gud-gdb-fetched-stack-frame-list
+ (let ((e (car gud-gdb-fetched-stack-frame-list))
+ (name nil) (num nil))
+ (if (not (or
+ (string-match "^#\\([0-9]+\\) +[0-9a-fx]+ in \\([:0-9a-zA-Z_]+\\) (" e)
+ (string-match "^#\\([0-9]+\\) +\\([:0-9a-zA-Z_]+\\) (" e)))
+ (if (not (string-match
+ "at \\([-0-9a-zA-Z_.]+\\):\\([0-9]+\\)$" e))
+ nil
+ (setcar newlst
+ (list (nth 0 (car newlst))
+ (nth 1 (car newlst))
+ (match-string 1 e)
+ (match-string 2 e))))
+ (setq num (match-string 1 e)
+ name (match-string 2 e))
+ (setq newlst
+ (cons
+ (if (string-match
+ "at \\([-0-9a-zA-Z_.]+\\):\\([0-9]+\\)$" e)
+ (list name num (match-string 1 e)
+ (match-string 2 e))
+ (list name num))
+ newlst))))
+ (setq gud-gdb-fetched-stack-frame-list
+ (cdr gud-gdb-fetched-stack-frame-list)))
+ (nreverse newlst))))
+
+;(defun gud-gdb-selected-frame-info (buffer)
+; "Learn GDB information for the currently selected stack frame in BUFFER."
+; )
+
+(defun gud-gdb-run-command-fetch-lines (command buffer)
+ "Run COMMAND, and return when `gud-gdb-fetched-stack-frame-list' is full.
+BUFFER is the GUD buffer in which to run the command."
+ (save-excursion
+ (set-buffer buffer)
+ (if (save-excursion
+ (goto-char (point-max))
+ (forward-line 0)
+ (not (looking-at comint-prompt-regexp)))
+ nil
+ ;; Much of this copied from GDB complete, but I'm grabbing the stack
+ ;; frame instead.
+ (let ((gud-marker-filter 'gud-gdb-speedbar-stack-filter))
+ ;; Issue the command to GDB.
+ (gud-basic-call command)
+ (setq gud-gdb-complete-in-progress t ;; use this flag for our purposes.
+ gud-gdb-complete-string nil
+ gud-gdb-complete-list nil)
+ ;; Slurp the output.
+ (while gud-gdb-complete-in-progress
+ (accept-process-output (get-buffer-process gud-comint-buffer)))
+ (setq gud-gdb-fetched-stack-frame nil
+ gud-gdb-fetched-stack-frame-list
+ (nreverse gud-gdb-fetched-stack-frame-list))))))
+
+(defun gud-gdb-speedbar-stack-filter (string)
+ ;; checkdoc-params: (string)
+ "Filter used to read in the current GDB stack."
+ (setq string (concat gud-gdb-fetched-stack-frame string))
+ (while (string-match "\n" string)
+ (setq gud-gdb-fetched-stack-frame-list
+ (cons (substring string 0 (match-beginning 0))
+ gud-gdb-fetched-stack-frame-list))
+ (setq string (substring string (match-end 0))))
+ (if (string-match comint-prompt-regexp string)
+ (progn
+ (setq gud-gdb-complete-in-progress nil)
+ string)
+ (progn
+ (setq gud-gdb-complete-string string)
+ "")))
+
+
+;; ======================================================================
+;; sdb functions
+
+;;; History of argument lists passed to sdb.
+(defvar gud-sdb-history nil)
+
+(defvar gud-sdb-needs-tags (not (file-exists-p "/var"))
+ "If nil, we're on a System V Release 4 and don't need the tags hack.")
+
+(defvar gud-sdb-lastfile nil)
+
+(defun gud-sdb-massage-args (file args) args)
+
+(defun gud-sdb-marker-filter (string)
+ (setq gud-marker-acc
+ (if gud-marker-acc (concat gud-marker-acc string) string))
+ (let (start)
+ ;; Process all complete markers in this chunk
+ (while
+ (cond
+ ;; System V Release 3.2 uses this format
+ ((string-match "\\(^\\|\n\\)\\*?\\(0x\\w* in \\)?\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+ gud-marker-acc start)
+ (setq gud-last-frame
+ (cons
+ (substring gud-marker-acc (match-beginning 3) (match-end 3))
+ (string-to-int
+ (substring gud-marker-acc (match-beginning 4) (match-end 4))))))
+ ;; System V Release 4.0 quite often clumps two lines together
+ ((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n\\([0-9]+\\):"
+ gud-marker-acc start)
+ (setq gud-sdb-lastfile
+ (substring gud-marker-acc (match-beginning 2) (match-end 2)))
+ (setq gud-last-frame
+ (cons
+ gud-sdb-lastfile
+ (string-to-int
+ (substring gud-marker-acc (match-beginning 3) (match-end 3))))))
+ ;; System V Release 4.0
+ ((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n"
+ gud-marker-acc start)
+ (setq gud-sdb-lastfile
+ (substring gud-marker-acc (match-beginning 2) (match-end 2))))
+ ((and gud-sdb-lastfile (string-match "^\\([0-9]+\\):"
+ gud-marker-acc start))
+ (setq gud-last-frame
+ (cons
+ gud-sdb-lastfile
+ (string-to-int
+ (substring gud-marker-acc (match-beginning 1) (match-end 1))))))
+ (t
+ (setq gud-sdb-lastfile nil)))
+ (setq start (match-end 0)))
+
+ ;; Search for the last incomplete line in this chunk
+ (while (string-match "\n" gud-marker-acc start)
+ (setq start (match-end 0)))
+
+ ;; If we have an incomplete line, store it in gud-marker-acc.
+ (setq gud-marker-acc (substring gud-marker-acc (or start 0))))
+ string)
+
+(defun gud-sdb-find-file (f)
+ (if gud-sdb-needs-tags (find-tag-noselect f) (find-file-noselect f)))
+
+;;;###autoload
+(defun sdb (command-line)
+ "Run sdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive (list (gud-query-cmdline 'sdb)))
+
+ (if (and gud-sdb-needs-tags
+ (not (and (boundp 'tags-file-name)
+ (stringp tags-file-name)
+ (file-exists-p tags-file-name))))
+ (error "The sdb support requires a valid tags table to work"))
+
+ (gud-common-init command-line 'gud-sdb-massage-args
+ 'gud-sdb-marker-filter 'gud-sdb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'sdb)
+
+ (gud-def gud-break "%l b" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-tbreak "%l c" "\C-t" "Set temporary breakpoint at current line.")
+ (gud-def gud-remove "%l d" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "s %p" "\C-s" "Step one source line with display.")
+ (gud-def gud-stepi "i %p" "\C-i" "Step one instruction with display.")
+ (gud-def gud-next "S %p" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "c" "\C-r" "Continue with display.")
+ (gud-def gud-print "%e/" "\C-p" "Evaluate C expression at point.")
+
+ (setq comint-prompt-regexp "\\(^\\|\n\\)\\*")
+ (setq paragraph-start comint-prompt-regexp)
+ (local-set-key [menu-bar debug tbreak]
+ '("Temporary Breakpoint" . gud-tbreak))
+ (run-hooks 'sdb-mode-hook)
+ )
+
+;; ======================================================================
+;; dbx functions
+
+;;; History of argument lists passed to dbx.
+(defvar gud-dbx-history nil)
+
+(defcustom gud-dbx-directories nil
+ "*A list of directories that dbx should search for source code.
+If nil, only source files in the program directory
+will be known to dbx.
+
+The file names should be absolute, or relative to the directory
+containing the executable being debugged."
+ :type '(choice (const :tag "Current Directory" nil)
+ (repeat :value ("")
+ directory))
+ :group 'gud)
+
+(defun gud-dbx-massage-args (file args)
+ (nconc (let ((directories gud-dbx-directories)
+ (result nil))
+ (while directories
+ (setq result (cons (car directories) (cons "-I" result)))
+ (setq directories (cdr directories)))
+ (nreverse result))
+ args))
+
+(defun gud-dbx-file-name (f)
+ "Transform a relative file name to an absolute file name, for dbx."
+ (let ((result nil))
+ (if (file-exists-p f)
+ (setq result (expand-file-name f))
+ (let ((directories gud-dbx-directories))
+ (while directories
+ (let ((path (concat (car directories) "/" f)))
+ (if (file-exists-p path)
+ (setq result (expand-file-name path)
+ directories nil)))
+ (setq directories (cdr directories)))))
+ result))
+
+(defun gud-dbx-marker-filter (string)
+ (setq gud-marker-acc (if gud-marker-acc (concat gud-marker-acc string) string))
+
+ (let (start)
+ ;; Process all complete markers in this chunk.
+ (while (or (string-match
+ "stopped in .* at line \\([0-9]*\\) in file \"\\([^\"]*\\)\""
+ gud-marker-acc start)
+ (string-match
+ "signal .* in .* at line \\([0-9]*\\) in file \"\\([^\"]*\\)\""
+ gud-marker-acc start))
+ (setq gud-last-frame
+ (cons
+ (substring gud-marker-acc (match-beginning 2) (match-end 2))
+ (string-to-int
+ (substring gud-marker-acc (match-beginning 1) (match-end 1))))
+ start (match-end 0)))
+
+ ;; Search for the last incomplete line in this chunk
+ (while (string-match "\n" gud-marker-acc start)
+ (setq start (match-end 0)))
+
+ ;; If the incomplete line APPEARS to begin with another marker, keep it
+ ;; in the accumulator. Otherwise, clear the accumulator to avoid an
+ ;; unnecessary concat during the next call.
+ (setq gud-marker-acc
+ (if (string-match "\\(stopped\\|signal\\)" gud-marker-acc start)
+ (substring gud-marker-acc (match-beginning 0))
+ nil)))
+ string)
+
+;; Functions for Mips-style dbx. Given the option `-emacs', documented in
+;; OSF1, not necessarily elsewhere, it produces markers similar to gdb's.
+(defvar gud-mips-p
+ (or (string-match "^mips-[^-]*-ultrix" system-configuration)
+ ;; We haven't tested gud on this system:
+ (string-match "^mips-[^-]*-riscos" system-configuration)
+ ;; It's documented on OSF/1.3
+ (string-match "^mips-[^-]*-osf1" system-configuration)
+ (string-match "^alpha[^-]*-[^-]*-osf" system-configuration))
+ "Non-nil to assume the MIPS/OSF dbx conventions (argument `-emacs').")
+
+(defun gud-mipsdbx-massage-args (file args)
+ (cons "-emacs" args))
+
+;; This is just like the gdb one except for the regexps since we need to cope
+;; with an optional breakpoint number in [] before the ^Z^Z
+(defun gud-mipsdbx-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ (while (string-match
+ ;; This is like th gdb marker but with an optional
+ ;; leading break point number like `[1] '
+ "[][ 0-9]*\032\032\\([^:\n]*\\):\\([0-9]*\\):.*\n"
+ gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (cons (substring gud-marker-acc (match-beginning 1) (match-end 1))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 2)
+ (match-end 2))))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "[][ 0-9]*\032.*\\'" gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+;; The dbx in IRIX is a pain. It doesn't print the file name when
+;; stopping at a breakpoint (but you do get it from the `up' and
+;; `down' commands...). The only way to extract the information seems
+;; to be with a `file' command, although the current line number is
+;; available in $curline. Thus we have to look for output which
+;; appears to indicate a breakpoint. Then we prod the dbx sub-process
+;; to output the information we want with a combination of the
+;; `printf' and `file' commands as a pseudo marker which we can
+;; recognise next time through the marker-filter. This would be like
+;; the gdb marker but you can't get the file name without a newline...
+;; Note that gud-remove won't work since Irix dbx expects a breakpoint
+;; number rather than a line number etc. Maybe this could be made to
+;; work by listing all the breakpoints and picking the one(s) with the
+;; correct line number, but life's too short.
+;; d.love@dl.ac.uk (Dave Love) can be blamed for this
+
+(defvar gud-irix-p
+ (and (string-match "^mips-[^-]*-irix" system-configuration)
+ (not (string-match "irix[6-9]\\.[1-9]" system-configuration)))
+ "Non-nil to assume the interface appropriate for IRIX dbx.
+This works in IRIX 4, 5 and 6, but `gud-dbx-use-stopformat-p' provides
+a better solution in 6.1 upwards.")
+(defvar gud-dbx-use-stopformat-p
+ (string-match "irix[6-9]\\.[1-9]" system-configuration)
+ "Non-nil to use the dbx feature present at least from Irix 6.1
+ whereby $stopformat=1 produces an output format compatiable with
+ `gud-dbx-marker-filter'.")
+;; [Irix dbx seems to be a moving target. The dbx output changed
+;; subtly sometime between OS v4.0.5 and v5.2 so that, for instance,
+;; the output from `up' is no longer spotted by gud (and it's probably
+;; not distinctive enough to try to match it -- use C-<, C->
+;; exclusively) . For 5.3 and 6.0, the $curline variable changed to
+;; `long long'(why?!), so the printf stuff needed changing. The line
+;; number was cast to `long' as a compromise between the new `long
+;; long' and the original `int'. This is reported not to work in 6.2,
+;; so it's changed back to int -- don't make your sources too long.
+;; From Irix6.1 (but not 6.0?) dbx supports an undocumented feature
+;; whereby `set $stopformat=1' reportedly produces output compatible
+;; with `gud-dbx-marker-filter', which we prefer.
+
+;; The process filter is also somewhat
+;; unreliable, sometimes not spotting the markers; I don't know
+;; whether there's anything that can be done about that. It would be
+;; much better if SGI could be persuaded to (re?)instate the MIPS
+;; -emacs flag for gdb-like output (which ought to be possible as most
+;; of the communication I've had over it has been from sgi.com).]
+
+;; this filter is influenced by the xdb one rather than the gdb one
+(defun gud-irixdbx-marker-filter (string)
+ (let (result (case-fold-search nil))
+ (if (or (string-match comint-prompt-regexp string)
+ (string-match ".*\012" string))
+ (setq result (concat gud-marker-acc string)
+ gud-marker-acc "")
+ (setq gud-marker-acc (concat gud-marker-acc string)))
+ (if result
+ (cond
+ ;; look for breakpoint or signal indication e.g.:
+ ;; [2] Process 1267 (pplot) stopped at [params:338 ,0x400ec0]
+ ;; Process 1281 (pplot) stopped at [params:339 ,0x400ec8]
+ ;; Process 1270 (pplot) Floating point exception [._read._read:16 ,0x452188]
+ ((string-match
+ "^\\(\\[[0-9]+] \\)?Process +[0-9]+ ([^)]*) [^[]+\\[[^]\n]*]\n"
+ result)
+ ;; prod dbx into printing out the line number and file
+ ;; name in a form we can grok as below
+ (process-send-string (get-buffer-process gud-comint-buffer)
+ "printf \"\032\032%1d:\",(int)$curline;file\n"))
+ ;; look for result of, say, "up" e.g.:
+ ;; .pplot.pplot(0x800) ["src/pplot.f":261, 0x400c7c]
+ ;; (this will also catch one of the lines printed by "where")
+ ((string-match
+ "^[^ ][^[]*\\[\"\\([^\"]+\\)\":\\([0-9]+\\), [^]]+]\n"
+ result)
+ (let ((file (substring result (match-beginning 1)
+ (match-end 1))))
+ (if (file-exists-p file)
+ (setq gud-last-frame
+ (cons
+ (substring
+ result (match-beginning 1) (match-end 1))
+ (string-to-int
+ (substring
+ result (match-beginning 2) (match-end 2)))))))
+ result)
+ ((string-match ; kluged-up marker as above
+ "\032\032\\([0-9]*\\):\\(.*\\)\n" result)
+ (let ((file (gud-dbx-file-name
+ (substring result (match-beginning 2) (match-end 2)))))
+ (if (and file (file-exists-p file))
+ (setq gud-last-frame
+ (cons
+ file
+ (string-to-int
+ (substring
+ result (match-beginning 1) (match-end 1)))))))
+ (setq result (substring result 0 (match-beginning 0))))))
+ (or result "")))
+
+(defvar gud-dgux-p (string-match "-dgux" system-configuration)
+ "Non-nil means to assume the interface approriate for DG/UX dbx.
+This was tested using R4.11.")
+
+;; There are a couple of differences between DG's dbx output and normal
+;; dbx output which make it nontrivial to integrate this into the
+;; standard dbx-marker-filter (mainly, there are a different number of
+;; backreferences). The markers look like:
+;;
+;; (0) Stopped at line 10, routine main(argc=1, argv=0xeffff0e0), file t.c
+;;
+;; from breakpoints (the `(0)' there isn't constant, it's the breakpoint
+;; number), and
+;;
+;; Stopped at line 13, routine main(argc=1, argv=0xeffff0e0), file t.c
+;;
+;; from signals and
+;;
+;; Frame 21, line 974, routine command_loop(), file keyboard.c
+;;
+;; from up/down/where.
+
+(defun gud-dguxdbx-marker-filter (string)
+ (setq gud-marker-acc (if gud-marker-acc
+ (concat gud-marker-acc string)
+ string))
+ (let ((re (concat "^\\(\\(([0-9]+) \\)?Stopped at\\|Frame [0-9]+,\\)"
+ " line \\([0-9]+\\), routine .*, file \\([^ \t\n]+\\)"))
+ start)
+ ;; Process all complete markers in this chunk.
+ (while (string-match re gud-marker-acc start)
+ (setq gud-last-frame
+ (cons
+ (substring gud-marker-acc (match-beginning 4) (match-end 4))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 3) (match-end 3))))
+ start (match-end 0)))
+
+ ;; Search for the last incomplete line in this chunk
+ (while (string-match "\n" gud-marker-acc start)
+ (setq start (match-end 0)))
+
+ ;; If the incomplete line APPEARS to begin with another marker, keep it
+ ;; in the accumulator. Otherwise, clear the accumulator to avoid an
+ ;; unnecessary concat during the next call.
+ (setq gud-marker-acc
+ (if (string-match "Stopped\\|Frame" gud-marker-acc start)
+ (substring gud-marker-acc (match-beginning 0))
+ nil)))
+ string)
+
+(defun gud-dbx-find-file (f)
+ (save-excursion
+ (let ((realf (gud-dbx-file-name f)))
+ (if realf
+ (find-file-noselect realf)))))
+
+;;;###autoload
+(defun dbx (command-line)
+ "Run dbx on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive (list (gud-query-cmdline 'dbx)))
+
+ (cond
+ (gud-mips-p
+ (gud-common-init command-line 'gud-mipsdbx-massage-args
+ 'gud-mipsdbx-marker-filter 'gud-dbx-find-file))
+ (gud-irix-p
+ (gud-common-init command-line 'gud-dbx-massage-args
+ 'gud-irixdbx-marker-filter 'gud-dbx-find-file))
+ (gud-dgux-p
+ (gud-common-init command-line 'gud-dbx-massage-args
+ 'gud-dguxdbx-marker-filter 'gud-dbx-find-file))
+ (t
+ (gud-common-init command-line 'gud-dbx-massage-args
+ 'gud-dbx-marker-filter 'gud-dbx-find-file)))
+
+ (set (make-local-variable 'gud-minor-mode) 'dbx)
+
+ (cond
+ (gud-mips-p
+ (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
+ (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
+ (gud-def gud-break "stop at \"%f\":%l"
+ "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-finish "return" "\C-f" "Finish executing current function."))
+ (gud-irix-p
+ (gud-def gud-break "stop at \"%d%f\":%l"
+ "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-finish "return" "\C-f" "Finish executing current function.")
+ (gud-def gud-up "up %p; printf \"\032\032%1d:\",(int)$curline;file\n"
+ "<" "Up (numeric arg) stack frames.")
+ (gud-def gud-down "down %p; printf \"\032\032%1d:\",(int)$curline;file\n"
+ ">" "Down (numeric arg) stack frames.")
+ ;; Make dbx give out the source location info that we need.
+ (process-send-string (get-buffer-process gud-comint-buffer)
+ "printf \"\032\032%1d:\",(int)$curline;file\n"))
+ (t
+ (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
+ (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
+ (gud-def gud-break "file \"%d%f\"\nstop at %l"
+ "\C-b" "Set breakpoint at current line.")
+ (if gud-dbx-use-stopformat-p
+ (process-send-string (get-buffer-process gud-comint-buffer)
+ "set $stopformat=1\n"))))
+
+ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step %p" "\C-s" "Step one line with display.")
+ (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
+ (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "cont" "\C-r" "Continue with display.")
+ (gud-def gud-print "print %e" "\C-p" "Evaluate C expression at point.")
+
+ (setq comint-prompt-regexp "^[^)\n]*dbx) *")
+ (setq paragraph-start comint-prompt-regexp)
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+ (run-hooks 'dbx-mode-hook)
+ )
+
+;; ======================================================================
+;; xdb (HP PARISC debugger) functions
+
+;;; History of argument lists passed to xdb.
+(defvar gud-xdb-history nil)
+
+(defcustom gud-xdb-directories nil
+ "*A list of directories that xdb should search for source code.
+If nil, only source files in the program directory
+will be known to xdb.
+
+The file names should be absolute, or relative to the directory
+containing the executable being debugged."
+ :type '(choice (const :tag "Current Directory" nil)
+ (repeat :value ("")
+ directory))
+ :group 'gud)
+
+(defun gud-xdb-massage-args (file args)
+ (nconc (let ((directories gud-xdb-directories)
+ (result nil))
+ (while directories
+ (setq result (cons (car directories) (cons "-d" result)))
+ (setq directories (cdr directories)))
+ (nreverse result))
+ args))
+
+(defun gud-xdb-file-name (f)
+ "Transform a relative pathname to a full pathname in xdb mode"
+ (let ((result nil))
+ (if (file-exists-p f)
+ (setq result (expand-file-name f))
+ (let ((directories gud-xdb-directories))
+ (while directories
+ (let ((path (concat (car directories) "/" f)))
+ (if (file-exists-p path)
+ (setq result (expand-file-name path)
+ directories nil)))
+ (setq directories (cdr directories)))))
+ result))
+
+;; xdb does not print the lines all at once, so we have to accumulate them
+(defun gud-xdb-marker-filter (string)
+ (let (result)
+ (if (or (string-match comint-prompt-regexp string)
+ (string-match ".*\012" string))
+ (setq result (concat gud-marker-acc string)
+ gud-marker-acc "")
+ (setq gud-marker-acc (concat gud-marker-acc string)))
+ (if result
+ (if (or (string-match "\\([^\n \t:]+\\): [^:]+: \\([0-9]+\\)[: ]"
+ result)
+ (string-match "[^: \t]+:[ \t]+\\([^:]+\\): [^:]+: \\([0-9]+\\):"
+ result))
+ (let ((line (string-to-int
+ (substring result (match-beginning 2) (match-end 2))))
+ (file (gud-xdb-file-name
+ (substring result (match-beginning 1) (match-end 1)))))
+ (if file
+ (setq gud-last-frame (cons file line))))))
+ (or result "")))
+
+(defun gud-xdb-find-file (f)
+ (save-excursion
+ (let ((realf (gud-xdb-file-name f)))
+ (if realf
+ (find-file-noselect realf)))))
+
+;;;###autoload
+(defun xdb (command-line)
+ "Run xdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger.
+
+You can set the variable 'gud-xdb-directories' to a list of program source
+directories if your program contains sources from more than one directory."
+ (interactive (list (gud-query-cmdline 'xdb)))
+
+ (gud-common-init command-line 'gud-xdb-massage-args
+ 'gud-xdb-marker-filter 'gud-xdb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'xdb)
+
+ (gud-def gud-break "b %f:%l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-tbreak "b %f:%l\\t" "\C-t"
+ "Set temporary breakpoint at current line.")
+ (gud-def gud-remove "db" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "s %p" "\C-s" "Step one line with display.")
+ (gud-def gud-next "S %p" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "c" "\C-r" "Continue with display.")
+ (gud-def gud-up "up %p" "<" "Up (numeric arg) stack frames.")
+ (gud-def gud-down "down %p" ">" "Down (numeric arg) stack frames.")
+ (gud-def gud-finish "bu\\t" "\C-f" "Finish executing current function.")
+ (gud-def gud-print "p %e" "\C-p" "Evaluate C expression at point.")
+
+ (setq comint-prompt-regexp "^>")
+ (setq paragraph-start comint-prompt-regexp)
+ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
+ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+ (run-hooks 'xdb-mode-hook))
+
+;; ======================================================================
+;; perldb functions
+
+;;; History of argument lists passed to perldb.
+(defvar gud-perldb-history nil)
+
+;; Convert a command line as would be typed normally to run a script
+;; into one that invokes an Emacs-enabled debugging session.
+;; "-d" in inserted as the first switch, and "-emacs" is inserted where
+;; it will be $ARGV[0] (see perl5db.pl).
+(defun gud-perldb-massage-args (file args)
+ (let* ((new-args (list "-d"))
+ (seen-e nil)
+ (shift (lambda ()
+ (setq new-args (cons (car args) new-args))
+ (setq args (cdr args)))))
+
+ ;; Pass all switches and -e scripts through.
+ (while (and args
+ (string-match "^-" (car args))
+ (not (equal "-" (car args)))
+ (not (equal "--" (car args))))
+ (when (equal "-e" (car args))
+ ;; -e goes with the next arg, so shift one extra.
+ (or (funcall shift)
+ ;; -e as the last arg is an error in Perl.
+ (error "No code specified for -e"))
+ (setq seen-e t))
+ (funcall shift))
+
+ (unless seen-e
+ (if (or (not args)
+ (string-match "^-" (car args)))
+ (error "Can't use stdin as the script to debug"))
+ ;; This is the program name.
+ (funcall shift))
+
+ ;; If -e specified, make sure there is a -- so -emacs is not taken
+ ;; as -e macs.
+ (if (and args (equal "--" (car args)))
+ (funcall shift)
+ (and seen-e (push "--" new-args)))
+
+ (push "-emacs" new-args)
+ (while args
+ (funcall shift))
+
+ (nreverse new-args)))
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(defun gud-perldb-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ (while (string-match "\032\032\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\):.*\n"
+ gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (cons (substring gud-marker-acc (match-beginning 1) (match-end 1))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 3)
+ (match-end 3))))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "\032.*\\'" gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+(defun gud-perldb-find-file (f)
+ (find-file-noselect f))
+
+(defcustom gud-perldb-command-name "perl"
+ "File name for executing Perl."
+ :type 'string
+ :group 'gud)
+
+;;;###autoload
+(defun perldb (command-line)
+ "Run perldb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive
+ (list (gud-query-cmdline 'perldb
+ (concat (or (buffer-file-name) "-e 0") " "))))
+
+ (gud-common-init command-line 'gud-perldb-massage-args
+ 'gud-perldb-marker-filter 'gud-perldb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'perldb)
+
+ (gud-def gud-break "b %l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-remove "d %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "s" "\C-s" "Step one source line with display.")
+ (gud-def gud-next "n" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "c" "\C-r" "Continue with display.")
+; (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
+; (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
+; (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
+ (gud-def gud-print "%e" "\C-p" "Evaluate perl expression at point.")
+
+ (setq comint-prompt-regexp "^ DB<+[0-9]+>+ ")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'perldb-mode-hook))
+
+;; ======================================================================
+;; pdb (Python debugger) functions
+
+;;; History of argument lists passed to pdb.
+(defvar gud-pdb-history nil)
+
+(defun gud-pdb-massage-args (file args)
+ args)
+
+;; Last group is for return value, e.g. "> test.py(2)foo()->None"
+;; Either file or function name may be omitted: "> <string>(0)?()"
+(defvar gud-pdb-marker-regexp
+ "^> \\([-a-zA-Z0-9_/.]*\\|<string>\\)(\\([0-9]+\\))\\([a-zA-Z0-9_]*\\|\\?\\)()\\(->[^\n]*\\)?\n")
+(defvar gud-pdb-marker-regexp-file-group 1)
+(defvar gud-pdb-marker-regexp-line-group 2)
+(defvar gud-pdb-marker-regexp-fnname-group 3)
+
+(defvar gud-pdb-marker-regexp-start "^> ")
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(defun gud-pdb-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ (while (string-match gud-pdb-marker-regexp gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (let ((file (match-string gud-pdb-marker-regexp-file-group
+ gud-marker-acc))
+ (line (string-to-int
+ (match-string gud-pdb-marker-regexp-line-group
+ gud-marker-acc))))
+ (if (string-equal file "<string>")
+ gud-last-frame
+ (cons file line)))
+
+ ;; Output everything instead of the below
+ output (concat output (substring gud-marker-acc 0 (match-end 0)))
+;; ;; Append any text before the marker to the output we're going
+;; ;; to return - we don't include the marker in this text.
+;; output (concat output
+;; (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match gud-pdb-marker-regexp-start gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+(defun gud-pdb-find-file (f)
+ (find-file-noselect f))
+
+(defcustom gud-pdb-command-name "pdb"
+ "File name for executing the Python debugger.
+This should be an executable on your path, or an absolute file name."
+ :type 'string
+ :group 'gud)
+
+;;;###autoload
+(defun pdb (command-line)
+ "Run pdb on program FILE in buffer `*gud-FILE*'.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive
+ (list (gud-query-cmdline 'pdb)))
+
+ (gud-common-init command-line 'gud-pdb-massage-args
+ 'gud-pdb-marker-filter 'gud-pdb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'pdb)
+
+ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
+ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
+ (gud-def gud-finish "return" "\C-f" "Finish executing current function.")
+ (gud-def gud-up "up" "<" "Up one stack frame.")
+ (gud-def gud-down "down" ">" "Down one stack frame.")
+ (gud-def gud-print "p %e" "\C-p" "Evaluate Python expression at point.")
+ ;; Is this right?
+ (gud-def gud-statement "! %e" "\C-e" "Execute Python statement at point.")
+
+ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+ ;; (setq comint-prompt-regexp "^(.*pdb[+]?) *")
+ (setq comint-prompt-regexp "^(Pdb) *")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'pdb-mode-hook))
+
+;; ======================================================================
+;;
+;; JDB support.
+;;
+;; AUTHOR: Derek Davies <ddavies@world.std.com>
+;;
+;; CREATED: Sun Feb 22 10:46:38 1998 Derek Davies.
+;;
+;; INVOCATION NOTES:
+;;
+;; You invoke jdb-mode with:
+;;
+;; M-x jdb <enter>
+;;
+;; It responds with:
+;;
+;; Run jdb (like this): jdb
+;;
+;; type any jdb switches followed by the name of the class you'd like to debug.
+;; Supply a fully qualfied classname (these do not have the ".class" extension)
+;; for the name of the class to debug (e.g. "COM.the-kind.ddavies.CoolClass").
+;; See the known problems section below for restrictions when specifying jdb
+;; command line switches (search forward for '-classpath').
+;;
+;; You should see something like the following:
+;;
+;; Current directory is ~/src/java/hello/
+;; Initializing jdb...
+;; 0xed2f6628:class(hello)
+;; >
+;;
+;; To set an initial breakpoint try:
+;;
+;; > stop in hello.main
+;; Breakpoint set in hello.main
+;; >
+;;
+;; To execute the program type:
+;;
+;; > run
+;; run hello
+;;
+;; Breakpoint hit: running ...
+;; hello.main (hello:12)
+;;
+;; Type M-n to step over the current line and M-s to step into it. That,
+;; along with the JDB 'help' command should get you started. The 'quit'
+;; JDB command will get out out of the debugger. There is some truly
+;; pathetic JDB documentation available at:
+;;
+;; http://java.sun.com/products/jdk/1.1/debugging/
+;;
+;; KNOWN PROBLEMS AND FIXME's:
+;;
+;; Not sure what happens with inner classes ... haven't tried them.
+;;
+;; Does not grok UNICODE id's. Only ASCII id's are supported.
+;;
+;; You must not put whitespace between "-classpath" and the path to
+;; search for java classes even though it is required when invoking jdb
+;; from the command line. See gud-jdb-massage-args for details.
+;;
+;; If any of the source files in the directories listed in
+;; gud-jdb-directories won't parse you'll have problems. Make sure
+;; every file ending in ".java" in these directories parses without error.
+;;
+;; All the .java files in the directories in gud-jdb-directories are
+;; syntactically analyzed each time gud jdb is invoked. It would be
+;; nice to keep as much information as possible between runs. It would
+;; be really nice to analyze the files only as neccessary (when the
+;; source needs to be displayed.) I'm not sure to what extent the former
+;; can be accomplished and I'm not sure the latter can be done at all
+;; since I don't know of any general way to tell which .class files are
+;; defined by which .java file without analyzing all the .java files.
+;; If anyone knows why JavaSoft didn't put the source file names in
+;; debuggable .class files please clue me in so I find something else
+;; to be spiteful and bitter about.
+;;
+;; ======================================================================
+;; gud jdb variables and functions
+
+;; History of argument lists passed to jdb.
+(defvar gud-jdb-history nil)
+
+;; List of Java source file directories.
+(defvar gud-jdb-directories (list ".")
+ "*A list of directories that gud jdb should search for source code.
+The file names should be absolute, or relative to the current
+directory.
+
+The set of .java files residing in the directories listed are
+syntactically analyzed to determine the classes they define and the
+packages in which these classes belong. In this way gud jdb maps the
+package-qualified class names output by the jdb debugger to the source
+file from which the class originated. This allows gud mode to keep
+the source code display in sync with the debugging session.")
+
+;; List of the java source files for this debugging session.
+(defvar gud-jdb-source-files nil)
+
+;; Association list of fully qualified class names (package + class name) and
+;; their source files.
+(defvar gud-jdb-class-source-alist nil)
+
+;; This is used to hold a source file during analysis.
+(defvar gud-jdb-analysis-buffer nil)
+
+;; Return a list of java source files. PATH gives the directories in
+;; which to search for files with extension EXTN. Normally EXTN is
+;; given as the regular expression "\\.java$" .
+(defun gud-jdb-build-source-files-list (path extn)
+ (apply 'nconc (mapcar (lambda (d)
+ (when (file-directory-p d)
+ (directory-files d t extn nil)))
+ path)))
+
+;; Move point past whitespace.
+(defun gud-jdb-skip-whitespace ()
+ (skip-chars-forward " \n\r\t\014"))
+
+;; Move point past a "// <eol>" type of comment.
+(defun gud-jdb-skip-single-line-comment ()
+ (end-of-line))
+
+;; Move point past a "/* */" or "/** */" type of comment.
+(defun gud-jdb-skip-traditional-or-documentation-comment ()
+ (forward-char 2)
+ (catch 'break
+ (while (not (eobp))
+ (if (eq (following-char) ?*)
+ (progn
+ (forward-char)
+ (if (not (eobp))
+ (if (eq (following-char) ?/)
+ (progn
+ (forward-char)
+ (throw 'break nil)))))
+ (forward-char)))))
+
+;; Move point past any number of consecutive whitespace chars and/or comments.
+(defun gud-jdb-skip-whitespace-and-comments ()
+ (gud-jdb-skip-whitespace)
+ (catch 'done
+ (while t
+ (cond
+ ((looking-at "//")
+ (gud-jdb-skip-single-line-comment)
+ (gud-jdb-skip-whitespace))
+ ((looking-at "/\\*")
+ (gud-jdb-skip-traditional-or-documentation-comment)
+ (gud-jdb-skip-whitespace))
+ (t (throw 'done nil))))))
+
+;; Move point past things that are id-like. The intent is to skip regular
+;; id's, such as class or interface names as well as package and interface
+;; names.
+(defun gud-jdb-skip-id-ish-thing ()
+ (skip-chars-forward "^ /\n\r\t\014,;{"))
+
+;; Move point past a string literal.
+(defun gud-jdb-skip-string-literal ()
+ (forward-char)
+ (while (not (cond
+ ((eq (following-char) ?\\)
+ (forward-char))
+ ((eq (following-char) ?\042))))
+ (forward-char))
+ (forward-char))
+
+;; Move point past a character literal.
+(defun gud-jdb-skip-character-literal ()
+ (forward-char)
+ (while
+ (progn
+ (if (eq (following-char) ?\\)
+ (forward-char 2))
+ (not (eq (following-char) ?\')))
+ (forward-char))
+ (forward-char))
+
+;; Move point past the following block. There may be (legal) cruft before
+;; the block's opening brace. There must be a block or it's the end of life
+;; in petticoat junction.
+(defun gud-jdb-skip-block ()
+
+ ;; Find the begining of the block.
+ (while
+ (not (eq (following-char) ?{))
+
+ ;; Skip any constructs that can harbor literal block delimiter
+ ;; characters and/or the delimiters for the constructs themselves.
+ (cond
+ ((looking-at "//")
+ (gud-jdb-skip-single-line-comment))
+ ((looking-at "/\\*")
+ (gud-jdb-skip-traditional-or-documentation-comment))
+ ((eq (following-char) ?\042)
+ (gud-jdb-skip-string-literal))
+ ((eq (following-char) ?\')
+ (gud-jdb-skip-character-literal))
+ (t (forward-char))))
+
+ ;; Now at the begining of the block.
+ (forward-char)
+
+ ;; Skip over the body of the block as well as the final brace.
+ (let ((open-level 1))
+ (while (not (eq open-level 0))
+ (cond
+ ((looking-at "//")
+ (gud-jdb-skip-single-line-comment))
+ ((looking-at "/\\*")
+ (gud-jdb-skip-traditional-or-documentation-comment))
+ ((eq (following-char) ?\042)
+ (gud-jdb-skip-string-literal))
+ ((eq (following-char) ?\')
+ (gud-jdb-skip-character-literal))
+ ((eq (following-char) ?{)
+ (setq open-level (+ open-level 1))
+ (forward-char))
+ ((eq (following-char) ?})
+ (setq open-level (- open-level 1))
+ (forward-char))
+ (t (forward-char))))))
+
+;; Find the package and class definitions in Java source file FILE. Assumes
+;; that FILE contains a legal Java program. BUF is a scratch buffer used
+;; to hold the source during analysis.
+(defun gud-jdb-analyze-source (buf file)
+ (let ((l nil))
+ (set-buffer buf)
+ (insert-file-contents file nil nil nil t)
+ (goto-char 0)
+ (catch 'abort
+ (let ((p ""))
+ (while (progn
+ (gud-jdb-skip-whitespace)
+ (not (eobp)))
+ (cond
+
+ ;; Any number of semi's following a block is legal. Move point
+ ;; past them. Note that comments and whitespace may be
+ ;; interspersed as well.
+ ((eq (following-char) ?\073)
+ (forward-char))
+
+ ;; Move point past a single line comment.
+ ((looking-at "//")
+ (gud-jdb-skip-single-line-comment))
+
+ ;; Move point past a traditional or documentation comment.
+ ((looking-at "/\\*")
+ (gud-jdb-skip-traditional-or-documentation-comment))
+
+ ;; Move point past a package statement, but save the PackageName.
+ ((looking-at "package")
+ (forward-char 7)
+ (gud-jdb-skip-whitespace-and-comments)
+ (let ((s (point)))
+ (gud-jdb-skip-id-ish-thing)
+ (setq p (concat (buffer-substring s (point)) "."))
+ (gud-jdb-skip-whitespace-and-comments)
+ (if (eq (following-char) ?\073)
+ (forward-char))))
+
+ ;; Move point past an import statement.
+ ((looking-at "import")
+ (forward-char 6)
+ (gud-jdb-skip-whitespace-and-comments)
+ (gud-jdb-skip-id-ish-thing)
+ (gud-jdb-skip-whitespace-and-comments)
+ (if (eq (following-char) ?\073)
+ (forward-char)))
+
+ ;; Move point past the various kinds of ClassModifiers.
+ ((looking-at "public")
+ (forward-char 6))
+ ((looking-at "abstract")
+ (forward-char 8))
+ ((looking-at "final")
+ (forward-char 5))
+
+ ;; Move point past a ClassDeclaraction, but save the class
+ ;; Identifier.
+ ((looking-at "class")
+ (forward-char 5)
+ (gud-jdb-skip-whitespace-and-comments)
+ (let ((s (point)))
+ (gud-jdb-skip-id-ish-thing)
+ (setq
+ l (nconc l (list (concat p (buffer-substring s (point)))))))
+ (gud-jdb-skip-block))
+
+ ;; Move point past an interface statement.
+ ((looking-at "interface")
+ (forward-char 9)
+ (gud-jdb-skip-block))
+
+ ;; Anything else means the input is invalid.
+ (t
+ (message (format "Error parsing file %s." file))
+ (throw 'abort nil))))))
+ l))
+
+(defun gud-jdb-build-class-source-alist-for-file (file)
+ (mapcar
+ (lambda (c)
+ (cons c file))
+ (gud-jdb-analyze-source gud-jdb-analysis-buffer file)))
+
+;; Return an alist of fully qualified classes and the source files
+;; holding their definitions. SOURCES holds a list of all the source
+;; files to examine.
+(defun gud-jdb-build-class-source-alist (sources)
+ (setq gud-jdb-analysis-buffer (get-buffer-create " *gud-jdb-scratch*"))
+ (prog1
+ (apply
+ 'nconc
+ (mapcar
+ 'gud-jdb-build-class-source-alist-for-file
+ sources))
+ (kill-buffer gud-jdb-analysis-buffer)
+ (setq gud-jdb-analysis-buffer nil)))
+
+;; Change what was given in the minibuffer to something that can be used to
+;; invoke the debugger.
+(defun gud-jdb-massage-args (file args)
+ ;; The jdb executable must have whitespace between "-classpath" and
+ ;; its value while gud-common-init expects all switch values to
+ ;; follow the switch keyword without intervening whitespace. We
+ ;; require that when the user enters the "-classpath" switch in the
+ ;; EMACS minibuffer that they do so without the intervening
+ ;; whitespace. This function adds it back (it's called after
+ ;; gud-common-init). There are more switches like this (for
+ ;; instance "-host" and "-password") but I don't care about them
+ ;; yet.
+ (if args
+ (let (massaged-args user-error)
+
+ (while
+ (and args
+ (not (string-match "-classpath\\(.+\\)" (car args)))
+ (not (setq user-error
+ (string-match "-classpath$" (car args)))))
+ (setq massaged-args (append massaged-args (list (car args))))
+ (setq args (cdr args)))
+
+ ;; By this point the current directory is all screwed up. Maybe we
+ ;; could fix things and re-invoke gud-common-init, but for now I think
+ ;; issueing the error is good enough.
+ (if user-error
+ (progn
+ (kill-buffer (current-buffer))
+ (error "Error: Omit whitespace between '-classpath' and its value")))
+
+ (if args
+ (setq massaged-args
+ (append
+ massaged-args
+ (list "-classpath")
+ (list
+ (substring
+ (car args)
+ (match-beginning 1) (match-end 1)))
+ (cdr args)))
+ massaged-args))))
+
+;; Search for an association with P, a fully qualified class name, in
+;; gud-jdb-class-source-alist. The asssociation gives the fully
+;; qualified file name of the source file which produced the class.
+(defun gud-jdb-find-source-file (p)
+ (cdr (assoc p gud-jdb-class-source-alist)))
+
+;; See comentary for other debugger's marker filters - there you will find
+;; important notes about STRING.
+(defun gud-jdb-marker-filter (string)
+
+ ;; Build up the accumulator.
+ (setq gud-marker-acc
+ (if gud-marker-acc
+ (concat gud-marker-acc string)
+ string))
+
+ ;; We process STRING from left to right. Each time through the following
+ ;; loop we process at most one marker. The start variable keeps track of
+ ;; where we are in the input string through the iterations of this loop.
+ (let (start file-found)
+
+ ;; Process each complete marker in the input. There may be an incomplete
+ ;; marker at the end of the input string. Incomplete markers are left
+ ;; in the accumulator for processing the next time the function is called.
+ (while
+
+ ;; Do we see a marker?
+ (string-match
+ ;; jdb puts out a string of the following form when it
+ ;; hits a breakpoint:
+ ;;
+ ;; <fully-qualified-class><method> (<class>:<line-number>)
+ ;;
+ ;; <fully-qualified-class>'s are composed of Java ID's
+ ;; separated by periods. <method> and <class> are
+ ;; also Java ID's. <method> begins with a period and
+ ;; may contain less-than and greater-than (constructors,
+ ;; for instance, are called <init> in the symbol table.)
+ ;; Java ID's begin with a letter followed by letters
+ ;; and/or digits. The set of letters includes underscore
+ ;; and dollar sign.
+ ;;
+ ;; The first group matches <fully-qualified-class>,
+ ;; the second group matches <class> and the third group
+ ;; matches <line-number>. We don't care about using
+ ;; <method> so we don't "group" it.
+ ;;
+ ;; FIXME: Java ID's are UNICODE strings, this matches ASCII
+ ;; ID's only.
+ "\\([a-zA-Z0-9.$_]+\\)\\.[a-zA-Z0-9$_<>]+ (\\([a-zA-Z0-9$_]+\\):\\([0-9]+\\))"
+ gud-marker-acc start)
+
+ ;; Figure out the line on which to position the debugging arrow.
+ ;; Return the info as a cons of the form:
+ ;;
+ ;; (<file-name> . <line-number>) .
+ (if (setq
+ file-found
+ (gud-jdb-find-source-file
+ (substring gud-marker-acc
+ (match-beginning 1)
+ (match-end 1))))
+ (setq gud-last-frame
+ (cons
+ file-found
+ (string-to-int
+ (substring gud-marker-acc
+ (match-beginning 3)
+ (match-end 3)))))
+ (message "Could not find source file."))
+
+ ;; Set start after the last character of STRING that we've looked at
+ ;; and loop to look for another marker.
+ (setq start (match-end 0))))
+
+ ;; We don't filter any debugger output so just return what we were given.
+ string)
+
+(defun gud-jdb-find-file (f)
+ (and (file-readable-p f)
+ (find-file-noselect f)))
+
+(defvar gud-jdb-command-name "jdb" "Command that executes the Java debugger.")
+
+;;;###autoload
+(defun jdb (command-line)
+ "Run jdb with command line COMMAND-LINE in a buffer. The buffer is named
+\"*gud*\" if no initial class is given or \"*gud-<initial-class-basename>*\"
+if there is. If the \"-classpath\" switch is given, omit all whitespace
+between it and it's value."
+ (interactive
+ (list (gud-query-cmdline 'jdb)))
+
+ (gud-common-init command-line 'gud-jdb-massage-args
+ 'gud-jdb-marker-filter 'gud-jdb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'jdb)
+
+ (gud-def gud-break "stop at %F:%l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
+ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "cont" "\C-r" "Continue with display.")
+
+ (setq comint-prompt-regexp "^> \\|^.+\\[[0-9]+\\] ")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'jdb-mode-hook)
+
+ ;; Create and bind the class/source association list as well as the source
+ ;; file list.
+ (setq
+ gud-jdb-class-source-alist
+ (gud-jdb-build-class-source-alist
+ (setq
+ gud-jdb-source-files
+ (gud-jdb-build-source-files-list gud-jdb-directories "\\.java$")))))
+
+
+;; ======================================================================
+;;
+;; BASHDB support. See http://bashdb.sourceforge.net
+;;
+;; AUTHOR: Rocky Bernstein <rocky@panix.com>
+;;
+;; CREATED: Sun Nov 10 10:46:38 2002 Rocky Bernstein.
+;;
+;; INVOCATION NOTES:
+;;
+;; You invoke bashdb-mode with:
+;;
+;; M-x bashdb <enter>
+;;
+;; It responds with:
+;;
+;; Run bashdb (like this): bash
+;;
+
+;; History of argument lists passed to bashdb.
+(defvar gud-bashdb-history nil)
+
+;; Convert a command line as would be typed normally to run a script
+;; into one that invokes an Emacs-enabled debugging session.
+;; "--debugger" in inserted as the first switch.
+
+(defun gud-bashdb-massage-args (file args)
+ (let* ((new-args (list "--debugger"))
+ (seen-e nil)
+ (shift (lambda ()
+ (setq new-args (cons (car args) new-args))
+ (setq args (cdr args)))))
+
+ ;; Pass all switches and -e scripts through.
+ (while (and args
+ (string-match "^-" (car args))
+ (not (equal "-" (car args)))
+ (not (equal "--" (car args))))
+ (funcall shift))
+
+ (if (or (not args)
+ (string-match "^-" (car args)))
+ (error "Can't use stdin as the script to debug"))
+ ;; This is the program name.
+ (funcall shift)
+
+ (while args
+ (funcall shift))
+
+ (nreverse new-args)))
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(defun gud-bashdb-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ ;; Format of line looks like this:
+ ;; (/etc/init.d/ntp.init:16):
+ ;; but we also allow DOS drive letters
+ ;; (d:/etc/init.d/ntp.init:16):
+ (while (string-match "\\(^\\|\n\\)(\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\)):.*\n"
+ gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (cons (substring gud-marker-acc (match-beginning 2) (match-end 2))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 4)
+ (match-end 4))))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "\032.*\\'" gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+(defun gud-bashdb-find-file (f)
+ (save-excursion
+ (let ((buf (find-file-noselect f 'nowarn)))
+ (set-buffer buf)
+ buf)))
+
+(defcustom gud-bashdb-command-name "bash"
+ "File name for executing bash debugger."
+ :type 'string
+ :group 'gud)
+
+;;;###autoload
+(defun bashdb (command-line)
+ "Run bashdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive
+ (list (read-from-minibuffer "Run bashdb (like this): "
+ (if (consp gud-bashdb-history)
+ (car gud-bashdb-history)
+ (concat gud-bashdb-command-name
+ " "))
+ gud-minibuffer-local-map nil
+ '(gud-bashdb-history . 1))))
+
+ (gud-common-init command-line 'gud-bashdb-massage-args
+ 'gud-bashdb-marker-filter 'gud-bashdb-find-file)
+
+ (set (make-local-variable 'gud-minor-mode) 'bashdb)
+
+ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-tbreak "tbreak %l" "\C-t" "Set temporary breakpoint at current line.")
+ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
+ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
+ (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
+ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
+ (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
+ (gud-def gud-print "x %e" "\C-p" "Evaluate bash expression at point.")
+
+ ;; Is this right?
+ (gud-def gud-statement "eval %e" "\C-e" "Execute BASH statement at point.")
+
+ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
+ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+
+ (setq comint-prompt-regexp "^bashdb<+(*[0-9]+)*>+ ")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'bashdb-mode-hook)
+ )
+
+(provide 'bashdb)
+
+;;
+;; End of debugger-specific information
+;;
+
+
+;;; When we send a command to the debugger via gud-call, it's annoying
+;;; to see the command and the new prompt inserted into the debugger's
+;;; buffer; we have other ways of knowing the command has completed.
+;;;
+;;; If the buffer looks like this:
+;;; --------------------
+;;; (gdb) set args foo bar
+;;; (gdb) -!-
+;;; --------------------
+;;; (the -!- marks the location of point), and we type `C-x SPC' in a
+;;; source file to set a breakpoint, we want the buffer to end up like
+;;; this:
+;;; --------------------
+;;; (gdb) set args foo bar
+;;; Breakpoint 1 at 0x92: file make-docfile.c, line 49.
+;;; (gdb) -!-
+;;; --------------------
+;;; Essentially, the old prompt is deleted, and the command's output
+;;; and the new prompt take its place.
+;;;
+;;; Not echoing the command is easy enough; you send it directly using
+;;; process-send-string, and it never enters the buffer. However,
+;;; getting rid of the old prompt is trickier; you don't want to do it
+;;; when you send the command, since that will result in an annoying
+;;; flicker as the prompt is deleted, redisplay occurs while Emacs
+;;; waits for a response from the debugger, and the new prompt is
+;;; inserted. Instead, we'll wait until we actually get some output
+;;; from the subprocess before we delete the prompt. If the command
+;;; produced no output other than a new prompt, that prompt will most
+;;; likely be in the first chunk of output received, so we will delete
+;;; the prompt and then replace it with an identical one. If the
+;;; command produces output, the prompt is moving anyway, so the
+;;; flicker won't be annoying.
+;;;
+;;; So - when we want to delete the prompt upon receipt of the next
+;;; chunk of debugger output, we position gud-delete-prompt-marker at
+;;; the start of the prompt; the process filter will notice this, and
+;;; delete all text between it and the process output marker. If
+;;; gud-delete-prompt-marker points nowhere, we leave the current
+;;; prompt alone.
+(defvar gud-delete-prompt-marker nil)
+
+
+(put 'gud-mode 'mode-class 'special)
+
+(define-derived-mode gud-mode comint-mode "Debugger"
+ "Major mode for interacting with an inferior debugger process.
+
+ You start it up with one of the commands M-x gdb, M-x sdb, M-x dbx,
+M-x perldb, or M-x xdb. Each entry point finishes by executing a
+hook; `gdb-mode-hook', `sdb-mode-hook', `dbx-mode-hook',
+`perldb-mode-hook', or `xdb-mode-hook' respectively.
+
+After startup, the following commands are available in both the GUD
+interaction buffer and any source buffer GUD visits due to a breakpoint stop
+or step operation:
+
+\\[gud-break] sets a breakpoint at the current file and line. In the
+GUD buffer, the current file and line are those of the last breakpoint or
+step. In a source buffer, they are the buffer's file and current line.
+
+\\[gud-remove] removes breakpoints on the current file and line.
+
+\\[gud-refresh] displays in the source window the last line referred to
+in the gud buffer.
+
+\\[gud-step], \\[gud-next], and \\[gud-stepi] do a step-one-line,
+step-one-line (not entering function calls), and step-one-instruction
+and then update the source window with the current file and position.
+\\[gud-cont] continues execution.
+
+\\[gud-print] tries to find the largest C lvalue or function-call expression
+around point, and sends it to the debugger for value display.
+
+The above commands are common to all supported debuggers except xdb which
+does not support stepping instructions.
+
+Under gdb, sdb and xdb, \\[gud-tbreak] behaves exactly like \\[gud-break],
+except that the breakpoint is temporary; that is, it is removed when
+execution stops on it.
+
+Under gdb, dbx, and xdb, \\[gud-up] pops up through an enclosing stack
+frame. \\[gud-down] drops back down through one.
+
+If you are using gdb or xdb, \\[gud-finish] runs execution to the return from
+the current function and stops.
+
+All the keystrokes above are accessible in the GUD buffer
+with the prefix C-c, and in all buffers through the prefix C-x C-a.
+
+All pre-defined functions for which the concept make sense repeat
+themselves the appropriate number of times if you give a prefix
+argument.
+
+You may use the `gud-def' macro in the initialization hook to define other
+commands.
+
+Other commands for interacting with the debugger process are inherited from
+comint mode, which see."
+ (setq mode-line-process '(":%s"))
+ (define-key (current-local-map) "\C-c\C-l" 'gud-refresh)
+ (set (make-local-variable 'gud-last-frame) nil)
+ (make-local-variable 'comint-prompt-regexp)
+ ;; Don't put repeated commands in command history many times.
+ (set (make-local-variable 'comint-input-ignoredups) t)
+ (make-local-variable 'paragraph-start)
+ (set (make-local-variable 'gud-delete-prompt-marker) (make-marker)))
+
+;; Cause our buffers to be displayed, by default,
+;; in the selected window.
+;;;###autoload (add-hook 'same-window-regexps "\\*gud-.*\\*\\(\\|<[0-9]+>\\)")
+
+(defcustom gud-chdir-before-run t
+ "Non-nil if GUD should `cd' to the debugged executable."
+ :group 'gud
+ :type 'boolean)
+
+;; Perform initializations common to all debuggers.
+;; The first arg is the specified command line,
+;; which starts with the program to debug.
+;; The other three args specify the values to use
+;; for local variables in the debugger buffer.
+(defun gud-common-init (command-line massage-args marker-filter &optional find-file)
+ (let* ((words (split-string command-line))
+ (program (car words))
+ ;; Extract the file name from WORDS
+ ;; and put t in its place.
+ ;; Later on we will put the modified file name arg back there.
+ (file-word (let ((w (cdr words)))
+ (while (and w (= ?- (aref (car w) 0)))
+ (setq w (cdr w)))
+ (and w
+ (prog1 (car w)
+ (setcar w t)))))
+ (file-subst
+ (and file-word (substitute-in-file-name file-word)))
+ (args (cdr words))
+ ;; If a directory was specified, expand the file name.
+ ;; Otherwise, don't expand it, so GDB can use the PATH.
+ ;; A file name without directory is literally valid
+ ;; only if the file exists in ., and in that case,
+ ;; omitting the expansion here has no visible effect.
+ (file (and file-word
+ (if (file-name-directory file-subst)
+ (expand-file-name file-subst)
+ file-subst)))
+ (filepart (and file-word (concat "-" (file-name-nondirectory file)))))
+ (pop-to-buffer (concat "*gud" filepart "*"))
+ ;; Set default-directory to the file's directory.
+ (and file-word
+ gud-chdir-before-run
+ ;; Don't set default-directory if no directory was specified.
+ ;; In that case, either the file is found in the current directory,
+ ;; in which case this setq is a no-op,
+ ;; or it is found by searching PATH,
+ ;; in which case we don't know what directory it was found in.
+ (file-name-directory file)
+ (setq default-directory (file-name-directory file)))
+ (or (bolp) (newline))
+ (insert "Current directory is " default-directory "\n")
+ ;; Put the substituted and expanded file name back in its place.
+ (let ((w args))
+ (while (and w (not (eq (car w) t)))
+ (setq w (cdr w)))
+ (if w
+ (setcar w file)))
+ (apply 'make-comint (concat "gud" filepart) program nil
+ (funcall massage-args file args)))
+ ;; Since comint clobbered the mode, we don't set it until now.
+ (gud-mode)
+ (make-local-variable 'gud-marker-filter)
+ (setq gud-marker-filter marker-filter)
+ (if find-file (set (make-local-variable 'gud-find-file) find-file))
+
+ (set-process-filter (get-buffer-process (current-buffer)) 'gud-filter)
+ (set-process-sentinel (get-buffer-process (current-buffer)) 'gud-sentinel)
+ (gud-set-buffer))
+
+(defun gud-set-buffer ()
+ (when (eq major-mode 'gud-mode)
+ (setq gud-comint-buffer (current-buffer))))
+
+(defvar gud-filter-defer-flag nil
+ "Non-nil means don't process anything from the debugger right now.
+It is saved for when this flag is not set.")
+
+(defvar gud-filter-pending-text nil
+ "Non-nil means this is text that has been saved for later in `gud-filter'.")
+
+;; These functions are responsible for inserting output from your debugger
+;; into the buffer. The hard work is done by the method that is
+;; the value of gud-marker-filter.
+
+(defun gud-filter (proc string)
+ ;; Here's where the actual buffer insertion is done
+ (let (output process-window)
+ (if (buffer-name (process-buffer proc))
+ (if gud-filter-defer-flag
+ ;; If we can't process any text now,
+ ;; save it for later.
+ (setq gud-filter-pending-text
+ (concat (or gud-filter-pending-text "") string))
+
+ ;; If we have to ask a question during the processing,
+ ;; defer any additional text that comes from the debugger
+ ;; during that time.
+ (let ((gud-filter-defer-flag t))
+ ;; Process now any text we previously saved up.
+ (if gud-filter-pending-text
+ (setq string (concat gud-filter-pending-text string)
+ gud-filter-pending-text nil))
+
+ (with-current-buffer (process-buffer proc)
+ ;; If we have been so requested, delete the debugger prompt.
+ (save-restriction
+ (widen)
+ (if (marker-buffer gud-delete-prompt-marker)
+ (progn
+ (delete-region (process-mark proc)
+ gud-delete-prompt-marker)
+ (set-marker gud-delete-prompt-marker nil)))
+ ;; Save the process output, checking for source file markers.
+ (setq output (gud-marker-filter string))
+ ;; Check for a filename-and-line number.
+ ;; Don't display the specified file
+ ;; unless (1) point is at or after the position where output appears
+ ;; and (2) this buffer is on the screen.
+ (setq process-window
+ (and gud-last-frame
+ (>= (point) (process-mark proc))
+ (get-buffer-window (current-buffer)))))
+
+ ;; Let the comint filter do the actual insertion.
+ ;; That lets us inherit various comint features.
+ (comint-output-filter proc output))
+
+ ;; Put the arrow on the source line.
+ ;; This must be outside of the save-excursion
+ ;; in case the source file is our current buffer.
+ (if process-window
+ (save-selected-window
+ (select-window process-window)
+ (gud-display-frame))
+ ;; We have to be in the proper buffer, (process-buffer proc),
+ ;; but not in a save-excursion, because that would restore point.
+ (let ((old-buf (current-buffer)))
+ (set-buffer (process-buffer proc))
+ (unwind-protect
+ (gud-display-frame)
+ (set-buffer old-buf)))))
+
+ ;; If we deferred text that arrived during this processing,
+ ;; handle it now.
+ (if gud-filter-pending-text
+ (gud-filter proc ""))))))
+
+(defun gud-sentinel (proc msg)
+ (cond ((null (buffer-name (process-buffer proc)))
+ ;; buffer killed
+ ;; Stop displaying an arrow in a source file.
+ (setq overlay-arrow-position nil)
+ (set-process-buffer proc nil))
+ ((memq (process-status proc) '(signal exit))
+ ;; Stop displaying an arrow in a source file.
+ (setq overlay-arrow-position nil)
+ (let* ((obuf (current-buffer)))
+ ;; save-excursion isn't the right thing if
+ ;; process-buffer is current-buffer
+ (unwind-protect
+ (progn
+ ;; Write something in *compilation* and hack its mode line,
+ (set-buffer (process-buffer proc))
+ ;; Fix the mode line.
+ (setq mode-line-process
+ (concat ":"
+ (symbol-name (process-status proc))))
+ (force-mode-line-update)
+ (if (eobp)
+ (insert ?\n mode-name " " msg)
+ (save-excursion
+ (goto-char (point-max))
+ (insert ?\n mode-name " " msg)))
+ ;; If buffer and mode line will show that the process
+ ;; is dead, we can delete it now. Otherwise it
+ ;; will stay around until M-x list-processes.
+ (delete-process proc))
+ ;; Restore old buffer, but don't restore old point
+ ;; if obuf is the gud buffer.
+ (set-buffer obuf))))))
+
+(defun gud-display-frame ()
+ "Find and obey the last filename-and-line marker from the debugger.
+Obeying it means displaying in another window the specified file and line."
+ (interactive)
+ (if gud-last-frame
+ (progn
+ (gud-set-buffer)
+ (gud-display-line (car gud-last-frame) (cdr gud-last-frame))
+ (setq gud-last-last-frame gud-last-frame
+ gud-last-frame nil))))
+
+;; Make sure the file named TRUE-FILE is in a buffer that appears on the screen
+;; and that its line LINE is visible.
+;; Put the overlay-arrow on the line LINE in that buffer.
+;; Most of the trickiness in here comes from wanting to preserve the current
+;; region-restriction if that's possible. We use an explicit display-buffer
+;; to get around the fact that this is called inside a save-excursion.
+
+(defun gud-display-line (true-file line)
+ (let* ((last-nonmenu-event t) ; Prevent use of dialog box for questions.
+ (buffer
+ (save-excursion
+ (or (eq (current-buffer) gud-comint-buffer)
+ (set-buffer gud-comint-buffer))
+ (gud-find-file true-file)))
+ (window (and buffer (or (get-buffer-window buffer)
+ (display-buffer buffer))))
+ (pos))
+ (if buffer
+ (progn
+ (save-excursion
+ (set-buffer buffer)
+ (save-restriction
+ (widen)
+ (goto-line line)
+ (setq pos (point))
+ (setq overlay-arrow-string "=>")
+ (or overlay-arrow-position
+ (setq overlay-arrow-position (make-marker)))
+ (set-marker overlay-arrow-position (point) (current-buffer)))
+ (cond ((or (< pos (point-min)) (> pos (point-max)))
+ (widen)
+ (goto-char pos))))
+ (set-window-point window overlay-arrow-position)))))
+
+;;; The gud-call function must do the right thing whether its invoking
+;;; keystroke is from the GUD buffer itself (via major-mode binding)
+;;; or a C buffer. In the former case, we want to supply data from
+;;; gud-last-frame. Here's how we do it:
+
+(defun gud-format-command (str arg)
+ (let ((insource (not (eq (current-buffer) gud-comint-buffer)))
+ (frame (or gud-last-frame gud-last-last-frame))
+ result)
+ (while (and str (string-match "\\([^%]*\\)%\\([adeflp]\\)" str))
+ (let ((key (string-to-char (substring str (match-beginning 2))))
+ subst)
+ (cond
+ ((eq key ?f)
+ (setq subst (file-name-nondirectory (if insource
+ (buffer-file-name)
+ (car frame)))))
+ ((eq key ?F)
+ (setq subst (file-name-sans-extension
+ (file-name-nondirectory (if insource
+ (buffer-file-name)
+ (car frame))))))
+ ((eq key ?d)
+ (setq subst (file-name-directory (if insource
+ (buffer-file-name)
+ (car frame)))))
+ ((eq key ?l)
+ (setq subst (if insource
+ (save-excursion
+ (beginning-of-line)
+ (save-restriction
+ (widen)
+ (int-to-string (1+ (count-lines 1 (point))))))
+ (cdr frame))))
+ ((eq key ?e)
+ (setq subst (gud-find-c-expr)))
+ ((eq key ?a)
+ (setq subst (gud-read-address)))
+ ((eq key ?p)
+ (setq subst (if arg (int-to-string arg)))))
+ (setq result (concat result (match-string 1 str) subst)))
+ (setq str (substring str (match-end 2))))
+ ;; There might be text left in STR when the loop ends.
+ (concat result str)))
+
+(defun gud-read-address ()
+ "Return a string containing the core-address found in the buffer at point."
+ (save-excursion
+ (let ((pt (point)) found begin)
+ (setq found (if (search-backward "0x" (- pt 7) t) (point)))
+ (cond
+ (found (forward-char 2)
+ (buffer-substring found
+ (progn (re-search-forward "[^0-9a-f]")
+ (forward-char -1)
+ (point))))
+ (t (setq begin (progn (re-search-backward "[^0-9]")
+ (forward-char 1)
+ (point)))
+ (forward-char 1)
+ (re-search-forward "[^0-9]")
+ (forward-char -1)
+ (buffer-substring begin (point)))))))
+
+(defun gud-call (fmt &optional arg)
+ (let ((msg (gud-format-command fmt arg)))
+ (message "Command: %s" msg)
+ (sit-for 0)
+ (gud-basic-call msg)))
+
+(defun gud-basic-call (command)
+ "Invoke the debugger COMMAND displaying source in other window."
+ (interactive)
+ (gud-set-buffer)
+ (let ((command (concat command "\n"))
+ (proc (get-buffer-process gud-comint-buffer)))
+ (or proc (error "Current buffer has no process"))
+ ;; Arrange for the current prompt to get deleted.
+ (save-excursion
+ (set-buffer gud-comint-buffer)
+ (save-restriction
+ (widen)
+ (goto-char (process-mark proc))
+ (forward-line 0)
+ (if (looking-at comint-prompt-regexp)
+ (set-marker gud-delete-prompt-marker (point)))))
+ (process-send-string proc command)))
+
+(defun gud-refresh (&optional arg)
+ "Fix up a possibly garbled display, and redraw the arrow."
+ (interactive "P")
+ (or gud-last-frame (setq gud-last-frame gud-last-last-frame))
+ (gud-display-frame)
+ (recenter arg))
+
+;;; Code for parsing expressions out of C code. The single entry point is
+;;; find-c-expr, which tries to return an lvalue expression from around point.
+;;;
+;;; The rest of this file is a hacked version of gdbsrc.el by
+;;; Debby Ayers <ayers@asc.slb.com>,
+;;; Rich Schaefer <schaefer@asc.slb.com> Schlumberger, Austin, Tx.
+
+(defun gud-find-c-expr ()
+ "Returns the C expr that surrounds point."
+ (interactive)
+ (save-excursion
+ (let (p expr test-expr)
+ (setq p (point))
+ (setq expr (gud-innermost-expr))
+ (setq test-expr (gud-prev-expr))
+ (while (and test-expr (gud-expr-compound test-expr expr))
+ (let ((prev-expr expr))
+ (setq expr (cons (car test-expr) (cdr expr)))
+ (goto-char (car expr))
+ (setq test-expr (gud-prev-expr))
+ ;; If we just pasted on the condition of an if or while,
+ ;; throw it away again.
+ (if (member (buffer-substring (car test-expr) (cdr test-expr))
+ '("if" "while" "for"))
+ (setq test-expr nil
+ expr prev-expr))))
+ (goto-char p)
+ (setq test-expr (gud-next-expr))
+ (while (gud-expr-compound expr test-expr)
+ (setq expr (cons (car expr) (cdr test-expr)))
+ (setq test-expr (gud-next-expr)))
+ (buffer-substring (car expr) (cdr expr)))))
+
+(defun gud-innermost-expr ()
+ "Returns the smallest expr that point is in; move point to beginning of it.
+The expr is represented as a cons cell, where the car specifies the point in
+the current buffer that marks the beginning of the expr and the cdr specifies
+the character after the end of the expr."
+ (let ((p (point)) begin end)
+ (gud-backward-sexp)
+ (setq begin (point))
+ (gud-forward-sexp)
+ (setq end (point))
+ (if (>= p end)
+ (progn
+ (setq begin p)
+ (goto-char p)
+ (gud-forward-sexp)
+ (setq end (point)))
+ )
+ (goto-char begin)
+ (cons begin end)))
+
+(defun gud-backward-sexp ()
+ "Version of `backward-sexp' that catches errors."
+ (condition-case nil
+ (backward-sexp)
+ (error t)))
+
+(defun gud-forward-sexp ()
+ "Version of `forward-sexp' that catches errors."
+ (condition-case nil
+ (forward-sexp)
+ (error t)))
+
+(defun gud-prev-expr ()
+ "Returns the previous expr, point is set to beginning of that expr.
+The expr is represented as a cons cell, where the car specifies the point in
+the current buffer that marks the beginning of the expr and the cdr specifies
+the character after the end of the expr"
+ (let ((begin) (end))
+ (gud-backward-sexp)
+ (setq begin (point))
+ (gud-forward-sexp)
+ (setq end (point))
+ (goto-char begin)
+ (cons begin end)))
+
+(defun gud-next-expr ()
+ "Returns the following expr, point is set to beginning of that expr.
+The expr is represented as a cons cell, where the car specifies the point in
+the current buffer that marks the beginning of the expr and the cdr specifies
+the character after the end of the expr."
+ (let ((begin) (end))
+ (gud-forward-sexp)
+ (gud-forward-sexp)
+ (setq end (point))
+ (gud-backward-sexp)
+ (setq begin (point))
+ (cons begin end)))
+
+(defun gud-expr-compound-sep (span-start span-end)
+ "Scan from SPAN-START to SPAN-END for punctuation characters.
+If `->' is found, return `?.'. If `.' is found, return `?.'.
+If any other punctuation is found, return `??'.
+If no punctuation is found, return `? '."
+ (let ((result ?\ )
+ (syntax))
+ (while (< span-start span-end)
+ (setq syntax (char-syntax (char-after span-start)))
+ (cond
+ ((= syntax ?\ ) t)
+ ((= syntax ?.) (setq syntax (char-after span-start))
+ (cond
+ ((= syntax ?.) (setq result ?.))
+ ((and (= syntax ?-) (= (char-after (+ span-start 1)) ?>))
+ (setq result ?.)
+ (setq span-start (+ span-start 1)))
+ (t (setq span-start span-end)
+ (setq result ??)))))
+ (setq span-start (+ span-start 1)))
+ result))
+
+(defun gud-expr-compound (first second)
+ "Non-nil if concatenating FIRST and SECOND makes a single C expression.
+The two exprs are represented as a cons cells, where the car
+specifies the point in the current buffer that marks the beginning of the
+expr and the cdr specifies the character after the end of the expr.
+Link exprs of the form:
+ Expr -> Expr
+ Expr . Expr
+ Expr (Expr)
+ Expr [Expr]
+ (Expr) Expr
+ [Expr] Expr"
+ (let ((span-start (cdr first))
+ (span-end (car second))
+ (syntax))
+ (setq syntax (gud-expr-compound-sep span-start span-end))
+ (cond
+ ((= (car first) (car second)) nil)
+ ((= (cdr first) (cdr second)) nil)
+ ((= syntax ?.) t)
+ ((= syntax ?\ )
+ (setq span-start (char-after (- span-start 1)))
+ (setq span-end (char-after span-end))
+ (cond
+ ((= span-start ?)) t)
+ ((= span-start ?]) t)
+ ((= span-end ?() t)
+ ((= span-end ?[) t)
+ (t nil)))
+ (t nil))))
+
+(provide 'gud)
+
+;;; gud.el ends here
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/emacs/gud.el.diff cvs/debugger/emacs/gud.el.diff
--- bash-2.05b/debugger/emacs/gud.el.diff 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/emacs/gud.el.diff 2002-12-06 17:27:53.000000000 +0100
@@ -0,0 +1,239 @@
+*** gud.el Fri Dec 6 10:17:26 2002
+--- gud-bashdb.el Fri Dec 6 09:26:18 2002
+***************
+*** 4,10 ****
+ ;; Maintainer: FSF
+ ;; Keywords: unix, tools
+
+! ;; Copyright (C) 1992, 93, 94, 95, 96, 1998, 2000 Free Software Foundation, Inc.
+
+ ;; This file is part of GNU Emacs.
+
+--- 4,10 ----
+ ;; Maintainer: FSF
+ ;; Keywords: unix, tools
+
+! ;; Copyright (C) 1992, 93, 94, 95, 96, 1998, 2000, 2002 Free Software Foundation, Inc.
+
+ ;; This file is part of GNU Emacs.
+
+***************
+*** 47,53 ****
+
+ (defgroup gud nil
+ "Grand Unified Debugger mode for gdb and other debuggers under Emacs.
+! Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), and jdb."
+ :group 'unix
+ :group 'tools)
+
+--- 47,53 ----
+
+ (defgroup gud nil
+ "Grand Unified Debugger mode for gdb and other debuggers under Emacs.
+! Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb, and bash."
+ :group 'unix
+ :group 'tools)
+
+***************
+*** 101,115 ****
+ '(([refresh] "Refresh" . gud-refresh)
+ ([remove] "Remove Breakpoint" . gud-remove)
+ ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak
+! :enable (memq gud-minor-mode '(gdb sdb xdb)))
+ ([break] "Set Breakpoint" . gud-break)
+ ([up] menu-item "Up Stack" gud-up
+! :enable (memq gud-minor-mode '(gdb dbx xdb)))
+ ([down] menu-item "Down Stack" gud-down
+! :enable (memq gud-minor-mode '(gdb dbx xdb)))
+ ([print] "Print Expression" . gud-print)
+ ([finish] menu-item "Finish Function" gud-finish
+! :enable (memq gud-minor-mode '(gdb xdb)))
+ ([stepi] "Step Instruction" . gud-stepi)
+ ([step] "Step Line" . gud-step)
+ ([next] "Next Line" . gud-next)
+--- 101,115 ----
+ '(([refresh] "Refresh" . gud-refresh)
+ ([remove] "Remove Breakpoint" . gud-remove)
+ ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak
+! :enable (memq gud-minor-mode '(gdb sdb xdb bashdb)))
+ ([break] "Set Breakpoint" . gud-break)
+ ([up] menu-item "Up Stack" gud-up
+! :enable (memq gud-minor-mode '(gdb dbx xdb bashdb)))
+ ([down] menu-item "Down Stack" gud-down
+! :enable (memq gud-minor-mode '(gdb dbx xdb bashdb)))
+ ([print] "Print Expression" . gud-print)
+ ([finish] menu-item "Finish Function" gud-finish
+! :enable (memq gud-minor-mode '(gdb xdb bashdb)))
+ ([stepi] "Step Instruction" . gud-stepi)
+ ([step] "Step Line" . gud-step)
+ ([next] "Next Line" . gud-next)
+***************
+*** 1904,1909 ****
+--- 1904,2070 ----
+ (gud-jdb-build-source-files-list gud-jdb-directories "\\.java$")))))
+
+
++ ;; ======================================================================
++ ;;
++ ;; BASHDB support. See http://bashdb.sourceforge.net
++ ;;
++ ;; AUTHOR: Rocky Bernstein <rocky@panix.com>
++ ;;
++ ;; CREATED: Sun Nov 10 10:46:38 2002 Rocky Bernstein.
++ ;;
++ ;; INVOCATION NOTES:
++ ;;
++ ;; You invoke bashdb-mode with:
++ ;;
++ ;; M-x bashdb <enter>
++ ;;
++ ;; It responds with:
++ ;;
++ ;; Run bashdb (like this): bash
++ ;;
++
++ ;;; History of argument lists passed to bashdb.
++ (defvar gud-bashdb-history nil)
++
++ ;; Convert a command line as would be typed normally to run a script
++ ;; into one that invokes an Emacs-enabled debugging session.
++ ;; "--debugger" in inserted as the first switch.
++
++ (defun gud-bashdb-massage-args (file args)
++ (let* ((new-args (list "--debugger"))
++ (seen-e nil)
++ (shift (lambda ()
++ (setq new-args (cons (car args) new-args))
++ (setq args (cdr args)))))
++
++ ;; Pass all switches and -e scripts through.
++ (while (and args
++ (string-match "^-" (car args))
++ (not (equal "-" (car args)))
++ (not (equal "--" (car args))))
++ (funcall shift))
++
++ (if (or (not args)
++ (string-match "^-" (car args)))
++ (error "Can't use stdin as the script to debug"))
++ ;; This is the program name.
++ (funcall shift)
++
++ (while args
++ (funcall shift))
++
++ (nreverse new-args)))
++
++ ;; There's no guarantee that Emacs will hand the filter the entire
++ ;; marker at once; it could be broken up across several strings. We
++ ;; might even receive a big chunk with several markers in it. If we
++ ;; receive a chunk of text which looks like it might contain the
++ ;; beginning of a marker, we save it here between calls to the
++ ;; filter.
++ (defun gud-bashdb-marker-filter (string)
++ (setq gud-marker-acc (concat gud-marker-acc string))
++ (let ((output ""))
++
++ ;; Process all the complete markers in this chunk.
++ ;; Format of line looks like this:
++ ;; (/etc/init.d/ntp.init:16):
++ ;; but we also allow DOS drive letters
++ ;; (d:/etc/init.d/ntp.init:16):
++ (while (string-match "\\(^\\|\n\\)(\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\)):.*\n"
++ gud-marker-acc)
++ (setq
++
++ ;; Extract the frame position from the marker.
++ gud-last-frame
++ (cons (substring gud-marker-acc (match-beginning 2) (match-end 2))
++ (string-to-int (substring gud-marker-acc
++ (match-beginning 4)
++ (match-end 4))))
++
++ ;; Append any text before the marker to the output we're going
++ ;; to return - we don't include the marker in this text.
++ output (concat output
++ (substring gud-marker-acc 0 (match-beginning 0)))
++
++ ;; Set the accumulator to the remaining text.
++ gud-marker-acc (substring gud-marker-acc (match-end 0))))
++
++ ;; Does the remaining text look like it might end with the
++ ;; beginning of another marker? If it does, then keep it in
++ ;; gud-marker-acc until we receive the rest of it. Since we
++ ;; know the full marker regexp above failed, it's pretty simple to
++ ;; test for marker starts.
++ (if (string-match "\032.*\\'" gud-marker-acc)
++ (progn
++ ;; Everything before the potential marker start can be output.
++ (setq output (concat output (substring gud-marker-acc
++ 0 (match-beginning 0))))
++
++ ;; Everything after, we save, to combine with later input.
++ (setq gud-marker-acc
++ (substring gud-marker-acc (match-beginning 0))))
++
++ (setq output (concat output gud-marker-acc)
++ gud-marker-acc ""))
++
++ output))
++
++ (defun gud-bashdb-find-file (f)
++ (save-excursion
++ (let ((buf (find-file-noselect f 'nowarn)))
++ (set-buffer buf)
++ buf)))
++
++ (defcustom gud-bashdb-command-name "bash"
++ "File name for executing bash debugger."
++ :type 'string
++ :group 'gud)
++
++ ;;;###autoload
++ (defun bashdb (command-line)
++ "Run bashdb on program FILE in buffer *gud-FILE*.
++ The directory containing FILE becomes the initial working directory
++ and source-file directory for your debugger."
++ (interactive
++ (list (read-from-minibuffer "Run bashdb (like this): "
++ (if (consp gud-bashdb-history)
++ (car gud-bashdb-history)
++ (concat gud-bashdb-command-name
++ " "))
++ gud-minibuffer-local-map nil
++ '(gud-bashdb-history . 1))))
++
++ (gud-common-init command-line 'gud-bashdb-massage-args
++ 'gud-bashdb-marker-filter 'gud-bashdb-find-file)
++
++ (set (make-local-variable 'gud-minor-mode) 'bashdb)
++
++ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
++ (gud-def gud-tbreak "tbreak %l" "\C-t" "Set temporary breakpoint at current line.")
++ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
++ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
++ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
++ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
++ (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
++ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
++ (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
++ (gud-def gud-print "pe %e" "\C-p" "Evaluate bash expression at point.")
++
++ ;; Is this right?
++ (gud-def gud-statement "eval %e" "\C-e" "Execute BASH statement at point.")
++
++ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
++ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
++ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
++ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
++
++ (setq comint-prompt-regexp "^bashdb<+(*[0-9]+)*>+ ")
++ (setq paragraph-start comint-prompt-regexp)
++ (run-hooks 'bashdb-mode-hook)
++ )
++
++ (provide 'bashdb)
++
+ ;;
+ ;; End of debugger-specific information
+ ;;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/Makefile.am cvs/debugger/test/Makefile.am
--- bash-2.05b/debugger/test/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/Makefile.am 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,100 @@
+## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+#$Id: Makefile.am,v 1.5 2003/06/08 14:39:28 rockyb Exp $
+
+check_DATA = action.right \
+ brkpt1.right \
+ brkpt2.right \
+ brkpt3.right \
+ bugIFS.right \
+ check_common \
+ check_common.in \
+ debug.right \
+ display.right \
+ finish.right \
+ list.right \
+ misc-output.right \
+ misc.right \
+ multi1.right \
+ multi2.right \
+ multi3.right \
+ multi4.right \
+ parm.right \
+ search.right \
+ sig.right \
+ skip.right \
+ subshell1.right \
+ subshell2.right \
+ subshell3.right \
+ subshell4.right \
+ tbreak.right \
+ watch1.right \
+ watch2.right \
+ action.tests \
+ brkpt1.tests \
+ brkpt2.tests \
+ brkpt3.tests \
+ bugIFS.tests \
+ debug.tests \
+ display.tests \
+ finish.tests \
+ list.tests \
+ misc.tests \
+ multi1.tests \
+ multi2.tests \
+ multi3.tests \
+ multi4.tests \
+ parm.tests \
+ search.tests \
+ sig.tests \
+ skip.tests \
+ subshell1.tests \
+ subshell2.tests \
+ subshell3.tests \
+ subshell4.tests \
+ tbreak.tests \
+ watch1.tests \
+ watch2.tests \
+ bugIFS.sh \
+ dbg-test1.sh \
+ dbg-test2.sh \
+ debug.sh \
+ multi.sh \
+ parm.sh \
+ sig.sh \
+ skip.sh \
+ subshell.sh \
+ action.cmd \
+ brkpt1.cmd \
+ brkpt2.cmd \
+ brkpt3.cmd \
+ bugIFS.cmd \
+ debug.cmd \
+ debug2.cmd \
+ display.cmd \
+ finish.cmd \
+ list.cmd \
+ misc.cmd \
+ multi1.cmd \
+ multi2.cmd \
+ multi3.cmd \
+ multi4.cmd \
+ parm.cmd \
+ prof1.cmd \
+ prof2.cmd \
+ search.cmd \
+ sig.cmd \
+ skip.cmd \
+ subshell1.cmd \
+ subshell2.cmd \
+ subshell3.cmd \
+ subshell4.cmd \
+ tbreak.cmd \
+ watch1.cmd \
+ watch2.cmd \
+ dbg-test1.sub
+
+TESTS = run-action run-brkpt run-bugIFS run-debug run-display \
+ run-finish run-list run-misc run-multi run-parm run-search \
+ run-sig run-skip run-subshell run-tbreak run-watch1 run-watch2
+
+EXTRA_DIST = $(TESTS) $(check_DATA)
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/action.cmd cvs/debugger/test/action.cmd
--- bash-2.05b/debugger/test/action.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/action.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,10 @@
+# $Id: action.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Debugger test of action command
+#
+p "** Try a simple action breakpoint..."
+a 23 x=60
+L
+cont 24
+print "value of x is now $x"
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/action.right cvs/debugger/test/action.right
--- bash-2.05b/debugger/test/action.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/action.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,13 @@
+(dbg-test1.sh:22):
+22: x=22
+** Try a simple action breakpoint...
+Breakpoint 0 set at dbg-test1.sh:23.
+No breakpoints have been set.
+No watch expressions have been set.
+Actions at following places:
+Num Enb Stmt file:line
+0 1 x=60 dbg-test1.sh:23
+One-time breakpoint 1 set in file dbg-test1.sh, line 24.
+(dbg-test1.sh:24):
+24: for i in 0 1 3 ; do
+value of x is now 60
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/action.tests cvs/debugger/test/action.tests
--- bash-2.05b/debugger/test/action.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/action.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: action.tests,v 1.2 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=action.cmd
+debugged_script=dbg-test1.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt1.cmd cvs/debugger/test/brkpt1.cmd
--- bash-2.05b/debugger/test/brkpt1.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt1.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,58 @@
+#
+# Test of breakpoint handling
+# $Id: brkpt1.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+#
+# Test the simplest of breakpoints
+break 22
+info break
+###############################################################
+print "*** Test enable/disable..."
+enable 1
+disable 1
+################################################################
+print "*** Try setting breakpoints outside of the file range..."
+break 99
+break 0
+#
+# list breakpoints
+L
+print "*** Try Deleting a non-existent breakpoint..."
+clear 10
+d 0
+###############################################################
+print "** Test display status..."
+delete 1
+info break
+break 22
+info break
+###############################################################
+print "*** Test using file:line format on break..."
+break ./dbg-test1.sh:23
+break ./dbg-test1.sh:0
+break ./dbg-test1.sh:1955
+break 23
+info break
+delete 3
+###############################################################
+print "*** Test breakpoints with conditions..."
+break 23 if x==0
+break 24 y > 25
+info break
+condition 23
+condition
+info break
+condition x==1
+condition 4 x==1
+condition bad
+condition 30 y==1
+disable 2 5
+info break
+enable 2 6
+delete 2 6
+print "*** Test info break..."
+info break 11
+info break foo
+info break 5
+d 23
+L
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt1.right cvs/debugger/test/brkpt1.right
--- bash-2.05b/debugger/test/brkpt1.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt1.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,89 @@
+(dbg-test1.sh:22):
+22: x=22
+Breakpoint 1 set in file dbg-test1.sh, line 22.
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:22
+No watch expressions have been set.
+*** Test enable/disable...
+Breakpoint entry 1 already enabled so nothing done.
+Breakpoint entry 1 disabled.
+*** Try setting breakpoints outside of the file range...
+Line 99 is too large. File dbg-test1.sh has only 39 lines.
+There is no line 0 to break at.
+Num Type Disp Enb What
+1 breakpoint keep n dbg-test1.sh:22
+No watch expressions have been set.
+No actions have been set.
+*** Try Deleting a non-existent breakpoint...
+Didn't find any breakpoints to remove at 10.
+There is no line 0 to clear.
+** Test display status...
+Removed 1 breakpoint(s).
+No breakpoints have been set.
+No watch expressions have been set.
+Breakpoint 2 set in file dbg-test1.sh, line 22.
+Num Type Disp Enb What
+2 breakpoint keep y dbg-test1.sh:22
+No watch expressions have been set.
+*** Test using file:line format on break...
+Breakpoint 3 set in file dbg-test1.sh, line 23.
+There is no line 0 to break at.
+Line 1955 is too large. File dbg-test1.sh has only 39 lines.
+Breakpoint 4 set in file dbg-test1.sh, line 23.
+Num Type Disp Enb What
+2 breakpoint keep y dbg-test1.sh:22
+3 breakpoint keep y dbg-test1.sh:23
+4 breakpoint keep y dbg-test1.sh:23
+No watch expressions have been set.
+Removed 1 breakpoint(s).
+*** Test breakpoints with conditions...
+Breakpoint 5 set in file dbg-test1.sh, line 23.
+Breakpoint 6 set in file dbg-test1.sh, line 24.
+Num Type Disp Enb What
+2 breakpoint keep y dbg-test1.sh:22
+4 breakpoint keep y dbg-test1.sh:23
+5 breakpoint keep y dbg-test1.sh:23
+ stop only if x==0
+6 breakpoint keep y dbg-test1.sh:24
+ stop only if y > 25
+No watch expressions have been set.
+Breakpoint entry 23 is not set. Condition not changed.
+Argument required (breakpoint number).
+Num Type Disp Enb What
+2 breakpoint keep y dbg-test1.sh:22
+4 breakpoint keep y dbg-test1.sh:23
+5 breakpoint keep y dbg-test1.sh:23
+ stop only if x==0
+6 breakpoint keep y dbg-test1.sh:24
+ stop only if y > 25
+No watch expressions have been set.
+Bad breakpoint number: x==1
+Bad breakpoint number: bad
+Breakpoint entry 30 is not set. Condition not changed.
+Breakpoint entry 2 disabled.
+Breakpoint entry 5 disabled.
+Num Type Disp Enb What
+2 breakpoint keep n dbg-test1.sh:22
+4 breakpoint keep y dbg-test1.sh:23
+ stop only if x==1
+5 breakpoint keep n dbg-test1.sh:23
+ stop only if x==0
+6 breakpoint keep y dbg-test1.sh:24
+ stop only if y > 25
+No watch expressions have been set.
+Breakpoint entry 2 enabled.
+Breakpoint entry 6 already enabled so nothing done.
+Removed 2 breakpoint(s).
+*** Test info break...
+Breakpoint entry 11 is not set.
+No watch expressions have been set.
+Bad breakpoint number foo.
+No watch expressions have been set.
+Num Type Disp Enb What
+5 breakpoint keep n dbg-test1.sh:23
+ stop only if x==0
+No watch expressions have been set.
+Removed 2 breakpoint(s).
+No breakpoints have been set.
+No watch expressions have been set.
+No actions have been set.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt1.tests cvs/debugger/test/brkpt1.tests
--- bash-2.05b/debugger/test/brkpt1.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt1.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,21 @@
+#!../../bash
+#$Id: brkpt1.tests,v 1.2 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+if test -z $top_builddir ; then
+ top_builddir=..
+fi
+
+cmdfile="brkpt1.cmd"
+debugged_script="dbg-test1.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt2.cmd cvs/debugger/test/brkpt2.cmd
--- bash-2.05b/debugger/test/brkpt2.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt2.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,79 @@
+# Test break, watch, watche, step, next, continue and stack handling
+# $Id: brkpt2.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+#
+p "*** Try a simple line number breakpoint..."
+break 23
+info break
+cont
+#
+p "*** Try watch..."
+watch x
+info watchpoints
+cont
+p "*** Try disable expression..."
+disable 1w
+watche x > 26
+info break
+p "*** Continuing with a one-time line break (but will watch expression)..."
+cont 30
+L
+p "*** Try deleting a watchpoint..."
+delete 1W
+L
+p "*** Try break with a function..."
+break fn1
+p "*** Stepping 2..."
+step 2
+p "*** Try continue with a line number..."
+cont 34
+L
+p "*** List stack frame..."
+where
+p "*** Try up..."
+up
+list
+p "*** Try down 1..."
+down 1
+list
+p "*** frame 0..."
+frame 0
+p "*** Try step (twice)..."
+step
+step
+p "*** Try next and check that it jumps over fn3"
+next
+p "*** Try continue file:line (but will hit another breakpoint)..."
+cont ./dbg-test1.sh:35
+step 2
+T
+step 10
+T
+p "*** Try x command..."
+x j
+p "*** Try continue break no args (here)..."
+break
+cont
+p "*** another x command..."
+x j
+p "*** another x command (+5 than value above) ..."
+x j+5
+p "*** x command of string y"
+x y
+p "*** x of a function ..."
+x fn2
+p "*** Bad x expressions ..."
+x bogus
+x bogus+
+x fn2+fn3
+x fn2+3
+p "*** another continue. Count on breakpoint should go up."
+cont
+print "j: $j, name: $name"
+p "*** Try disable of break "
+disable 5
+L
+cont
+p "*** Should hit end of script but stay in debugger..."
+info files
+p "*** quitting..."
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt2.right cvs/debugger/test/brkpt2.right
--- bash-2.05b/debugger/test/brkpt2.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt2.right 2003-08-30 07:31:32.000000000 +0200
@@ -0,0 +1,194 @@
+(dbg-test1.sh:22):
+22: x=22
+*** Try a simple line number breakpoint...
+Breakpoint 1 set in file dbg-test1.sh, line 23.
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+No watch expressions have been set.
+Breakpoint 1 hit (1 times).
+(dbg-test1.sh:23):
+23: y=23
+*** Try watch...
+ 0: ($x)==22 arith: 0
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+ breakpoint already hit 1 time
+Watch expressions:
+0 watchpoint y $x
+Watchpoint 1: $x changed:
+ old value: '22'
+ new value: '23'
+(dbg-test1.sh:24):
+24: for i in 0 1 3 ; do
+*** Try disable expression...
+Watchpoint entry 0 disabled.
+ 1: (x > 26)==0 arith: 1
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+ breakpoint already hit 1 time
+Watch expressions:
+0 watchpoint n $x
+ breakpoint already hit 1 time
+1 watchpoint y x > 26
+*** Continuing with a one-time line break (but will watch expression)...
+One-time breakpoint 2 set in file dbg-test1.sh, line 30.
+Watchpoint 3: x > 26 changed:
+ old value: '0'
+ new value: '1'
+(dbg-test1.sh:28):
+28: y=b
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+ breakpoint already hit 1 time
+2 breakpoint del y dbg-test1.sh:30
+Watch expressions:
+0 watchpoint n $x
+ breakpoint already hit 1 time
+1 watchpoint y x > 26
+ breakpoint already hit 1 time
+No actions have been set.
+*** Try deleting a watchpoint...
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+ breakpoint already hit 1 time
+2 breakpoint del y dbg-test1.sh:30
+Watch expressions:
+0 watchpoint n $x
+ breakpoint already hit 1 time
+No actions have been set.
+*** Try break with a function...
+Breakpoint 3 set in file dbg-test1.sh, line 5.
+*** Stepping 2...
+(dbg-test1.sh:30):
+30: echo $(fn3 30)
+*** Try continue with a line number...
+One-time breakpoint 4 set in file dbg-test1.sh, line 34.
+
+Breakpoint 3 hit (1 times).
+(dbg-test1.sh:5):
+5: fn1() {
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+ breakpoint already hit 1 time
+3 breakpoint keep y dbg-test1.sh:5
+ breakpoint already hit 1 time
+4 breakpoint del y dbg-test1.sh:34
+Watch expressions:
+0 watchpoint n $x
+ breakpoint already hit 1 time
+No actions have been set.
+*** List stack frame...
+->0 in file `dbg-test1.sh' at line 5
+##1 fn1() called from file `dbg-test1.sh' at line 32
+##2 source("dbg-test1.sh") called from file `bashdb' at line 153
+##3 main("-B", "-q", "-L", "..", "-x", "brkpt2.cmd", "dbg-test1.sh") called from file `bashdb' at line 0
+*** Try up...
+(dbg-test1.sh:32):
+32: fn1;
+ 32: fn1;
+ 33: fn3 33
+ 34: source dbg-test1.sub
+ 35: exit 0;
+ 36: #;;; Local Variables: ***
+ 37: #;;; mode:shell-script ***
+ 38: #;;; End: ***
+ 39:
+*** Try down 1...
+(dbg-test1.sh:5):
+5: fn1() {
+ 5:==>fn1() {
+ 6: echo "fn1 here"
+ 7: x=5
+ 8: fn3
+ 9: }
+ 10:
+ 11: fn2() {
+ 12: name="fn2"
+ 13: echo "$name here"
+ 14: x=6
+*** frame 0...
+->0 in file `dbg-test1.sh' at line 5
+(dbg-test1.sh:5):
+5: fn1() {
+*** Try step (twice)...
+(dbg-test1.sh:6):
+6: echo "fn1 here"
+fn1 here
+(dbg-test1.sh:7):
+7: x=5
+*** Try next and check that it jumps over fn3
+(dbg-test1.sh:8):
+8: fn3
+*** Try continue file:line (but will hit another breakpoint)...
+One-time breakpoint 5 set in file dbg-test1.sh, line 35.
+(dbg-test1.sh:34):
+34: source dbg-test1.sub
+SOURCED LINENO 19
+(dbg-test1.sub:20):
+20: filename=${BASH_SOURCE[0]##*/}
+->0 in file `dbg-test1.sub' at line 20
+##1 source("dbg-test1.sub") called from file `dbg-test1.sh' at line 34
+##2 source("dbg-test1.sh") called from file `bashdb' at line 153
+##3 main("-B", "-q", "-L", "..", "-x", "brkpt2.cmd", "dbg-test1.sh") called from file `bashdb' at line 0
+SOURCED BASH_SOURCE[0] dbg-test1.sub
+SOURCED FN LINENO 5
+(dbg-test1.sub:11):
+11: local -i j=i+1
+->0 in file `dbg-test1.sub' at line 11
+##1 sourced_fn() called from file `dbg-test1.sub' at line 22
+##2 source("dbg-test1.sub") called from file `dbg-test1.sh' at line 34
+##3 source("dbg-test1.sh") called from file `bashdb' at line 153
+##4 main("-B", "-q", "-L", "..", "-x", "brkpt2.cmd", "dbg-test1.sh") called from file `bashdb' at line 0
+*** Try x command...
+j
+*** Try continue break no args (here)...
+Breakpoint 6 set in file dbg-test1.sub, line 11.
+FUNCNAME[0]: sourced_fn called from dbg-test1.sub at line 22
+Breakpoint 6 hit (1 times).
+(dbg-test1.sub:11):
+11: local -i j=i+1
+*** another x command...
+declare -i j="1"
+*** another x command (+5 than value above) ...
+6
+*** x command of string y
+declare -- y="b"
+*** x of a function ...
+fn2 ()
+{
+ name="fn2";
+ echo "$name here";
+ x=6
+}
+*** Bad x expressions ...
+bogus
+bogus+
+fn2+fn3
+3
+*** another continue. Count on breakpoint should go up.
+FUNCNAME[1]: source called from dbg-test1.sh at line 34
+Breakpoint 6 hit (2 times).
+(dbg-test1.sub:11):
+11: local -i j=i+1
+j: 2, name: fn2
+*** Try disable of break
+Breakpoint entry 5 disabled.
+Num Type Disp Enb What
+1 breakpoint keep y dbg-test1.sh:23
+ breakpoint already hit 1 time
+3 breakpoint keep y dbg-test1.sh:5
+ breakpoint already hit 1 time
+5 breakpoint del n dbg-test1.sh:35
+6 breakpoint keep y dbg-test1.sub:11
+Watch expressions:
+0 watchpoint n $x
+ breakpoint already hit 1 time
+No actions have been set.
+FUNCNAME[2]: source called from bashdb at line 153
+Breakpoint 6 hit (3 times).
+(dbg-test1.sub:11):
+11: local -i j=i+1
+*** Should hit end of script but stay in debugger...
+dbg-test1.sh
+dbg-test1.sub
+*** quitting...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt2.tests cvs/debugger/test/brkpt2.tests
--- bash-2.05b/debugger/test/brkpt2.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt2.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: brkpt2.tests,v 1.2 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile="brkpt2.cmd"
+debugged_script="dbg-test1.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt3.cmd cvs/debugger/test/brkpt3.cmd
--- bash-2.05b/debugger/test/brkpt3.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt3.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,18 @@
+# Test break handling in the presence of subshells and canonicalization
+# of breakpoints
+# $Id: brkpt3.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+#
+break 15
+step 4
+p "*** Try a setting and removing break inside a subshell..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+delete 1
+break 17
+cont
+
+p "*** Try canonicalization of filenames in the break command..."
+b ../test/subshell.sh:1
+b subshell.sh:2
+b ./subshell.sh:3
+p "*** quitting..."
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt3.right cvs/debugger/test/brkpt3.right
--- bash-2.05b/debugger/test/brkpt3.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt3.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,24 @@
+(subshell.sh:6):
+6: x=1; y=2; z=3
+Breakpoint 1 set in file subshell.sh, line 15.
+(subshell.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+*** Try a setting and removing break inside a subshell...
+BASH_SUBSHELL: 1
+Removed 1 breakpoint(s).
+Breakpoint 2 set in file subshell.sh, line 17.
+ho
+ho
+Breakpoint 2 hit (1 times).
+(subshell.sh:17):
+17: x=5; y=6;
+Breakpoint 2 hit (2 times).
+(subshell.sh:17):
+17: x=5; y=6;
+y=6
+*** Try canonicalization of filenames in the break command...
+Breakpoint 3 set in file subshell.sh, line 1.
+Breakpoint 4 set in file subshell.sh, line 2.
+Breakpoint 5 set in file subshell.sh, line 3.
+*** quitting...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/brkpt3.tests cvs/debugger/test/brkpt3.tests
--- bash-2.05b/debugger/test/brkpt3.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/brkpt3.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,21 @@
+#!../../bash
+#$Id: brkpt3.tests,v 1.3 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+if test -z $top_builddir ; then
+ top_builddir=..
+fi
+
+cmdfile="brkpt3.cmd"
+debugged_script="subshell.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/bugIFS cvs/debugger/test/bugIFS
--- bash-2.05b/debugger/test/bugIFS 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/bugIFS 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,6 @@
+#
+# This is just a stub
+# The real bug testing occurs in bugIFS.sh
+#
+# This line will appear in as a line from bugIFS.sh if there is a bug
+#
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/bugIFS.cmd cvs/debugger/test/bugIFS.cmd
--- bash-2.05b/debugger/test/bugIFS.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/bugIFS.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,8 @@
+# $Id: bugIFS.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Debugger test of an old IFS bug
+#
+print "Going to the location where IFS should be reset in the code..."
+continue 5
+e _Dbg_print_source_line 5
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/bugIFS.right cvs/debugger/test/bugIFS.right
--- bash-2.05b/debugger/test/bugIFS.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/bugIFS.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,8 @@
+(bugIFS.sh:2):
+2: interface_names='qfe0 qfe3'
+Going to the location where IFS should be reset in the code...
+One-time breakpoint 1 set in file bugIFS.sh, line 5.
+(bugIFS.sh:5):
+5: set -- $interface_names
+(bugIFS.sh:5):
+5: set -- $interface_names
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/bugIFS.sh cvs/debugger/test/bugIFS.sh
--- bash-2.05b/debugger/test/bugIFS.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/bugIFS.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,7 @@
+#!/usr/local/bin/bash
+interface_names='qfe0 qfe3'
+ORIGIFS="$IFS"
+IFS="$IFS."
+set -- $interface_names
+IFS="$ORIGIFS"
+exit 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/bugIFS.tests cvs/debugger/test/bugIFS.tests
--- bash-2.05b/debugger/test/bugIFS.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/bugIFS.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: bugIFS.tests,v 1.2 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile="$srcdir/bugIFS.cmd"
+debugged_script="$srcdir/bugIFS.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/check_common.in cvs/debugger/test/check_common.in
--- bash-2.05b/debugger/test/check_common.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/check_common.in 2003-08-06 13:49:55.000000000 +0200
@@ -0,0 +1,15 @@
+# $Id: check_common.in,v 1.1 2003/08/06 11:49:55 rockyb Exp $
+
+if test -z $THIS_SH ; then
+ THIS_SH=$srcdir/../bash
+fi
+
+export TOP_BUILDDIR=`pwd`/../
+
+check_output() {
+ testfile="$1"
+ rightfile="$2"
+ set -o noglob
+ @DIFF@ @DIFF_OPTS@ $testfile $rightfile && rm -f $testfile
+ return $?
+}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/dbg-test1.sh cvs/debugger/test/dbg-test1.sh
--- bash-2.05b/debugger/test/dbg-test1.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/dbg-test1.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,38 @@
+#!../../bash
+# Note: no CVS Id line since it would mess up regression testing.
+# This code is used for various debugger testing.
+
+fn1() {
+ echo "fn1 here"
+ x=5
+ fn3
+}
+
+fn2() {
+ name="fn2"
+ echo "$name here"
+ x=6
+}
+
+fn3() {
+ name="fn3"
+ x=$1
+}
+
+x=22
+y=23
+for i in 0 1 3 ; do
+ ((x += i))
+done
+x=27
+y=b
+x=29
+echo $(fn3 30)
+fn3 31
+fn1;
+fn3 33
+source dbg-test1.sub
+exit 0;
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/dbg-test1.sub cvs/debugger/test/dbg-test1.sub
--- bash-2.05b/debugger/test/dbg-test1.sub 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/dbg-test1.sub 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,28 @@
+# This file is intended to be sourced from one of the bashdb test programs
+
+sourced_fn() {
+ name="fn2"
+ echo "SOURCED FN LINENO $LINENO"
+
+ # Print a stack trace
+ declare -i n
+ n=${#FUNCNAME[@]}
+ for (( i=0 ; (( i < $n )) ; i++ )) ; do
+ local -i j=i+1
+ [ $j -eq $n ] && j=i # main()'s file is the same as the first caller
+ local filename=${BASH_SOURCE[$j]##*/}
+ echo "FUNCNAME[$i]: ${FUNCNAME[$i]} called from $filename" \
+ "at line ${BASH_LINENO[$i]}"
+ done
+}
+
+echo "SOURCED LINENO $LINENO"
+filename=${BASH_SOURCE[0]##*/}
+echo "SOURCED BASH_SOURCE[0]" $filename
+sourced_fn
+
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/dbg-test2.sh cvs/debugger/test/dbg-test2.sh
--- bash-2.05b/debugger/test/dbg-test2.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/dbg-test2.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,40 @@
+#!../../bash
+# Note: no CVS Id line since it would mess up regression testing.
+# This code is used for various debugger testing.
+
+fn1() {
+ echo "fn1 here"
+ x=5
+ fn3
+}
+
+fn2() {
+ name="fn2"
+ echo "$name here"
+ x=6
+}
+
+fn3() {
+ name="fn3"
+ x=$1
+}
+
+# Test that set -xv doesn't trace into the debugger.
+set -xv
+x=24
+x=25
+for i in 0 1 3 ; do
+ ((x += i))
+done
+set +xv
+x=27
+y=b
+x=29
+echo $(fn3 30)
+fn3 31
+fn1;
+fn3 33
+exit 0;
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/debug.cmd cvs/debugger/test/debug.cmd
--- bash-2.05b/debugger/test/debug.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/debug.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,11 @@
+# $Id: debug.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Test debug command
+continue 8
+where
+print running debug -n ./debug.sh $BASHDB_LEVEL ...
+debug -q -x debug2.cmd ./debug.sh $BASHDB_LEVEL
+quit
+
+
+
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/debug.right cvs/debugger/test/debug.right
--- bash-2.05b/debugger/test/debug.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/debug.right 2003-08-30 07:31:38.000000000 +0200
@@ -0,0 +1,19 @@
+(debug.sh:2):
+2: if [[ "$1"x != x ]] ; then
+One-time breakpoint 1 set in file debug.sh, line 8.
+(debug.sh:8):
+8: ./debug.sh $BASHDB_LEVEL
+->0 in file `debug.sh' at line 8
+##1 source("debug.sh") called from file `bashdb' at line 153
+##2 main("-B", "-q", "-L", "..", "-x", "debug.cmd", "debug.sh") called from file `bashdb' at line 0
+running debug -n ./debug.sh 1 ...
+Debugging new script with -q -x debug2.cmd ./debug.sh $BASHDB_LEVEL
+(debug.sh:2):
+2: if [[ "$1"x != x ]] ; then
+->0 in file `debug.sh' at line 2
+##1 source("debug.sh") called from file `bashdb' at line 153
+##2 main("-q", "-L", "..", "-q", "-x", "debug2.cmd", "./debug.sh", "1") called from file `bashdb' at line 0
+BASHDB_LEVEL is 2
+passed 1
+(debug.sh:10):
+10: $cmd $BASHDB_LEVEL
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/debug.sh cvs/debugger/test/debug.sh
--- bash-2.05b/debugger/test/debug.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/debug.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,11 @@
+#!../../bash
+if [[ "$1"x != x ]] ; then
+ echo "passed $1"
+ exit 1
+fi
+
+cmd=./debug.sh
+./debug.sh $BASHDB_LEVEL
+# ../../bash $cmd $x
+$cmd $BASHDB_LEVEL
+x=5
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/debug.tests cvs/debugger/test/debug.tests
--- bash-2.05b/debugger/test/debug.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/debug.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: debug.tests,v 1.3 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile="debug.cmd"
+debugged_script="debug.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/debug2.cmd cvs/debugger/test/debug2.cmd
--- bash-2.05b/debugger/test/debug2.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/debug2.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,5 @@
+# $Id: debug2.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# 2nd part of testing debug command.
+where
+print BASHDB_LEVEL is $BASHDB_LEVEL
+continue
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/display.cmd cvs/debugger/test/display.cmd
--- bash-2.05b/debugger/test/display.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/display.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,29 @@
+# Test break, watch, watche, step, next, continue and stack handling
+# $Id: display.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+#
+p "*** Try a simple display..."
+display echo $x
+break 23
+break 25
+cont
+cont
+p "*** Try disabling display ..."
+disable display 0
+info display
+step
+cont
+p "*** Try enabling display ..."
+enable display 0
+info display
+p "*** Try display to show again status ..."
+display
+cont 28
+info display
+cont
+p "*** Try undisplay to delete ..."
+undisplay 0
+info display
+step
+step
+p "*** quitting..."
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/display.right cvs/debugger/test/display.right
--- bash-2.05b/debugger/test/display.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/display.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,49 @@
+(dbg-test1.sh:22):
+22: x=22
+*** Try a simple display...
+ 0: echo $x
+Breakpoint 1 set in file dbg-test1.sh, line 23.
+Breakpoint 2 set in file dbg-test1.sh, line 25.
+Breakpoint 1 hit (1 times).
+(dbg-test1.sh:23):
+23: y=23
+ 0 (echo $x): 22
+Breakpoint 2 hit (1 times).
+(dbg-test1.sh:25):
+25: ((x += i))
+ 0 (echo $x): 22
+*** Try disabling display ...
+Display entry 0 disabled.
+Display expressions:
+Num Enb Expression
+0 0 echo $x
+(dbg-test1.sh:24):
+24: for i in 0 1 3 ; do
+Breakpoint 2 hit (2 times).
+(dbg-test1.sh:25):
+25: ((x += i))
+*** Try enabling display ...
+Display entry 0 enabled.
+Display expressions:
+Num Enb Expression
+0 1 echo $x
+*** Try display to show again status ...
+ 0 (echo $x): 22
+One-time breakpoint 3 set in file dbg-test1.sh, line 28.
+Breakpoint 2 hit (3 times).
+(dbg-test1.sh:25):
+25: ((x += i))
+ 0 (echo $x): 23
+Display expressions:
+Num Enb Expression
+0 1 echo $x
+(dbg-test1.sh:28):
+28: y=b
+ 0 (echo $x): 27
+*** Try undisplay to delete ...
+No display expressions have been set.
+(dbg-test1.sh:29):
+29: x=29
+(dbg-test1.sh:30):
+30: echo $(fn3 30)
+*** quitting...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/display.tests cvs/debugger/test/display.tests
--- bash-2.05b/debugger/test/display.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/display.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: display.tests,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=display.cmd
+debugged_script=dbg-test1.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/finish.cmd cvs/debugger/test/finish.cmd
--- bash-2.05b/debugger/test/finish.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/finish.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,11 @@
+# $Id: finish.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Debugger test of:
+# finish command
+#
+p "*** Try a simple finish..."
+continue fn2
+where
+finish
+where
+print $x
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/finish.right cvs/debugger/test/finish.right
--- bash-2.05b/debugger/test/finish.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/finish.right 2003-08-30 07:31:49.000000000 +0200
@@ -0,0 +1,31 @@
+(parm.sh:26):
+26: x="main"
+*** Try a simple finish...
+One-time breakpoint 1 set in file parm.sh, line 14.
+(parm.sh:14):
+14: fn2() {
+->0 in file `parm.sh' at line 14
+##1 fn2("testing 1", "2 3") called from file `parm.sh' at line 6
+##2 fn1("0") called from file `parm.sh' at line 10
+##3 fn1("1") called from file `parm.sh' at line 10
+##4 fn1("2") called from file `parm.sh' at line 10
+##5 fn1("3") called from file `parm.sh' at line 10
+##6 fn1("4") called from file `parm.sh' at line 10
+##7 fn1("5") called from file `parm.sh' at line 27
+##8 source("parm.sh") called from file `bashdb' at line 153
+##9 main("-B", "-q", "-L", "..", "-x", "finish.cmd", "parm.sh") called from file `bashdb' at line 0
+fn2: testing 1 2 3
+fn3:
+(parm.sh:14):
+14: fn2() {
+->0 in file `parm.sh' at line 14
+##1 fn2("testing 1", "2 3") called from file `parm.sh' at line 6
+##2 fn1("0") called from file `parm.sh' at line 10
+##3 fn1("1") called from file `parm.sh' at line 10
+##4 fn1("2") called from file `parm.sh' at line 10
+##5 fn1("3") called from file `parm.sh' at line 10
+##6 fn1("4") called from file `parm.sh' at line 10
+##7 fn1("5") called from file `parm.sh' at line 27
+##8 source("parm.sh") called from file `bashdb' at line 153
+##9 main("-B", "-q", "-L", "..", "-x", "finish.cmd", "parm.sh") called from file `bashdb' at line 0
+fn2 returning
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/finish.tests cvs/debugger/test/finish.tests
--- bash-2.05b/debugger/test/finish.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/finish.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: finish.tests,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=finish.cmd
+debugged_script=parm.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/list.cmd cvs/debugger/test/list.cmd
--- bash-2.05b/debugger/test/list.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/list.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,54 @@
+#
+# Test of debugger list command
+# $Id: list.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+#
+# List default location
+pr "*** Trying 'list'..."
+list
+# Should list next set of lines
+print "*** Running another list..."
+l
+#
+# Should not see anything since we ran off the top
+#
+pr "*** Trying 'list 999'..."
+list 999
+pr "*** Trying 'list file:line' and canonicalization of filenames..."
+list ./dbg-test1.sh:1
+list ../test/dbg-test1.sh:20
+list dbg-test1.sh:30
+list ./dbg-test1.sh:999
+list ./badfile:1
+pr "*** Trying list of functions..."
+list fn1
+list bogus
+#
+pr "*** Testing window command..."
+window
+# Test .
+p "*** Testing '.'"
+l .
+#
+# Should see lines up to current execution line.
+p "*** Trying '-'..."
+-
+p "*** Testing set/show listsize"
+show listsize
+p "*** Setting listsize to 3..."
+set listsize 3
+l 10
+p "*** Window command..."
+w
+p "- command..."
+-
+p "*** Setting listsize to 4..."
+set listsize 4
+show listsize
+l 10
+p "*** Window command..."
+w
+p "*** '-' command..."
+-
+#<-This comment doesn't have a space after
+#the initial `#'
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/list.right cvs/debugger/test/list.right
--- bash-2.05b/debugger/test/list.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/list.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,133 @@
+(dbg-test1.sh:22):
+22: x=22
+*** Trying 'list'...
+ 22:==>x=22
+ 23: y=23
+ 24: for i in 0 1 3 ; do
+ 25: ((x += i))
+ 26: done
+ 27: x=27
+ 28: y=b
+ 29: x=29
+ 30: echo $(fn3 30)
+ 31: fn3 31
+*** Running another list...
+ 32: fn1;
+ 33: fn3 33
+ 34: source dbg-test1.sub
+ 35: exit 0;
+ 36: #;;; Local Variables: ***
+ 37: #;;; mode:shell-script ***
+ 38: #;;; End: ***
+ 39:
+*** Trying 'list 999'...
+Line 999 is too large. File dbg-test1.sh has only 39 lines.
+*** Trying 'list file:line' and canonicalization of filenames...
+ 1: #!../../bash
+ 2: # Note: no CVS Id line since it would mess up regression testing.
+ 3: # This code is used for various debugger testing.
+ 4:
+ 5: fn1() {
+ 6: echo "fn1 here"
+ 7: x=5
+ 8: fn3
+ 9: }
+ 10:
+ 20: }
+ 21:
+ 22:==>x=22
+ 23: y=23
+ 24: for i in 0 1 3 ; do
+ 25: ((x += i))
+ 26: done
+ 27: x=27
+ 28: y=b
+ 29: x=29
+ 30: echo $(fn3 30)
+ 31: fn3 31
+ 32: fn1;
+ 33: fn3 33
+ 34: source dbg-test1.sub
+ 35: exit 0;
+ 36: #;;; Local Variables: ***
+ 37: #;;; mode:shell-script ***
+ 38: #;;; End: ***
+ 39:
+Line 999 is too large. File dbg-test1.sh has only 39 lines.
+File ./badfile not found in read-in files.
+See 'info files' for a list of known files.
+*** Trying list of functions...
+ 5: fn1() {
+ 6: echo "fn1 here"
+ 7: x=5
+ 8: fn3
+ 9: }
+ 10:
+ 11: fn2() {
+ 12: name="fn2"
+ 13: echo "$name here"
+ 14: x=6
+Invalid linespec
+*** Testing window command...
+ 17: fn3() {
+ 18: name="fn3"
+ 19: x=$1
+ 20: }
+ 21:
+ 22:==>x=22
+ 23: y=23
+ 24: for i in 0 1 3 ; do
+ 25: ((x += i))
+ 26: done
+*** Testing '.'
+ 27: x=27
+ 28: y=b
+ 29: x=29
+ 30: echo $(fn3 30)
+ 31: fn3 31
+ 32: fn1;
+ 33: fn3 33
+ 34: source dbg-test1.sub
+ 35: exit 0;
+ 36: #;;; Local Variables: ***
+*** Trying '-'...
+ 13: echo "$name here"
+ 14: x=6
+ 15: }
+ 16:
+ 17: fn3() {
+ 18: name="fn3"
+ 19: x=$1
+ 20: }
+ 21:
+ 22:==>x=22
+*** Testing set/show listsize
+Number of source lines bashdb will list by default is 10.
+*** Setting listsize to 3...
+ 10:
+ 11: fn2() {
+ 12: name="fn2"
+*** Window command...
+ 21:
+ 22:==>x=22
+ 23: y=23
+- command...
+ 20: }
+ 21:
+ 22:==>x=22
+*** Setting listsize to 4...
+Number of source lines bashdb will list by default is 4.
+ 10:
+ 11: fn2() {
+ 12: name="fn2"
+ 13: echo "$name here"
+*** Window command...
+ 20: }
+ 21:
+ 22:==>x=22
+ 23: y=23
+*** '-' command...
+ 19: x=$1
+ 20: }
+ 21:
+ 22:==>x=22
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/list.tests cvs/debugger/test/list.tests
--- bash-2.05b/debugger/test/list.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/list.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: list.tests,v 1.3 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile="list.cmd"
+debugged_script="dbg-test1.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/misc-output.right cvs/debugger/test/misc-output.right
--- bash-2.05b/debugger/test/misc-output.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/misc-output.right 2003-08-06 16:22:00.000000000 +0200
@@ -0,0 +1,23 @@
+ 23:==>set -xv
+ 24: x=24
+ 25: x=25
+ 26: for i in 0 1 3 ; do
+ 27: ((x += i))
+ 28: done
+ 29: set +xv
+ 30: x=27
+ 31: y=b
+ 32: x=29
+ 33: echo $(fn3 30)
+ 34: fn3 31
+ 35: fn1;
+ 36: fn3 33
+ 37: exit 0;
+ 38: #;;; Local Variables: ***
+ 39: #;;; mode:shell-script ***
+ 40: #;;; End: ***
+ 41:
+dq_args="dq*"
+dq_cmd="V"
+dq_args="variables dq*"
+dq_cmd="info"
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/misc.cmd cvs/debugger/test/misc.cmd
--- bash-2.05b/debugger/test/misc.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/misc.cmd 2003-08-03 01:15:21.000000000 +0200
@@ -0,0 +1,75 @@
+# Test of miscellaneous commands:
+# source, info args, show args, show warranty, show copying
+# $Id: misc.cmd,v 1.3 2003/08/02 23:15:21 rockyb Exp $
+print "*** Testing source command..."
+source prof1.cmd
+source prof2.cmd
+#
+print "*** Test that ARGs are correct..."
+print "_Dbg_arg#: ${#_Dbg_arg[@]}"
+print "\\$1: $1"
+print "\\$2: $2"
+print "*** Testing script args..."
+info args
+print "*** Testing Invalid commands..."
+show badcommand
+another-bad-command
+tty
+print "*** GNU things..."
+show warranty
+info warranty
+show copying
+print "*** Testing help commands..."
+help
+help set
+help set foo
+help set ar
+help set annotate
+help set listsize
+help set prompt
+help set editing
+help tty
+help info
+info
+show
+print "*** Set and show..."
+show args
+set args now is the time
+show args
+set editing off
+set editing fooo
+show editing
+set editing
+show editing
+set misspelled 40
+set listsize 40
+set listsize bad
+set annotate bad
+set annotate 6
+show annotate
+set annotate 1
+show listsize
+show annotate
+print "*** Testing history..."
+H
+H 5
+H 5 3
+hi 11
+!11
+!19:p
+!-3:p
+!-2
+! 2
+H -2
+H foo
+H 100000
+history -2
+history 10000
+print "*** Testing prompt and set tty..."
+set prompt bashdb${_Dbg_greater}$_Dbg_hi${_Dbg_less}$_Dbg_space
+show prompt
+tty /tmp/misc-output.check
+l
+V dq*
+info variables dq*
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/misc.right cvs/debugger/test/misc.right
--- bash-2.05b/debugger/test/misc.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/misc.right 2003-08-03 01:15:21.000000000 +0200
@@ -0,0 +1,552 @@
+(dbg-test2.sh:23):
+23: set -xv
+*** Testing source command...
+prof1.cmd called
+prof2.cmd called...
+calling prof1.cmd...
+prof1.cmd called
+*** Test that ARGs are correct...
+_Dbg_arg#: 2
+$1: testarg1
+$2: testarg2
+*** Testing script args...
+*** Testing Invalid commands...
+Don't know how to show badcommand.
+Undefined command: "another-bad-command". Try "help".
+Argument required (terminal name for running target process).
+*** GNU things...
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+*** Testing help commands...
+bashdb commands:
+List/search source lines: Control script execution:
+------------------------- -------------------------
+ l [start|.] [cnt] List cnt lines T [n] Stack trace
+ from line start s [n] Single step [n times]
+ l sub List source code fn n [n] Next, steps over subs
+ - or . List previous/current line <CR>/<Enter> Repeat last n or s
+ w [line] List around line c [linespec] Continue [to linespec]
+ f filename View source in file L List all breakpoints
+ /pat/ Search forward for pat b linespec Set breakpoint
+ ?pat? Search backward for pat del [n].. or D Delete a/all breaks
+ by entry number
+Debugger controls: skip skip execution of cmd
+------------------------- cl linespec Delete breakpoints by
+ H [num] Show last num commands line spec
+ q [exp] or ^D Quit returning exp R [args] Attempt a restart
+ info [cmd] Get info on cmd. u [n] Go up stack by n or 1.
+ !n or hi n Run debugger history n do [n] Go down stack by n or 1.
+ h or ? [cmd] Get help on command W [var] Add watchpoint. If no
+ info [cmd] Get info on cmd no expr, delete all
+ show [cmd] Show settings We [expr] Add Watchpoint arith
+ expr
+ so file read in dbg commands t Toggle trace
+ en/di n enable/disable brkpt,
+ set x y set a debugger variable watchpoint, or display
+ e bash-cmd evaluate a bash command tb linespec Add one-time break
+ disp expr add a display expr a linespec cmd eval "cmd" at linespec
+ M Show module versions A delete all actions
+ x expr evaluate expression ret jump out of fn or source
+ (via declare, let, eval) finish execute until return
+ deb debug into another cond n exp set breakpoint condition
+ shell script
+ !! cmd [args] execute shell command "cmd" with "args"
+
+Data Examination: also see e, t, x
+-------------------------
+ p variable Print variable
+ V [[!]pat] List variable(s) matching or not (!) matching pattern pat
+ S [[!]pat] List subroutine names [not] matching pattern pat
+
+Readline command line editing (emacs/vi mode) is available
+For more help, type h <cmd> or consult online-documentation.
+set args -- Set argument list to give program being debugged when it is started.
+Follow this command with any number of args, to be passed to the program.
+set annotate -- Set annotation level.
+set basename -- Set short filenames (the basename) in debug output is on.
+set debugger -- Set debugging the debugger is off.
+set editing -- Set editing of command lines as they are typed is off.
+set listsize -- Set number of source lines bashdb will list by default.
+set prompt -- bashdb's prompt is:
+ "bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".
+set showcommand -- Set showing the command to execute is auto.
+There is no "set foo" command.
+Set argument list to give program being debugged when it is started.
+Follow this command with any number of args, to be passed to the program.
+Set annotation level.
+0 == normal; 1 == fullname (for use when running under emacs)
+Set number of source lines bashdb will list by default.
+bashdb's prompt is:
+ "bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".
+Set editing of command lines as they are typed is off.
+tt tty-name Set the output device for debugger output
+ Long command name: tty.
+List of info subcommands:
+
+info args -- $1, $2, and so on
+info breakpoints -- Status of user-settable breakpoints
+info display -- Show all display expressions
+info files -- Source files in the program
+info functions -- All function names
+info signals -- What debugger does when program gets various signals
+info source -- Information about the current source file
+info stack -- Backtrace of the stack
+info terminal -- Print terminal device
+info variables -- All global and static variable names
+info warranty -- Various kinds of warranty you do not have
+Info subcommands are: args breakpoints display files functions source sources stack terminal variables watchpoints
+args: Argument list to give script when debugged program starts is:
+ "-B -q -L .. -x misc.cmd dbg-test2.sh testarg1 testarg2".
+basename: Show short filenames (the basename) in debug output is on.
+debugger: Allow debugging the debugger is off.
+editing: Editing of command lines as they are typed is on.
+listsize: Number of source lines bashdb will list by default is 10.
+prompt: bashdb's prompt is:
+ "bashdb${_Dbg_less}${#_Dbg_history[@]}${_Dbg_greater}$_Dbg_space".
+*** Set and show...
+Argument list to give script when debugged program starts is:
+ "-B -q -L .. -x misc.cmd dbg-test2.sh testarg1 testarg2".
+Argument list to give script when debugged program starts is:
+ "now is the time".
+"on" or "off" expected.
+Editing of command lines as they are typed is off.
+Editing of command lines as they are typed is on.
+Unknown subcommand: misspelled
+Integer argument expected; got: bad
+Integer argument expected; got: bad
+annotation level must be 0 or 1
+Annotation_level is 0.
+Number of source lines bashdb will list by default is 40.
+Annotation_level is 1.
+*** Testing history...
+52: print "*** Testing history..."
+51: show annotate
+50: show listsize
+49: set annotate 1
+48: show annotate
+47: set annotate 6
+46: set annotate bad
+45: set listsize bad
+44: set listsize 40
+43: set misspelled 40
+42: show editing
+41: set editing
+40: show editing
+39: set editing fooo
+38: set editing off
+37: show args
+36: set args now is the time
+35: show args
+34: print "*** Set and show..."
+33: show
+32: info
+31: help info
+30: help tty
+29: help set editing
+28: help set prompt
+27: help set listsize
+26: help set annotate
+25: help set ar
+24: help set foo
+23: help set
+22: help
+21: print "*** Testing help commands..."
+20: show copying
+19: info warranty
+18: show warranty
+17: print "*** GNU things..."
+16: tty
+15: show badcommand
+14: print "*** Testing Invalid commands..."
+13: info args
+12: print "*** Testing script args..."
+11: print "\$2: $2"
+10: print "\$1: $1"
+9: print "_Dbg_arg#: ${#_Dbg_arg[@]}"
+8: print "*** Test that ARGs are correct..."
+7: print "prof1.cmd called"
+6: source prof1.cmd
+5: print calling prof1.cmd...
+4: print prof2.cmd called...
+3: source prof2.cmd
+2: print "prof1.cmd called"
+1: source prof1.cmd
+0: print "*** Testing source command..."
+5: print calling prof1.cmd...
+4: print prof2.cmd called...
+3: source prof2.cmd
+2: print "prof1.cmd called"
+1: source prof1.cmd
+0: print "*** Testing source command..."
+5: print calling prof1.cmd...
+4: print prof2.cmd called...
+3: source prof2.cmd
+$2: testarg2
+$2: testarg2
+19: info warranty
+50: show listsize
+Annotation_level is 1.
+prof1.cmd called
+52: print "*** Testing history..."
+51: show annotate
+Invalid history number: foo
+52: print "*** Testing history..."
+51: show annotate
+50: show listsize
+49: set annotate 1
+48: show annotate
+47: set annotate 6
+46: set annotate bad
+45: set listsize bad
+44: set listsize 40
+43: set misspelled 40
+42: show editing
+41: set editing
+40: show editing
+39: set editing fooo
+38: set editing off
+37: show args
+36: set args now is the time
+35: show args
+34: print "*** Set and show..."
+33: show
+32: info
+31: help info
+30: help tty
+29: help set editing
+28: help set prompt
+27: help set listsize
+26: help set annotate
+25: help set ar
+24: help set foo
+23: help set
+22: help
+21: print "*** Testing help commands..."
+20: show copying
+19: info warranty
+18: show warranty
+17: print "*** GNU things..."
+16: tty
+15: show badcommand
+14: print "*** Testing Invalid commands..."
+13: info args
+12: print "*** Testing script args..."
+11: print "\$2: $2"
+10: print "\$1: $1"
+9: print "_Dbg_arg#: ${#_Dbg_arg[@]}"
+8: print "*** Test that ARGs are correct..."
+7: print "prof1.cmd called"
+6: source prof1.cmd
+5: print calling prof1.cmd...
+4: print prof2.cmd called...
+3: source prof2.cmd
+2: print "prof1.cmd called"
+1: source prof1.cmd
+0: print "*** Testing source command..."
+Annotation_level is 1.
+Number 10000 should be less than 53
+*** Testing prompt and set tty...
+bashdb's prompt is:
+ "bashdb${_Dbg_greater}$_Dbg_hi${_Dbg_less}$_Dbg_space".
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/misc.tests cvs/debugger/test/misc.tests
--- bash-2.05b/debugger/test/misc.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/misc.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: misc.tests,v 1.2 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=misc.cmd
+debugged_script=dbg-test2.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script testarg1 testarg2
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi.sh cvs/debugger/test/multi.sh
--- bash-2.05b/debugger/test/multi.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi.sh 2003-06-03 19:08:18.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+# $Id: multi.sh,v 1.1 2003/06/03 17:08:18 rockyb Exp $
+# Test debugger handling of lines with multiple commands per line
+# and subshells in a line
+
+x=1; y=2; z=3
+(cd . ; x=`builtin echo *`; (builtin echo "ho") )
+case `builtin echo "testing"; builtin echo 1,2,3`,`builtin echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+(cd . ; x=`builtin echo *`; (builtin echo "ho") )
+
+x=5; y=6;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi1.cmd cvs/debugger/test/multi1.cmd
--- bash-2.05b/debugger/test/multi1.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi1.cmd 2003-06-03 19:08:18.000000000 +0200
@@ -0,0 +1,9 @@
+print "Test step inside multi-statement line..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+step
+step
+step
+print "Should now be inside a subshell..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi1.right cvs/debugger/test/multi1.right
--- bash-2.05b/debugger/test/multi1.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi1.right 2003-06-03 20:28:07.000000000 +0200
@@ -0,0 +1,14 @@
+(multi.sh:6):
+6: x=1; y=2; z=3
+Test step inside multi-statement line...
+BASH_SUBSHELL: 0
+(multi.sh:6):
+6: x=1; y=2; z=3
+y=2
+(multi.sh:6):
+6: x=1; y=2; z=3
+z=3
+(multi.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+Should now be inside a subshell...
+BASH_SUBSHELL: 1
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi1.tests cvs/debugger/test/multi1.tests
--- bash-2.05b/debugger/test/multi1.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi1.tests 2003-06-03 20:28:08.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: multi1.tests,v 1.2 2003/06/03 18:28:08 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=multi1.cmd
+debugged_script=multi.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi2.cmd cvs/debugger/test/multi2.cmd
--- bash-2.05b/debugger/test/multi2.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi2.cmd 2003-06-03 19:08:18.000000000 +0200
@@ -0,0 +1,10 @@
+set showcommand on
+print "Test step inside multi-statement line..."
+step
+step
+step 2
+print "Should now be inside a subshell. Test from here..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+quit 0 2
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi2.right cvs/debugger/test/multi2.right
--- bash-2.05b/debugger/test/multi2.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi2.right 2003-06-03 20:28:08.000000000 +0200
@@ -0,0 +1,14 @@
+(multi.sh:6):
+6: x=1; y=2; z=3
+Test step inside multi-statement line...
+(multi.sh:6):
+6: x=1; y=2; z=3
+y=2
+(multi.sh:6):
+6: x=1; y=2; z=3
+z=3
+(multi.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+Should now be inside a subshell. Test from here...
+BASH_SUBSHELL: 1
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi2.tests cvs/debugger/test/multi2.tests
--- bash-2.05b/debugger/test/multi2.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi2.tests 2003-06-03 20:28:08.000000000 +0200
@@ -0,0 +1,16 @@
+#!../../bash
+#$Id: multi2.tests,v 1.2 2003/06/03 18:28:08 rockyb Exp $
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=multi2.cmd
+debugged_script=multi.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi3.cmd cvs/debugger/test/multi3.cmd
--- bash-2.05b/debugger/test/multi3.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi3.cmd 2003-06-03 19:08:18.000000000 +0200
@@ -0,0 +1,9 @@
+set showcommand on
+print "Test step inside multi-statement line..."
+cont 15
+step
+step
+step
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+quit 0 56
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi3.right cvs/debugger/test/multi3.right
--- bash-2.05b/debugger/test/multi3.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi3.right 2003-06-03 20:28:08.000000000 +0200
@@ -0,0 +1,15 @@
+(multi.sh:6):
+6: x=1; y=2; z=3
+Test step inside multi-statement line...
+One-time breakpoint 1 set in file multi.sh, line 15.
+ho
+(multi.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+cd .
+(multi.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+(multi.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+builtin echo "ho"
+BASH_SUBSHELL 2
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi3.tests cvs/debugger/test/multi3.tests
--- bash-2.05b/debugger/test/multi3.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi3.tests 2003-06-03 20:28:08.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: multi3.tests,v 1.2 2003/06/03 18:28:08 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=multi3.cmd
+debugged_script=multi.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi4.cmd cvs/debugger/test/multi4.cmd
--- bash-2.05b/debugger/test/multi4.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi4.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,10 @@
+set showcommand on
+print "Test step inside multi-statement line..."
+cont 15
+step
+step
+step
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+quit 0 2
+print "You shouldn't get here. Quit again just in case..."
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi4.right cvs/debugger/test/multi4.right
--- bash-2.05b/debugger/test/multi4.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi4.right 2003-06-03 19:08:18.000000000 +0200
@@ -0,0 +1,15 @@
+(multi.sh:6):
+6: x=1; y=2; z=3
+Test step inside multi-statement line...
+One-time breakpoint 1 set in file multi.sh, line 15.
+ho
+(multi.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+cd .
+(multi.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+(multi.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+builtin echo "ho"
+BASH_SUBSHELL 2
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/multi4.tests cvs/debugger/test/multi4.tests
--- bash-2.05b/debugger/test/multi4.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/multi4.tests 2003-06-03 20:28:08.000000000 +0200
@@ -0,0 +1,16 @@
+#!../../bash
+#$Id: multi4.tests,v 1.2 2003/06/03 18:28:08 rockyb Exp $
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=multi4.cmd
+debugged_script=multi.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/parm.cmd cvs/debugger/test/parm.cmd
--- bash-2.05b/debugger/test/parm.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/parm.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,48 @@
+# $Id: parm.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Debugger test of:
+# stack trace
+# parameter display
+# return command
+# evaluation of dollar variables $1, $2
+#
+p "** Try a simple stack command..."
+where
+step 2
+where
+p "** Try printing a dollar variable..."
+p $1
+p "** Same thing using eval..."
+eval echo $1
+p "** Setting an action to print $1"
+a 4 echo "\\$1 at line 4 has value $1"
+c fn2
+# cont
+p "** First parameter should have embedded blanks..."
+where
+p "dollar 1: $1"
+p "** Same thing using eval..."
+e echo "\\$1 is $1"
+p "** Should have embedded blanks..."
+p $2
+e echo "\\$2 is $2"
+continue fn3
+p "** Test return. Should go back to fn2 and then fn1..."
+return
+return
+p "** Should not have done above-listed x=\"fn2\" assignment"
+p $x
+where
+return
+where
+return
+where
+return
+return
+where
+p "*** Testing that exit status preserved on eval and print..."
+c 29
+e echo "eval says exit was $?"
+p "print says exit was $?"
+info files
+p "*** quitting..."
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/parm.right cvs/debugger/test/parm.right
--- bash-2.05b/debugger/test/parm.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/parm.right 2003-08-30 07:31:50.000000000 +0200
@@ -0,0 +1,100 @@
+(parm.sh:26):
+26: x="main"
+** Try a simple stack command...
+->0 in file `parm.sh' at line 26
+##1 source("parm.sh") called from file `bashdb' at line 153
+##2 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+(parm.sh:3):
+3: fn1() {
+->0 in file `parm.sh' at line 3
+##1 fn1("5") called from file `parm.sh' at line 27
+##2 source("parm.sh") called from file `bashdb' at line 153
+##3 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+** Try printing a dollar variable...
+5
+** Same thing using eval...
+5
+** Setting an action to print 5
+Breakpoint 0 set at parm.sh:4.
+One-time breakpoint 1 set in file parm.sh, line 14.
+$1 at line 4 has value 5
+$1 at line 4 has value 4
+$1 at line 4 has value 3
+$1 at line 4 has value 2
+$1 at line 4 has value 1
+$1 at line 4 has value 0
+(parm.sh:14):
+14: fn2() {
+** First parameter should have embedded blanks...
+->0 in file `parm.sh' at line 14
+##1 fn2("testing 1", "2 3") called from file `parm.sh' at line 6
+##2 fn1("0") called from file `parm.sh' at line 10
+##3 fn1("1") called from file `parm.sh' at line 10
+##4 fn1("2") called from file `parm.sh' at line 10
+##5 fn1("3") called from file `parm.sh' at line 10
+##6 fn1("4") called from file `parm.sh' at line 10
+##7 fn1("5") called from file `parm.sh' at line 27
+##8 source("parm.sh") called from file `bashdb' at line 153
+##9 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+dollar 1: testing 1
+** Same thing using eval...
+$1 is testing 1
+** Should have embedded blanks...
+2 3
+$2 is 2 3
+One-time breakpoint 2 set in file parm.sh, line 21.
+fn2: testing 1 2 3
+(parm.sh:21):
+21: fn3() {
+** Test return. Should go back to fn2 and then fn1...
+(parm.sh:18):
+18: x="fn2 returning"
+(parm.sh:7):
+7: return
+** Should not have done above-listed x=fn2 assignment
+fn2 started
+->0 in file `parm.sh' at line 7
+##1 fn1("0") called from file `parm.sh' at line 10
+##2 fn1("1") called from file `parm.sh' at line 10
+##3 fn1("2") called from file `parm.sh' at line 10
+##4 fn1("3") called from file `parm.sh' at line 10
+##5 fn1("4") called from file `parm.sh' at line 10
+##6 fn1("5") called from file `parm.sh' at line 27
+##7 source("parm.sh") called from file `bashdb' at line 153
+##8 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+(parm.sh:11):
+11: x="fn1 returning"
+->0 in file `parm.sh' at line 11
+##1 fn1("1") called from file `parm.sh' at line 10
+##2 fn1("2") called from file `parm.sh' at line 10
+##3 fn1("3") called from file `parm.sh' at line 10
+##4 fn1("4") called from file `parm.sh' at line 10
+##5 fn1("5") called from file `parm.sh' at line 27
+##6 source("parm.sh") called from file `bashdb' at line 153
+##7 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+(parm.sh:11):
+11: x="fn1 returning"
+->0 in file `parm.sh' at line 11
+##1 fn1("2") called from file `parm.sh' at line 10
+##2 fn1("3") called from file `parm.sh' at line 10
+##3 fn1("4") called from file `parm.sh' at line 10
+##4 fn1("5") called from file `parm.sh' at line 27
+##5 source("parm.sh") called from file `bashdb' at line 153
+##6 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+(parm.sh:11):
+11: x="fn1 returning"
+(parm.sh:11):
+11: x="fn1 returning"
+->0 in file `parm.sh' at line 11
+##1 fn1("4") called from file `parm.sh' at line 10
+##2 fn1("5") called from file `parm.sh' at line 27
+##3 source("parm.sh") called from file `bashdb' at line 153
+##4 main("-B", "-q", "-L", "..", "-x", "parm.cmd", "parm.sh") called from file `bashdb' at line 0
+*** Testing that exit status preserved on eval and print...
+One-time breakpoint 3 set in file parm.sh, line 29.
+(parm.sh:29):
+29: exit 0
+eval says exit was 5
+print says exit was 5
+parm.sh
+*** quitting...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/parm.sh cvs/debugger/test/parm.sh
--- bash-2.05b/debugger/test/parm.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/parm.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,33 @@
+#!../../bash
+
+fn1() {
+ x="fn1 started"
+ if (( $1 == 0 )) ; then
+ fn2 "testing 1" "2 3"
+ return
+ fi
+ let a=$1-1
+ fn1 $a
+ x="fn1 returning"
+}
+
+fn2() {
+ x="fn2 started"
+ echo "fn2: $1 $2"
+ fn3
+ x="fn2 returning"
+}
+
+fn3() {
+ echo "fn3: $1 $2"
+ x="fn3 returning"
+}
+
+x="main"
+fn1 5
+echo "exit 5" | bash
+exit 0
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/parm.tests cvs/debugger/test/parm.tests
--- bash-2.05b/debugger/test/parm.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/parm.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: parm.tests,v 1.2 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=parm.cmd
+debugged_script=parm.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/prof1.cmd cvs/debugger/test/prof1.cmd
--- bash-2.05b/debugger/test/prof1.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/prof1.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,3 @@
+# Test a profile
+# $Id: prof1.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+print "prof1.cmd called"
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/prof2.cmd cvs/debugger/test/prof2.cmd
--- bash-2.05b/debugger/test/prof2.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/prof2.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,5 @@
+# Test a profile
+# $Id: prof2.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+print prof2.cmd called...
+print calling prof1.cmd...
+source prof1.cmd
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-action cvs/debugger/test/run-action
--- bash-2.05b/debugger/test/run-action 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-action 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-action,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='action'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-all cvs/debugger/test/run-all
--- bash-2.05b/debugger/test/run-all 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-all 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,36 @@
+#!../../bash
+#$Id: run-all,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+
+if [ -z "$*" ] ; then
+ TESTS=run-*
+else
+ TESTS=$*
+fi
+
+PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
+export PATH
+
+# unset BASH_ENV only if it is set
+[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
+# ditto for SHELLOPTS
+#[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
+
+: ${THIS_SH:=../../bash}
+export THIS_SH
+
+${THIS_SH} ./version
+
+rm -f /tmp/xx
+
+echo Any output from any test, unless otherwise noted, indicates a possible anomaly
+
+for x in $TESTS
+do
+ case $x in
+ $0|run-minimal|run-gprof) ;;
+ *.orig|*~) ;;
+ *) echo $x ; sh $x ;;
+ esac
+done
+
+exit 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-brkpt cvs/debugger/test/run-brkpt
--- bash-2.05b/debugger/test/run-brkpt 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-brkpt 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,31 @@
+#!../../bash
+#$Id: run-brkpt,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+tests=${@:-"brkpt1 brkpt2 brkpt3"}
+for SUBTEST in $tests ; do
+ echo "checking $SUBTEST..."
+ TEST_NAME=$SUBTEST
+ TEST_FILE="/tmp/${TEST_NAME}.check"
+ (cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+ check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+ declare -i rc=$?
+ if (( rc == 0 )) ; then
+ rm -f $TEST_FILE
+ else
+ exit $rc
+ fi
+done
+
+# Return code tells testing mechanism whether passed or not.
+exit 0
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-brkpt1 cvs/debugger/test/run-brkpt1
--- bash-2.05b/debugger/test/run-brkpt1 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-brkpt1 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-brkpt1,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='brkpt1'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-bugIFS cvs/debugger/test/run-bugIFS
--- bash-2.05b/debugger/test/run-bugIFS 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-bugIFS 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-bugIFS,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='bugIFS'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-debug cvs/debugger/test/run-debug
--- bash-2.05b/debugger/test/run-debug 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-debug 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,23 @@
+#!../../bash
+#$Id: run-debug,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='debug'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-display cvs/debugger/test/run-display
--- bash-2.05b/debugger/test/run-display 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-display 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-display,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='display'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-finish cvs/debugger/test/run-finish
--- bash-2.05b/debugger/test/run-finish 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-finish 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-finish,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='finish'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-list cvs/debugger/test/run-list
--- bash-2.05b/debugger/test/run-list 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-list 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,23 @@
+#!../../bash
+#$Id: run-list,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='list'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-misc cvs/debugger/test/run-misc
--- bash-2.05b/debugger/test/run-misc 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-misc 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,29 @@
+#!../../bash
+#$Id: run-misc,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='misc'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+OUT1_NAME='misc-output'
+OUT1_FILE="/tmp/${OUT1_NAME}.check"
+rm -f $OUT1_FILE
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+rc=$?
+[ $? ] || exit $rc
+check_output $OUT1_FILE ${srcdir}/${OUT1_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-multi cvs/debugger/test/run-multi
--- bash-2.05b/debugger/test/run-multi 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-multi 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,27 @@
+#!../../bash
+#$Id: run-multi,v 1.6 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+for SUBTEST in multi1 multi2 multi3 multi4 ; do
+ TEST_FILE="/tmp/${SUBTEST}.check"
+ (cd $srcdir && ${THIS_SH} ${SUBTEST}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+ check_output $TEST_FILE ${srcdir}/${SUBTEST}.right
+ typeset -i rc=$?
+ if (( rc != 0 )) ; then
+ exit $rc
+ fi
+done
+
+# Return code tells testing mechanism whether passed or not.
+exit 0
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-parm cvs/debugger/test/run-parm
--- bash-2.05b/debugger/test/run-parm 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-parm 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,23 @@
+#!../../bash
+#$Id: run-parm,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='parm'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-search cvs/debugger/test/run-search
--- bash-2.05b/debugger/test/run-search 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-search 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,23 @@
+#!../../bash
+#$Id: run-search,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='search'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-sig cvs/debugger/test/run-sig
--- bash-2.05b/debugger/test/run-sig 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-sig 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,35 @@
+#!../../bash
+#$Id: run-sig,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='sig'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+TEST2_FILE="/tmp/${TEST_NAME}.check2"
+RIGHT_FILE="/tmp/${TEST_NAME}.right"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+set -o noglob
+grep -v "bashdbeval" ${srcdir}/${TEST_NAME}.right >${RIGHT_FILE}
+grep -v "bashdbeval" ${TEST_FILE} >${TEST2_FILE}
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+check_output $TEST2_FILE ${RIGHT_FILE} && {
+ rm -f $TEST_FILE
+}
+
+rc=$?
+rm $RIGHT_FILE
+
+# Return code tells testing mechanism whether passed or not.
+exit $rc
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-skip cvs/debugger/test/run-skip
--- bash-2.05b/debugger/test/run-skip 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-skip 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-skip,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='skip'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-subshell cvs/debugger/test/run-subshell
--- bash-2.05b/debugger/test/run-subshell 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-subshell 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,31 @@
+#!../../bash
+#$Id: run-subshell,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+tests=${@:-"subshell1 subshell2 subshell3"}
+for SUBTEST in $tests; do
+ echo "checking $SUBTEST..."
+ TEST_FILE="/tmp/${SUBTEST}.check"
+ (cd $srcdir && ${THIS_SH} ${SUBTEST}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+ check_output $TEST_FILE ${srcdir}/${SUBTEST}.right
+ typeset -i rc=$?
+ if (( rc == 0 )) ; then
+ rm -f $TEST_FILE
+ else
+ exit $rc
+ fi
+done
+
+# Return code tells testing mechanism whether passed or not.
+exit 0
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-tbreak cvs/debugger/test/run-tbreak
--- bash-2.05b/debugger/test/run-tbreak 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-tbreak 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,23 @@
+#!../../bash
+#$Id: run-tbreak,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+export TOP_BUILDDIR=`pwd`/../
+TEST_NAME='tbreak'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-watch1 cvs/debugger/test/run-watch1
--- bash-2.05b/debugger/test/run-watch1 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-watch1 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-watch1,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='watch1'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ${srcdir}/${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/run-watch2 cvs/debugger/test/run-watch2
--- bash-2.05b/debugger/test/run-watch2 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/run-watch2 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,22 @@
+#!../../bash
+#$Id: run-watch2,v 1.4 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+
+. ${srcdir}/check_common
+
+TEST_NAME='watch2'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+(cd $srcdir && ${THIS_SH} ${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null)
+
+check_output $TEST_FILE ${srcdir}/${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/search.cmd cvs/debugger/test/search.cmd
--- bash-2.05b/debugger/test/search.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/search.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,32 @@
+# Test temporary break
+# $Id: search.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+#
+p "** Try a forward search /x. Should not be the same line ..."
+/x
+p "** Try a backward search ?fn1? ..."
+?fn1?
+p "** Try another backward search ? Should not be the same line ..."
+?
+p "** Above search should reset list line below list start."
+p "** Should get same line as line above..."
+list
+p "** Try forward search /fn1/. Should be line we got command before last ..."
+/fn1/
+p "** Try a backward search ?fn3? ..."
+?fn3?
+p "** Reset line back to begining ..."
+list 1
+p "** Try alternate search form: search /fn1/"
+search /fn1/
+list 1
+p "** Try alternate search form: search fn3"
+search fn3
+p "** Try backward and forward last search..."
+?
+/
+p "** Try alternate search form: rev fn3"
+rev fn3
+p "** Search for something not there..."
+search foobar1111
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/search.right cvs/debugger/test/search.right
--- bash-2.05b/debugger/test/search.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/search.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,56 @@
+(dbg-test1.sh:22):
+22: x=22
+** Try a forward search /x. Should not be the same line ...
+ 25: ((x += i))
+** Try a backward search ?fn1? ...
+ 6: echo "fn1 here"
+** Try another backward search ? Should not be the same line ...
+ 5: fn1() {
+** Above search should reset list line below list start.
+** Should get same line as line above...
+ 5: fn1() {
+ 6: echo "fn1 here"
+ 7: x=5
+ 8: fn3
+ 9: }
+ 10:
+ 11: fn2() {
+ 12: name="fn2"
+ 13: echo "$name here"
+ 14: x=6
+** Try forward search /fn1/. Should be line we got command before last ...
+ 32: fn1;
+** Try a backward search ?fn3? ...
+ 31: fn3 31
+** Reset line back to begining ...
+ 1: #!../../bash
+ 2: # Note: no CVS Id line since it would mess up regression testing.
+ 3: # This code is used for various debugger testing.
+ 4:
+ 5: fn1() {
+ 6: echo "fn1 here"
+ 7: x=5
+ 8: fn3
+ 9: }
+ 10:
+** Try alternate search form: search /fn1/
+ 32: fn1;
+ 1: #!../../bash
+ 2: # Note: no CVS Id line since it would mess up regression testing.
+ 3: # This code is used for various debugger testing.
+ 4:
+ 5: fn1() {
+ 6: echo "fn1 here"
+ 7: x=5
+ 8: fn3
+ 9: }
+ 10:
+** Try alternate search form: search fn3
+ 17: fn3() {
+** Try backward and forward last search...
+ 8: fn3
+ 17: fn3() {
+** Try alternate search form: rev fn3
+ 8: fn3
+** Search for something not there...
+search pattern: foobar1111 not found.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/search.tests cvs/debugger/test/search.tests
--- bash-2.05b/debugger/test/search.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/search.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: search.tests,v 1.2 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=search.cmd
+debugged_script=dbg-test1.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/sig.cmd cvs/debugger/test/sig.cmd
--- bash-2.05b/debugger/test/sig.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/sig.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,23 @@
+# Test that debugged program's signals are savend and restored across
+# debug calls.
+print "*** Testing that we have our signal set up..."
+info signals
+print "*** Testing handle command..."
+handle TERM nostack
+handle foo
+handle 1000
+handle TERM bogus
+eval kill -TERM $$
+print "*** Should not have printed a stack trace above..."
+handle TERM noprint
+handle TERM stack
+handle INT nostop
+eval kill -TERM $$
+info signals
+continue
+print "*** Should have printed a stack trace above..."
+continue
+where
+continue
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/sig.right cvs/debugger/test/sig.right
--- bash-2.05b/debugger/test/sig.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/sig.right 2003-08-30 07:32:03.000000000 +0200
@@ -0,0 +1,43 @@
+(sig.sh:7):
+7: if [[ "$1"x != x ]] ; then
+*** Testing that we have our signal set up...
+Signal Stop Print Stack Value
+EXIT stop noprint nostack trap -- '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
+SIGINT stop print showstack trap -- '_Dbg_sig_handler 2 "$BASH_COMMAND" "$@"' SIGINT
+SIGQUIT stop print showstack trap -- '_Dbg_sig_handler 3 "$BASH_COMMAND" "$@"' SIGQUIT
+SIGILL stop print showstack trap -- '_Dbg_sig_handler 4 "$BASH_COMMAND" "$@"' SIGILL
+SIGTRAP stop print showstack trap -- '_Dbg_sig_handler 5 "$BASH_COMMAND" "$@"' SIGTRAP
+SIGTERM stop print showstack trap -- '_Dbg_sig_handler 15 "$BASH_COMMAND" "$@"' SIGTERM
+*** Testing handle command...
+Bad signal name: foo
+Bad signal number: 1000
+Need to give a command: stop, nostop, stack, nostack, print, noprint
+Program received signal SIGTERM (15)...
+*** Should not have printed a stack trace above...
+Signal Stop Print Stack Value
+EXIT stop noprint nostack trap -- '_Dbg_exit_handler "$BASH_COMMAND"' EXIT
+SIGINT nostop print showstack trap -- '_Dbg_sig_handler 2 "$BASH_COMMAND" "$@"' SIGINT
+SIGQUIT stop print showstack trap -- '_Dbg_sig_handler 3 "$BASH_COMMAND" "$@"' SIGQUIT
+SIGILL stop print showstack trap -- '_Dbg_sig_handler 4 "$BASH_COMMAND" "$@"' SIGILL
+SIGTRAP stop print showstack trap -- '_Dbg_sig_handler 5 "$BASH_COMMAND" "$@"' SIGTRAP
+SIGTERM stop noprint showstack trap -- '_Dbg_sig_handler 15 "$BASH_COMMAND" "$@"' SIGTERM
+Program received signal SIGTERM (15)...
+->0 in file `dbg-cmds.inc' at line 2
+->1 _Dbg_cmd_eval("kill", "-TERM", "$$") called from file `dbg-cmds.inc' at line 240
+##2 _Dbg_cmdloop() called from file `dbg-sig.inc' at line 185
+##3 _Dbg_debug_trap_handler("0", "[[ "$1"x != x ]]") called from file `sig.sh' at line 7
+##4 source("sig.sh") called from file `bashdb' at line 153
+##5 main("-B", "-q", "-L", "..", "-x", "sig.cmd", "sig.sh") called from file `bashdb' at line 0
+*** Should have printed a stack trace above...
+->0 in file `sig.sh' at line 620
+##1 source("sig.sh") called from file `bashdb' at line 153
+##2 main("-B", "-q", "-L", "..", "-x", "sig.cmd", "sig.sh") called from file `bashdb' at line 0
+Program received signal SIGINT (2)...
+->0 in file `sig.sh' at line 23
+->1 source("sig.sh") called from file `bashdb' at line 153
+##2 main("-B", "-q", "-L", "..", "-x", "sig.cmd", "sig.sh") called from file `bashdb' at line 0
+Program received signal SIGINT (2)...
+->0 in file `sig.sh' at line 24
+->1 source("sig.sh") called from file `bashdb' at line 153
+##2 main("-B", "-q", "-L", "..", "-x", "sig.cmd", "sig.sh") called from file `bashdb' at line 0
+Debugged program terminated normally. Use q to quit or R to restart.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/sig.sh cvs/debugger/test/sig.sh
--- bash-2.05b/debugger/test/sig.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/sig.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,25 @@
+#!../../bash
+# Signal handling tests
+child_handler() {
+ echo "child handler called"
+}
+
+if [[ "$1"x != x ]] ; then
+ echo "child process $$ here..."
+ for (( i=1; i<=1000 ; i++ )) ; do
+ x=`echo b*`
+ for (( j=1; j<=1000 ; j++ )) ; do
+ x=`echo t*`
+ x=`echo *source*`
+ done
+ done
+ exit 1
+fi
+
+# set -x
+x=18
+# CHLD handler should not be clobbered by debugger.
+trap child_handler CHLD
+kill -INT $$
+kill -INT $$
+exit 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/sig.tests cvs/debugger/test/sig.tests
--- bash-2.05b/debugger/test/sig.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/sig.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: sig.tests,v 1.2 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=sig.cmd
+debugged_script=sig.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/skip.cmd cvs/debugger/test/skip.cmd
--- bash-2.05b/debugger/test/skip.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/skip.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,28 @@
+# $Id: skip.cmd,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Test skip command
+#
+next
+p "x is $x"
+p "** Try a skip command..."
+skip
+p "x is still $x"
+p "** Try skipping over a for loop..."
+skip
+p "x is still $x"
+p "** Try 'skip 3'..."
+skip 3
+p "x is still $x"
+skip
+p "x is still $x"
+skip
+next
+p "x is still $x"
+skip
+skip
+next
+p "x is now $x"
+skip
+p "x is still $x"
+skip
+p "*** quitting..."
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/skip.right cvs/debugger/test/skip.right
--- bash-2.05b/debugger/test/skip.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/skip.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,39 @@
+(skip.sh:22):
+22: x=22
+(skip.sh:23):
+23: x=23
+x is 22
+** Try a skip command...
+(skip.sh:24):
+24: for i in 1 ; do
+x is still 22
+** Try skipping over a for loop...
+(skip.sh:27):
+27: x=27
+x is still 22
+** Try 'skip 3'...
+(skip.sh:30):
+30: fn1;
+x is still 22
+(skip.sh:31):
+31: fn3 31
+x is still 22
+(skip.sh:32):
+32: case x in
+(skip.sh:33):
+33: * ) x = 33
+x is still 22
+(skip.sh:35):
+35: [[ -z "x" ]] && x=35
+(skip.sh:35):
+35: [[ -z "x" ]] && x=35
+x=35
+(skip.sh:36):
+36: ((x += 1))
+x is now 35
+(skip.sh:37):
+37: source dbg-test1.sub
+x is still 35
+(skip.sh:38):
+38: exit 0;
+*** quitting...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/skip.sh cvs/debugger/test/skip.sh
--- bash-2.05b/debugger/test/skip.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/skip.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,41 @@
+#!../../bash
+# Note: no CVS Id line since it would mess up regression testing.
+# This code is used for various debugger testing.
+
+fn1() {
+ echo "fn1 here"
+ x=5
+ fn3
+}
+
+fn2() {
+ name="fn2"
+ echo "$name here"
+ x=6
+}
+
+fn3() {
+ name="fn3"
+ x=$1
+}
+
+x=22
+x=23
+for i in 1 ; do
+ ((x += i))
+done
+x=27
+echo $(fn3 30)
+fn3 29
+fn1;
+fn3 31
+case x in
+ * ) x = 33
+esac
+[[ -z "x" ]] && x=35
+((x += 1))
+source dbg-test1.sub
+exit 0;
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/skip.tests cvs/debugger/test/skip.tests
--- bash-2.05b/debugger/test/skip.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/skip.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: skip.tests,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=skip.cmd
+debugged_script=skip.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell.sh cvs/debugger/test/subshell.sh
--- bash-2.05b/debugger/test/subshell.sh 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell.sh 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+# $Id: subshell.sh,v 1.1 2003/06/01 01:18:40 rockyb Exp $
+# Test debugger handling of lines with multiple commands per line
+# and subshells in a line
+
+x=1; y=2; z=3
+(cd . ; x=`builtin echo *`; (builtin echo "ho") )
+case `builtin echo "testing"; builtin echo 1,2,3`,`builtin echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+(cd . ; x=`builtin echo *`; (builtin echo "ho") )
+
+x=5; y=6;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell1.cmd cvs/debugger/test/subshell1.cmd
--- bash-2.05b/debugger/test/subshell1.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell1.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,10 @@
+print "Test step inside multi-statement line..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+step
+step
+step
+print "Should now be inside a subshell..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+print "Test unconditional quit..."
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell1.right cvs/debugger/test/subshell1.right
--- bash-2.05b/debugger/test/subshell1.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell1.right 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,15 @@
+(subshell.sh:6):
+6: x=1; y=2; z=3
+Test step inside multi-statement line...
+BASH_SUBSHELL: 0
+(subshell.sh:6):
+6: x=1; y=2; z=3
+y=2
+(subshell.sh:6):
+6: x=1; y=2; z=3
+z=3
+(subshell.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+Should now be inside a subshell...
+BASH_SUBSHELL: 1
+Test unconditional quit...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell1.tests cvs/debugger/test/subshell1.tests
--- bash-2.05b/debugger/test/subshell1.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell1.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: subshell1.tests,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=subshell1.cmd
+debugged_script=subshell.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell2.cmd cvs/debugger/test/subshell2.cmd
--- bash-2.05b/debugger/test/subshell2.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell2.cmd 2003-06-01 03:18:40.000000000 +0200
@@ -0,0 +1,12 @@
+set showcommand on
+print "Test quit inside multi-statement line..."
+step
+step
+step 2
+print "Should now be inside a subshell. Test from here..."
+p "BASH_SUBSHELL: $BASH_SUBSHELL"
+print "Test quit 0 2..."
+quit 0 2
+print "You shouldn't get here. Another just in case."
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell2.right cvs/debugger/test/subshell2.right
--- bash-2.05b/debugger/test/subshell2.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell2.right 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,15 @@
+(subshell.sh:6):
+6: x=1; y=2; z=3
+Test quit inside multi-statement line...
+(subshell.sh:6):
+6: x=1; y=2; z=3
+y=2
+(subshell.sh:6):
+6: x=1; y=2; z=3
+z=3
+(subshell.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+Should now be inside a subshell. Test from here...
+BASH_SUBSHELL: 1
+Test quit 0 2...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell2.tests cvs/debugger/test/subshell2.tests
--- bash-2.05b/debugger/test/subshell2.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell2.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: subshell2.tests,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile=subshell2.cmd
+debugged_script=subshell.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell3.cmd cvs/debugger/test/subshell3.cmd
--- bash-2.05b/debugger/test/subshell3.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell3.cmd 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,8 @@
+set showcommand on
+print "Test partial quit inside multi-statement line..."
+step
+step
+print "Next step should bring us inside a subshell. Test from there..."
+step 2
+quit 0 1
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell3.right cvs/debugger/test/subshell3.right
--- bash-2.05b/debugger/test/subshell3.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell3.right 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,15 @@
+(subshell.sh:6):
+6: x=1; y=2; z=3
+Test partial quit inside multi-statement line...
+(subshell.sh:6):
+6: x=1; y=2; z=3
+y=2
+(subshell.sh:6):
+6: x=1; y=2; z=3
+z=3
+Next step should bring us inside a subshell. Test from there...
+(subshell.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+ho
+Debugged program terminated normally. Use q to quit or R to restart.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell3.tests cvs/debugger/test/subshell3.tests
--- bash-2.05b/debugger/test/subshell3.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell3.tests 2003-06-08 16:39:28.000000000 +0200
@@ -0,0 +1,21 @@
+#!../../bash
+#$Id: subshell3.tests,v 1.3 2003/06/08 14:39:28 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+if test -z $top_builddir ; then
+ top_builddir=..
+fi
+
+cmdfile=subshell3.cmd
+debugged_script=subshell.sh
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell4.cmd cvs/debugger/test/subshell4.cmd
--- bash-2.05b/debugger/test/subshell4.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell4.cmd 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,36 @@
+set showcommand on
+print "Test step inside multi-statement lines and subshells..."
+step 1
+step 3
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+step
+H
+p "BASH_SUBSHELL $BASH_SUBSHELL"
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell4.right cvs/debugger/test/subshell4.right
--- bash-2.05b/debugger/test/subshell4.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell4.right 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,104 @@
+(subshell.sh:6):
+6: x=1; y=2; z=3
+Test step inside multi-statement lines and subshells...
+(subshell.sh:6):
+6: x=1; y=2; z=3
+y=2
+(subshell.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+BASH_SUBSHELL 1
+(subshell.sh:7):
+7: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+builtin echo "ho"
+7: step
+6: p "BASH_SUBSHELL $BASH_SUBSHELL"
+5: step
+4: p "BASH_SUBSHELL $BASH_SUBSHELL"
+3: step 3
+2: step 1
+1: print "Test step inside multi-statement lines and subshells..."
+0: set showcommand on
+BASH_SUBSHELL 2
+ho
+(subshell.sh:11):
+11: *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ECHO_N=-n ECHO_C= ECHO_T=
+15: step
+14: p "BASH_SUBSHELL $BASH_SUBSHELL"
+13: step
+12: p "BASH_SUBSHELL $BASH_SUBSHELL"
+11: step
+10: p "BASH_SUBSHELL $BASH_SUBSHELL"
+9: step
+8: p "BASH_SUBSHELL $BASH_SUBSHELL"
+7: step
+6: p "BASH_SUBSHELL $BASH_SUBSHELL"
+5: step
+4: p "BASH_SUBSHELL $BASH_SUBSHELL"
+3: step 3
+2: step 1
+1: print "Test step inside multi-statement lines and subshells..."
+0: set showcommand on
+BASH_SUBSHELL 0
+(subshell.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+cd .
+17: step
+16: p "BASH_SUBSHELL $BASH_SUBSHELL"
+15: step
+14: p "BASH_SUBSHELL $BASH_SUBSHELL"
+13: step
+12: p "BASH_SUBSHELL $BASH_SUBSHELL"
+11: step
+10: p "BASH_SUBSHELL $BASH_SUBSHELL"
+9: step
+8: p "BASH_SUBSHELL $BASH_SUBSHELL"
+7: step
+6: p "BASH_SUBSHELL $BASH_SUBSHELL"
+5: step
+4: p "BASH_SUBSHELL $BASH_SUBSHELL"
+3: step 3
+2: step 1
+1: print "Test step inside multi-statement lines and subshells..."
+0: set showcommand on
+BASH_SUBSHELL 1
+(subshell.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+x=`builtin echo *`
+BASH_SUBSHELL 1
+(subshell.sh:15):
+15: (cd . ; x=`builtin echo *`; (builtin echo "ho") )
+builtin echo "ho"
+BASH_SUBSHELL 2
+ho
+(subshell.sh:17):
+17: x=5; y=6;
+x=5
+25: step
+24: p "BASH_SUBSHELL $BASH_SUBSHELL"
+23: step
+22: p "BASH_SUBSHELL $BASH_SUBSHELL"
+21: step
+20: p "BASH_SUBSHELL $BASH_SUBSHELL"
+19: step
+18: p "BASH_SUBSHELL $BASH_SUBSHELL"
+17: step
+16: p "BASH_SUBSHELL $BASH_SUBSHELL"
+15: step
+14: p "BASH_SUBSHELL $BASH_SUBSHELL"
+13: step
+12: p "BASH_SUBSHELL $BASH_SUBSHELL"
+11: step
+10: p "BASH_SUBSHELL $BASH_SUBSHELL"
+9: step
+8: p "BASH_SUBSHELL $BASH_SUBSHELL"
+7: step
+6: p "BASH_SUBSHELL $BASH_SUBSHELL"
+5: step
+4: p "BASH_SUBSHELL $BASH_SUBSHELL"
+3: step 3
+2: step 1
+1: print "Test step inside multi-statement lines and subshells..."
+0: set showcommand on
+BASH_SUBSHELL 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/subshell4.tests cvs/debugger/test/subshell4.tests
--- bash-2.05b/debugger/test/subshell4.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/subshell4.tests 2003-06-01 03:35:11.000000000 +0200
@@ -0,0 +1,21 @@
+#!../../bash
+#$Id: subshell4.tests,v 1.2 2003/06/01 01:35:11 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+if test -z $top_builddir ; then
+ top_builddir=..
+fi
+
+cmdfile="$srcdir/subshell4.cmd"
+debugged_script="$srcdir/subshell.sh"
+
+$d/bash $top_builddir/bashdb -B -q -L $d -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/tbreak.cmd cvs/debugger/test/tbreak.cmd
--- bash-2.05b/debugger/test/tbreak.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/tbreak.cmd 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,25 @@
+# $Id: tbreak.cmd,v 1.1 2003/06/01 01:18:41 rockyb Exp $
+# Test temporary break
+#
+p "*** Try a simple temporary breakpoint..."
+tbreak 23
+info break
+p "*** Should continue to line 23..."
+cont
+p "*** Go on to line 25..."
+step 4
+p "*** Try a temporary breakpoint here (line 25)..."
+tbreak
+p "*** And another a temporary breakpoint at fn3..."
+tbreak fn3
+L
+step 2
+L
+p "*** Should not not see line 25 above and not stop again. Continue to fn3..."
+cont
+L
+p Should end but stay in debugger..
+cont
+p "***quitting..."
+quit
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/tbreak.right cvs/debugger/test/tbreak.right
--- bash-2.05b/debugger/test/tbreak.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/tbreak.right 2003-08-30 07:32:11.000000000 +0200
@@ -0,0 +1,40 @@
+(dbg-test1.sh:22):
+22: x=22
+*** Try a simple temporary breakpoint...
+One-time breakpoint 1 set in file dbg-test1.sh, line 23.
+Num Type Disp Enb What
+1 breakpoint del y dbg-test1.sh:23
+No watch expressions have been set.
+*** Should continue to line 23...
+(dbg-test1.sh:23):
+23: y=23
+*** Go on to line 25...
+(dbg-test1.sh:25):
+25: ((x += i))
+*** Try a temporary breakpoint here (line 25)...
+One-time breakpoint 2 set in file dbg-test1.sh, line 25.
+*** And another a temporary breakpoint at fn3...
+One-time breakpoint 3 set in file dbg-test1.sh, line 17.
+Num Type Disp Enb What
+2 breakpoint del y dbg-test1.sh:25
+3 breakpoint del y dbg-test1.sh:17
+No watch expressions have been set.
+No actions have been set.
+(dbg-test1.sh:25):
+25: ((x += i))
+Num Type Disp Enb What
+3 breakpoint del y dbg-test1.sh:17
+No watch expressions have been set.
+No actions have been set.
+*** Should not not see line 25 above and not stop again. Continue to fn3...
+(dbg-test1.sh:17): 17: fn3() { No breakpoints have been set. No watch expressions have been set. No actions have been set. Should end but stay in debugger..
+fn1 here
+SOURCED LINENO 19
+SOURCED BASH_SOURCE[0] dbg-test1.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from dbg-test1.sub at line 22
+FUNCNAME[1]: source called from dbg-test1.sh at line 34
+FUNCNAME[2]: source called from bashdb at line 153
+FUNCNAME[3]: main called from bashdb at line 0
+Debugged program terminated normally. Use q to quit or R to restart.
+***quitting...
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/tbreak.tests cvs/debugger/test/tbreak.tests
--- bash-2.05b/debugger/test/tbreak.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/tbreak.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: tbreak.tests,v 1.4 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile="tbreak.cmd"
+debugged_script="dbg-test1.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/watch1.cmd cvs/debugger/test/watch1.cmd
--- bash-2.05b/debugger/test/watch1.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/watch1.cmd 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,30 @@
+#
+# Test of watchpoint handling
+# $Id: watch1.cmd,v 1.1 2003/06/01 01:18:41 rockyb Exp $
+#
+print "*** Should fail since xyxxy is not defined..."
+watch xyxxy
+info break
+print "*** Test a simple breakpoint..."
+eval xx=1
+watch xx
+info break
+#
+# Now try enable and disable
+#
+print "*** Try testing enable/disable..."
+en 0w
+L
+dis 0W
+L
+print "*** Try deleting nonexistent watchpoint..."
+delete 10w
+#
+print "*** Test display of watchpoints..."
+watche y > 25
+info break
+delete 0w
+info break
+delete 1w
+info break
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/watch1.right cvs/debugger/test/watch1.right
--- bash-2.05b/debugger/test/watch1.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/watch1.right 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,35 @@
+(dbg-test1.sh:22):
+22: x=22
+*** Should fail since xyxxy is not defined...
+Can't set watch: no such variable xyxxy.
+No breakpoints have been set.
+No watch expressions have been set.
+*** Test a simple breakpoint...
+ 0: ($xx)==1 arith: 0
+No breakpoints have been set.
+Watch expressions:
+0 watchpoint y $xx
+*** Try testing enable/disable...
+Watchpoint entry 0 already enabled so nothing done.
+No breakpoints have been set.
+Watch expressions:
+0 watchpoint y $xx
+No actions have been set.
+Watchpoint entry 0 disabled.
+No breakpoints have been set.
+Watch expressions:
+0 watchpoint n $xx
+No actions have been set.
+*** Try deleting nonexistent watchpoint...
+Watchpoint entry 10 doesn't exist so nothing done.
+*** Test display of watchpoints...
+ 1: (y > 25)==0 arith: 1
+No breakpoints have been set.
+Watch expressions:
+0 watchpoint n $xx
+1 watchpoint y y > 25
+No breakpoints have been set.
+Watch expressions:
+1 watchpoint y y > 25
+No breakpoints have been set.
+No watch expressions have been set.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/watch1.tests cvs/debugger/test/watch1.tests
--- bash-2.05b/debugger/test/watch1.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/watch1.tests 2003-06-01 03:35:11.000000000 +0200
@@ -0,0 +1,21 @@
+#!../../bash
+#$Id: watch1.tests,v 1.2 2003/06/01 01:35:11 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+if test -z $top_builddir ; then
+ top_builddir=..
+fi
+
+cmdfile="$srcdir/watch1.cmd"
+debugged_script="$srcdir/dbg-test1.sh"
+
+$d/bash $top_builddir/bashdb -B -q -L $d -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/watch2.cmd cvs/debugger/test/watch2.cmd
--- bash-2.05b/debugger/test/watch2.cmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/watch2.cmd 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,10 @@
+#
+# Test of dollar variables in watche, display and break condition
+# $Id: watch2.cmd,v 1.1 2003/06/01 01:18:41 rockyb Exp $
+#
+watche $? != 0
+break fn3 if $1==30
+display echo "1 is $1, ? is $?"
+continue
+continue
+quit
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/watch2.right cvs/debugger/test/watch2.right
--- bash-2.05b/debugger/test/watch2.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/watch2.right 2003-06-01 03:18:41.000000000 +0200
@@ -0,0 +1,16 @@
+(dbg-test1.sh:22):
+22: x=22
+ 0: ($? != 0)==0 arith: 1
+Breakpoint 1 set in file dbg-test1.sh, line 17.
+ 0: echo "1 is $1, ? is $?"
+Breakpoint 1 hit (1 times). (dbg-test1.sh:17): 17: fn3() { 0 (echo "1 is $1, ? is $?"): 1 is 30, ? is 0
+fn1 here
+SOURCED LINENO 19
+SOURCED BASH_SOURCE[0] dbg-test1.sub
+SOURCED FN LINENO 5
+Watchpoint 0: $? != 0 changed:
+ old value: '0'
+ new value: '1'
+(dbg-test1.sub:13):
+13: local filename=${BASH_SOURCE[$j]##*/}
+ 0 (echo "1 is $1, ? is $?"): 1 is 33, ? is 1
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/debugger/test/watch2.tests cvs/debugger/test/watch2.tests
--- bash-2.05b/debugger/test/watch2.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/debugger/test/watch2.tests 2003-06-01 15:23:12.000000000 +0200
@@ -0,0 +1,17 @@
+#!../../bash
+#$Id: watch2.tests,v 1.3 2003/06/01 13:23:12 rockyb Exp $
+
+if test -z $srcdir ; then
+ srcdir=`pwd`
+fi
+d="$srcdir/.."
+
+cmdfile="watch2.cmd"
+debugged_script="dbg-test1.sh"
+
+$d/bash ${TOP_BUILDDIR}bashdb -B -q -L .. -x $cmdfile $debugged_script
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/Makefile.in cvs/doc/Makefile.in
--- bash-2.05b/doc/Makefile.in 2002-05-16 21:17:07.000000000 +0200
+++ cvs/doc/Makefile.in 2003-08-30 07:32:20.000000000 +0200
@@ -1,6 +1,6 @@
# This Makefile is for the Bash/documentation directory -*- text -*-.
#
-# Copyright (C) 1996 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -65,6 +65,10 @@
DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
TEXINPUTDIR = $(RL_LIBDIR)/doc
+SET_TEXINPUTS = \
+ TEXINPUTS=${TEXINPUTDIR}:.:$$TEXINPUTS
+
+
# These tools might not be available; they're not required
DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
@@ -122,14 +126,36 @@
$(RM) $@
-${DVIPDF} $<
+.dvi.ps:
+ $(RM) $@
+ -${DVIPS} $<
+
+.texi.dvi: $(HSUSER) $(RLUSER)
+ -$(SET_TEXINPUTS) $(TEXI2DVI) $<
+
+.texi.html: $(HSUSER) $(RLUSER)
+ -$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $<
+
+
all: ps info dvi text html
nodvi: ps info text html
+# Below we want the time on this derived file to be the same as
+# the file that contains stuff that gets sucked in that way we
+# don't have make do unnessary rebuilding.
+# Iit would mean the user has to have TeX installed since
+# it will cause TeX to get run again.
+version.texi: version.texi.in
+ (cd ${topdir} && ./config.status)
+ touch -r ${topdir}/configure.in $<
+
+
PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
-DVIFILES = bashref.dvi bashref.ps
-INFOFILES = bashref.info
+DVIFILES = bashref.dvi bashref.ps
+INFOFILES = bash.info
MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
-HTMLFILES = bashref.html bash.html
+MAN1FILES = bash bashbug
+HTMLFILES = bashref.html bash.html
PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
ps: ${PSFILES}
@@ -139,21 +165,11 @@
html: ${HTMLFILES}
pdf: ${PDFFILES}
-bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
-
-bashref.ps: bashref.dvi
- $(RM) $@
- $(DVIPS) bashref.dvi
-
-bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
- $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
-
-bashref.html: bashref.texi $(HSUSER) $(RLUSER)
- $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
+bash.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
+ $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi -o $(srcdir)/bash.info
new-bashref.dvi: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/new-bashref.texi
+ -TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/new-bashref.texi
new-bashref.ps: new-bashref.dvi
$(RM) $@
@@ -216,29 +232,40 @@
-if test -n "$(htmldir)" ; then \
test -d $(htmldir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(htmldir) ; \
fi
-
+
install: info installdirs
- -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
- -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
+ @list='$(MAN1FILES)'; for p in $$list; do \
+ $(INSTALL_DATA) $(srcdir)/$$p.1 $(DESTDIR)$(man1dir) ; \
+ done
# uncomment the next line to install the builtins man page
# -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
- -$(INSTALL_DATA) $(srcdir)/bashref.info $(DESTDIR)$(infodir)/bash.info
+ @list='$(INFOFILES)'; for p in $$list; do \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(infodir) ; \
+ done
# run install-info if it is present to update the info directory
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
+ for p in $(INFOFILES); do \
+ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/$$p; \
+ done ; \
else true; fi
# if htmldir is set, install the html files into that directory
-if test -n "${htmldir}" ; then \
- $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
- $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
+ @list='$(HTMLFILES)'; for p in $$list; do \
+f $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(htmldir) ; \
+ done; \
fi
uninstall:
- -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
- $(RM) $(DESTDIR)$(infodir)/bash.info
+ @list='$(MAN1FILES)'; for p in $$list; do \
+ $(RM) $(DESTDIR)$(man1dir)/$$p${man1ext} ; \
+ done
+ @list='$(INFOFILES)'; for p in $$list; do \
+ $(RM) $(DESTDIR)$(infodir)/bash.info ; \
+ done
-if test -n "$(htmldir)" ; then \
- $(RM) $(DESTDIR)$(htmldir)/bash.html ; \
- $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
+ @list='$(HTMLFILES)'; for p in $$list; do \
+ $(RM) $(DESTDIR)$(htmldir)/$$p ; \
+ done; \
fi
# for use by chet
@@ -286,3 +313,7 @@
$(RM) RBASH
xdist: inst posix rbash
+
+#;;; Local Variables: ***
+#;;; mode:makefile ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/bash.1 cvs/doc/bash.1
--- bash-2.05b/doc/bash.1 2002-07-15 21:21:03.000000000 +0200
+++ cvs/doc/bash.1 2003-08-11 10:07:11.000000000 +0200
@@ -1456,7 +1456,9 @@
is excluded from the list of matched filenames.
A sample value is
.if t \f(CW".o:~"\fP.
-.if n ".o:~".
+.if n ".o:~"
+(Quoting is needed when assigning a value to this variable,
+which contains tildes).
.TP
.B GLOBIGNORE
A colon-separated list of patterns defining the set of filenames to
@@ -2361,6 +2363,9 @@
\fB$((\fP\fIexpression\fP\fB))\fP
.RE
.PP
+The old format \fB$[\fP\fIexpression\fP\fB]\fP is deprecated and will
+be removed in upcoming versions of bash.
+.PP
The
.I expression
is treated as if it were within double quotes, but a double quote
Only in bash-2.05b/doc: bashref.info
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/bashref.texi cvs/doc/bashref.texi
--- bash-2.05b/doc/bashref.texi 2002-07-15 21:21:24.000000000 +0200
+++ cvs/doc/bashref.texi 2003-05-24 22:13:48.000000000 +0200
@@ -4,14 +4,7 @@
@settitle Bash Reference Manual
@c %**end of header
-@ignore
-Last Change: Mon Jul 15 15:21:16 EDT 2002
-@end ignore
-
-@set EDITION 2.5b
-@set VERSION 2.05b
-@set UPDATED 15 July 2002
-@set UPDATE-MONTH July 2002
+@include version.texi
@iftex
@finalout
@@ -32,7 +25,7 @@
This text is a brief description of the features that are present in
the Bash shell.
-This is Edition @value{EDITION}, last updated @value{UPDATED},
+This is Edition @value{EDITION}, last updated @value{UPDATED-MONTH},
of @cite{The GNU Bash Reference Manual},
for @code{Bash}, Version @value{VERSION}.
@@ -65,9 +58,10 @@
@title Bash Reference Manual
@subtitle Reference Documentation for Bash
@subtitle Edition @value{EDITION}, for @code{Bash} Version @value{VERSION}.
-@subtitle @value{UPDATE-MONTH}
+@subtitle @value{UPDATED-MONTH}
@author Chet Ramey, Case Western Reserve University
@author Brian Fox, Free Software Foundation
+@author (Debug support modifications Rocky Bernstein)
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1991-2002 Free Software Foundation, Inc.
@@ -96,7 +90,7 @@
This text is a brief description of the features that are present in
the Bash shell.
-This is Edition @value{EDITION}, last updated @value{UPDATED},
+This is Edition @value{EDITION}, last updated @value{UPDATED-MONTH},
of @cite{The GNU Bash Reference Manual},
for @code{Bash}, Version @value{VERSION}.
@@ -145,6 +139,8 @@
between Bash and historical
versions of /bin/sh.
+* Enhancements to Bash 2.05b:: Enhancements to BASH 2.05b
+
* Builtin Index:: Index of Bash builtin commands.
* Reserved Word Index:: Index of Bash reserved words.
@@ -2856,10 +2852,17 @@
shell input.
Each @var{sigspec} is either a signal name such as @code{SIGINT} (with
or without the @code{SIG} prefix) or a signal number.
-If a @var{sigspec}
-is @code{0} or @code{EXIT}, @var{arg} is executed when the shell exits.
+
+There are a couple of special signals which are not in operating
+system signal mechanism; they are ``built in'' or internal to the Bash
+shell. In particular these are @code{DEBUG}, @code{ERR}, @code{EXIT},
+@code{RETURN} and @code{SUBEXIT}.
+
If a @var{sigspec} is @code{DEBUG}, the command @var{arg} is executed
-after every simple command.
+after every simple command and the command to be executed is skipped
+if this function returns a nonzero value and if the value is 2, a
+@code{return} is performed.
+
If a @var{sigspec} is @code{ERR}, the command @var{arg}
is executed whenever a simple command has a non-zero exit status.
The @code{ERR} trap is not executed if the failed command is part of an
@@ -2869,6 +2872,22 @@
The @option{-l} option causes the shell to print a list of signal names
and their corresponding numbers.
+If a @var{sigspec} is @code{0} or @code{EXIT}, @var{arg} is executed
+when the shell exits.
+
+If a @var{sigspec} is @code{RETURN}, the command @var{arg} is run
+whenever a function returns or the builtin @code{source} of a file
+returns from executing that file. This can be used for example by a
+debugger to arrange uninterrupted execution within a function but
+regain control on leaving the function (implementing the GDB "finish"
+command)
+
+If a @var{sigspec} is @code{SUBEXIT}, the command @var{arg} is run
+whenever a subshell exits. This can be used for example if you want to
+export information from the subshell its parent. You would have to
+save the information to get passed back through some persistent
+storage outside of the shell, e.g. such as in a file.
+
Signals ignored upon entry to the shell cannot be trapped or reset.
Trapped signals are reset to their original values in a child
process when it is created.
@@ -3031,6 +3050,24 @@
The return status is non-zero if @var{shell-builtin} is not a shell
builtin command.
+@item caller
+@btindex caller
+@example
+caller [@var{expr}]
+@end example
+Returns the context of the current subroutine call.
+
+Without @var{expr}, caller returns returns ``@var{line}
+@var{filename}''. With @var{expr}, caller returns ``@var{line}
+@var{subroutine} @var{filename}''; this extra information can be used
+for example to print a stack trace.
+
+The value of @var{expr} indicates how many call frames to go back before the",
+current one; the top frame number would be 0.
+
+Note that we've arranged things so that fields that might have a
+embedded blanks (i.e. @var{filename}) are listed last.
+
@item command
@btindex command
@example
@@ -3067,11 +3104,9 @@
The @option{-p} option will display the attributes and values of each
@var{name}. When @option{-p} is used, additional options are ignored.
-The @option{-F} option inhibits the display of function definitions;
-only the function name and attributes are printed. @option{-F} implies
-@option{-f}. The following options can be used to restrict output
-to variables with the specified attributes or to give variables
-attributes:
+The following
+options can be used to restrict output to variables with the specified
+attributes or to give variables attributes:
@table @code
@item -a
@@ -3080,6 +3115,11 @@
@item -f
Use function names only.
+@item -F
+Use function names only (implies @option{-f}. However the function
+name, line number of the function and source-file name is printed
+rather than the entire body.
+
@item -i
The variable is to be treated as
an integer; arithmetic evaluation (@pxref{Shell Arithmetic}) is
@@ -3687,6 +3727,9 @@
Cause the status of terminated background jobs to be reported
immediately, rather than before printing the next primary prompt.
+@item -d
+Function tracing is enabled (@pxref{Job Control}).
+
@item -e
Exit immediately if a simple command (@pxref{Simple Commands}) exits
with a non-zero status, unless the command that fails is part of an
@@ -3732,6 +3775,9 @@
@item errexit
Same as @code{-e}.
+@item fntrace
+Same as @code{-d}.
+
@item hashall
Same as @code{-h}.
@@ -3998,11 +4044,72 @@
@item BASH
The full pathname used to execute the current instance of Bash.
+@item BASH_ARGC
+This variable is an array which gives a count of the number of
+parameters on the current Bash call stack. The information is stored as
+a stack: first in, first out. That is number of parameters in the last
+call is on the top of the stack, and the number of parameters of the
+first call to be completed is on the bottom of the stack (or has index
+entry 0). When a function is called or a Bash script is invoked, the
+count of the parameters is pushed onto this stack. See below under
+@code{BASH_ARGV} for an example.
+
+@item BASH_ARGV
+This variable is an array which lists all the parameter arguments in
+the current Bash call stack. The information is stored as a stack:
+first in, first out. That is, the last parameter of the last call is on
+the top of the stack, the first parameter of the initial call is on
+the bottom of the stack (or has index entry 0). When a function is
+called or a bash script is invoked, the parameters given are pushed
+onto this stack. For example:
+
+@example
+@code{bashdb -L .. -q debugged_script}
+@end example
+
+@code{$@{#BASH_ARGC[@@]@}} would be 1, @code{$@{BASH_ARGC[0]@}} would be
+4, @code{$@{BASH_ARGV[0]@}} would be ``debugged_script'' and
+@code{$@{BASH_ARGV[3]@}} would be ``-L.'' If @code{debugged_script}
+immediately calls issues a function call @code{foo thee more arguments},
+then @code{$@{#BASH_ARGC[@@]@}} would be 2, @code{$@{BASH_ARGC[0]@}} would be
+3 and @code{$@{BASH_ARGV[0]@}} would be ``arguments.''
+
+@item BASH_COMMAND
+This variable contains the command that is about to be executed or is
+currently executed provided that the command is not a ``trap''
+command. This gives a way for a trap handler to know which statement
+exactly was run when the trap occurred---you'll have to however pass
+@code{$BASH_COMMAND} as a parameter to the trap handler, since the
+next statement will change its value. Knowing what the source line
+number and filename was isn't precise, since there can be many
+statements, conditional expressions, components of an arithmetic for
+loop on a single line. In fact the command run on the line can change
+when ``eval'' or command substitution is used.
+
@item BASH_ENV
If this variable is set when Bash is invoked to execute a shell
script, its value is expanded and used as the name of a startup file
to read before executing the script. @xref{Bash Startup Files}.
+@item BASH_LINENO
+This is an array of the line numbers of the call
+stack. @code{$@{BASH_LINENO[$i]@}} is the line number in the source
+file where @code{$@{FUNCNAME[$i]@}} was called. The bottom-most
+function (``main'') has a line number 0. Note that corresponding
+indices are one less those used in @code{BASH_SOURCE}. Use
+@code{LINENO} to get the top-most (or @code{BASH_SOURCE}'s zero-index
+line number.
+
+@item BASH_SUBSHELL
+Incremented by one each time a new subshell is started. This is
+intended to be a count of how deeply your subshells are nested.
+
+@item BASH_SOURCE
+This is an array of source file names for the command that is currently
+under execution. This is a stack-like array; the 0th element is for
+the top of the call stack, or currently executing command, the 1st
+element is the source file of the caller (if any) and so on.
+
@item BASH_VERSION
The version number of the current instance of Bash.
@@ -4098,11 +4205,12 @@
value is @samp{.o:~}
@item FUNCNAME
-The name of any currently-executing shell function.
-This variable exists only when a shell function is executing.
-Assignments to @env{FUNCNAME} have no effect and return an error status.
-If @env{FUNCNAME} is unset, it loses its special properties, even if
-it is subsequently reset.
+An array containing the names of the shell functions currently in
+the execution call stack. The index 0 position is the current function name
+if inside a function, the index 1 position is the caller's function if
+that exists. Assignments to @code{FUNCNAME} have no effect and are
+silently discarded. If @code{FUNCNAME} is unset, it loses its special
+properties, even if it is subsequently reset.
@item GLOBIGNORE
A colon-separated list of patterns defining the set of filenames to
@@ -4185,6 +4293,14 @@
The maximum number of commands to remember on the history list.
The default value is 500.
+@item HISTTIMEFORMAT
+The format of the timestamp shown in command is controlled by the
+$HIST_TIMEFORMAT environment variable via strftime. The default value
+is '%a %T ' (abbreviated weekday name and 24-hour time with
+seconds). Note the trailing blank. See strftime(3) for a list of time
+conversion specifiers. The maximum number of commands to remember on
+the history list.
+
@item HOSTFILE
Contains the name of a file in the same format as @file{/etc/hosts} that
should be read when the shell needs to complete a hostname.
@@ -4445,6 +4561,11 @@
line before the single-character options to be recognized.
@table @code
+@item --debugger
+Arrange for the debugger profile to be run before starting. This
+profile among other things sets a debug trap handler to intercept
+statments before they are run.
+
@item --dump-po-strings
A list of all double-quoted strings preceded by @samp{$}
is printed on the standard ouput
@@ -6722,10 +6843,15 @@
@item
The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a
@code{DEBUG} pseudo-signal specification, similar to @code{EXIT}.
-Commands specified with a @code{DEBUG} trap are executed after every
-simple command.
-The @code{DEBUG} trap is not inherited by shell functions unless the
-function has been given the @code{trace} attribute.
+Commands specified with a @code{DEBUG} trap are executed before every
+simple command. The @code{DEBUG} trap is not inherited by shell
+functions unless the function has been given the @code{trace}
+attribute or the set option @code{-d} has been set. If the function
+specified in the trap returns a non-zero value, the statement to be
+executed is not run, but skipped. This can be used to implement in a
+debugger, for example, code which replace the actual code in a
+script. However if function specified in the trap returns 2, not only
+is that statement skipped but @code{return} is executed.
The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows an
@code{ERR} pseudo-signal specification, similar to @code{EXIT} and @code{DEBUG}.
@@ -6841,6 +6967,94 @@
(it turns on job control).
@end itemize
+@node Enhancements to Bash 2.05b
+@appendix Enhancements to BASH 2.05b
+
+@itemize @bullet
+@item
+Added @code{--debugger} option which sources debugger startup script.
+
+@item
+Extended @code{FUNCNAME} variable to be an array indicating the call
+stack of function names in effect. The top-level "function" name is
+"main."
+
+@item
+Extended @code{declare -F fn} to return the source file name and the
+line number inside that of fn.
+
+@item
+Added dynamic @code{BASH_ARGC} and @code{BASH_ARGV} arrays which store all of
+the parameters. @code{BASH_ARGC} gives the number of parameters in a
+call. @code{BASH_ARGV} are the parameters in stack like fashion. Last
+parameter of last call is on top, first parameter of initial call is
+on the bottom (index 0).
+
+@item
+Added dynamic @code{BASH_SOURCE} array variable to give the file names
+associated with @code{FUNCNAME}.
+
+@item
+Using @code{BASH_SOURCE} we now report the right filename when you have an
+evaluation error in a sourced file.
+
+@item
+Added dynamic @code{BASH_LINENO} array variable to give the source
+file line numbers names associated with @code{FUNCNAME}.
+
+@item
+@code{LINENO}: All line numbers are now relative to the beginning of a file,
+not relative to a function name.
+
+@item
+Added dynamic @code{BASH_COMMAND} variable which is the command to be
+executed (or is executing) unless the command is a "trap" in which
+case it is the command that will be executed after the trap completes.
+
+@item
+Added dynamic @code{BASH_SUBSHELL} variable gives the number of subshells
+that you are nested in.
+
+@item
+Added a new traps @code{RETURN} and @code{SUBEXIT} which executes a
+handler every time a function or sourced file is returned or a
+subshell exited.
+
+@item
+Added @code{caller()} builtin function which works like Perl's builtin.
+
+@item
+@code{trap DEBUG} will skip the next statement to be executed if the
+handler returns 2 (or sets $? to 2).
+
+@item
+Line number on command substitution @samp{``} @samp{$()} and @samp{@{
+@}} is the line number of the source file, and not relative to the
+beginning of the substitution (which is usually 1). For debugging
+absolute line numbers are useful. Even outside of debugging, when
+reporting errors it's hard to see how error messages like these
+generated from errors.tests in the previous versions of bash (<=2.05):
+
+@smallexample
+./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected
+(error token is "/bin/sh + 0")
+@end smallexample
+
+are as helpful than what we get now with absolute line numbers:
+
+@smallexample
+./errors.tests: line 212: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+@end smallexample
+
+@item
+Line numbers probably a little more accurate on tracing and
+LINENO. Listed for variables and case and select selectors. Case
+condition lines listed.
+
+@end itemize
+
@node Builtin Index
@unnumbered Index of Shell Builtin Commands
@printindex bt
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/builtins.1 cvs/doc/builtins.1
--- bash-2.05b/doc/builtins.1 2001-11-27 21:20:01.000000000 +0100
+++ cvs/doc/builtins.1 2003-08-11 10:07:11.000000000 +0200
@@ -10,6 +10,6 @@
ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
.SH BASH BUILTIN COMMANDS
.nr zZ 1
-.so bash.1
+.so man1/bash.1
.SH SEE ALSO
bash(1), sh(1)
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/fdl.texi cvs/doc/fdl.texi
--- bash-2.05b/doc/fdl.texi 1970-01-01 01:00:00.000000000 +0100
+++ cvs/doc/fdl.texi 2002-09-03 18:35:32.000000000 +0200
@@ -0,0 +1,368 @@
+@c -*-texinfo-*-
+@node GNU Free Documentation License
+
+@appendix GNU Free Documentation License
+@center Version 1.1, March 2000
+
+@display
+Copyright (C) 2000 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+@sp 1
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document ``free'' in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@sp 1
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The ``Document'', below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as ``you.''
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not ``Transparent'' is called ``Opaque.''
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+@sp 1
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+@sp 1
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+@sp 1
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.@*
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).@*
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.@*
+D. Preserve all the copyright notices of the Document.@*
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.@*
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.@*
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.@*
+H. Include an unaltered copy of this License.@*
+I. Preserve the section entitled ``History'', and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled ``History'' in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.@*
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the ``History'' section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.@*
+K. In any section entitled ``Acknowledgements'' or ``Dedications'',
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.@*
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.@*
+M. Delete any section entitled ``Endorsements.'' Such a section
+ may not be included in the Modified Version.@*
+N. Do not retitle any existing section as ``Endorsements''
+ or to conflict in title with any Invariant Section.@*
+@sp 1
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+@sp 1
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled ``History''
+in the various original documents, forming one section entitled
+``History''; likewise combine any sections entitled ``Acknowledgements'',
+and any sections entitled ``Dedications.'' You must delete all sections
+entitled ``Endorsements.''
+@sp 1
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+@sp 1
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an ``aggregate'', and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+@sp 1
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+@sp 1
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+@sp 1
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+@end enumerate
+
+@unnumberedsec ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+Copyright (C) @var{year} @var{your name}.
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with the Invariant Sections being @var{list their titles}, with the
+Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
+A copy of the license is included in the section entitled "GNU
+Free Documentation License."
+@end group
+@end smallexample
+
+If you have no Invariant Sections, write ``with no Invariant Sections''
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write ``no Front-Cover Texts'' instead of
+``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/gpl.texi cvs/doc/gpl.texi
--- bash-2.05b/doc/gpl.texi 1970-01-01 01:00:00.000000000 +0100
+++ cvs/doc/gpl.texi 2002-09-03 18:34:22.000000000 +0200
@@ -0,0 +1,409 @@
+@ignore
+@c Set file name and title for man page.
+@setfilename gpl
+@settitle GNU General Public License
+@c man begin SEEALSO
+gfdl(7), fsf-funding(7).
+@c man end
+@c man begin COPYRIGHT
+Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@c man end
+@end ignore
+@node Copying
+@c man begin DESCRIPTION
+@appendix GNU GENERAL PUBLIC LICENSE
+@center Version 2, June 1991
+
+@display
+Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@unnumberedsec Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software---to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+@iftex
+@unnumberedsec TERMS AND CONDITIONS FOR COPYING,@*DISTRIBUTION AND MODIFICATION
+@end iftex
+@ifnottex
+@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+@end ifnottex
+
+@enumerate 0
+@item
+This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The ``Program'', below,
+refers to any such program or work, and a ``work based on the Program''
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term ``modification''.) Each licensee is addressed as ``you''.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+@item
+You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+@item
+You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+@enumerate a
+@item
+You must cause the modified files to carry prominent notices
+stating that you changed the files and the date of any change.
+
+@item
+You must cause any work that you distribute or publish, that in
+whole or in part contains or is derived from the Program or any
+part thereof, to be licensed as a whole at no charge to all third
+parties under the terms of this License.
+
+@item
+If the modified program normally reads commands interactively
+when run, you must cause it, when started running for such
+interactive use in the most ordinary way, to print or display an
+announcement including an appropriate copyright notice and a
+notice that there is no warranty (or else, saying that you provide
+a warranty) and that users may redistribute the program under
+these conditions, and telling the user how to view a copy of this
+License. (Exception: if the Program itself is interactive but
+does not normally print such an announcement, your work based on
+the Program is not required to print an announcement.)
+@end enumerate
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+@item
+You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+@enumerate a
+@item
+Accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of Sections
+1 and 2 above on a medium customarily used for software interchange; or,
+
+@item
+Accompany it with a written offer, valid for at least three
+years, to give any third party, for a charge no more than your
+cost of physically performing source distribution, a complete
+machine-readable copy of the corresponding source code, to be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+@item
+Accompany it with the information you received as to the offer
+to distribute corresponding source code. (This alternative is
+allowed only for noncommercial distribution and only if you
+received the program in object code or executable form with such
+an offer, in accord with Subsection b above.)
+@end enumerate
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+@item
+You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+@item
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+@item
+Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+@item
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+@item
+If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+@item
+The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and ``any
+later version'', you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+@item
+If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+@iftex
+@heading NO WARRANTY
+@end iftex
+@ifnottex
+@center NO WARRANTY
+@end ifnottex
+
+@item
+BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+@item
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+@end enumerate
+
+@iftex
+@heading END OF TERMS AND CONDITIONS
+@end iftex
+@ifnottex
+@center END OF TERMS AND CONDITIONS
+@end ifnottex
+
+@page
+@unnumberedsec How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the ``copyright'' line and a pointer to where the full notice is found.
+
+@smallexample
+@var{one line to give the program's name and a brief idea of what it does.}
+Copyright (C) @var{year} @var{name of author}
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+@end smallexample
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+@smallexample
+Gnomovision version 69, Copyright (C) @var{year} @var{name of author}
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+@end smallexample
+
+The hypothetical commands @samp{show w} and @samp{show c} should show
+the appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than @samp{show w} and
+@samp{show c}; they could even be mouse-clicks or menu items---whatever
+suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a ``copyright disclaimer'' for the program, if
+necessary. Here is a sample; alter the names:
+
+@smallexample
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+`Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+@var{signature of Ty Coon}, 1 April 1989
+Ty Coon, President of Vice
+@end smallexample
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+@c man end
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/rbash.1 cvs/doc/rbash.1
--- bash-2.05b/doc/rbash.1 1999-11-29 22:30:03.000000000 +0100
+++ cvs/doc/rbash.1 2003-08-11 10:07:13.000000000 +0200
@@ -3,6 +3,6 @@
rbash \- restricted bash, see \fBbash\fR(1)
.SH RESTRICTED SHELL
.nr zY 1
-.so bash.1
+.so man1/bash.1
.SH SEE ALSO
bash(1)
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/doc/version.texi.in cvs/doc/version.texi.in
--- bash-2.05b/doc/version.texi.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/doc/version.texi.in 2003-04-08 05:28:49.000000000 +0200
@@ -0,0 +1,9 @@
+@c $Id: version.texi.in,v 1.4 2003/04/08 03:28:49 rockyb Exp $
+@c This file has version things that change periodically
+@c we use it so that we don't have to muck with the main texinfo file.
+
+@c The name of this bash debugger release: e.g. 2.05b-debugger-0.33
+@set VERSION @BASHVERS@
+@set BASHRELEASE @BASHVERS@-@RELSTATUS@
+@set UPDATED-MONTH April 2002
+@set EDITION @BASHVERS@ @RELSTATUS@
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/emacs/bashdb.el cvs/emacs/bashdb.el
--- bash-2.05b/emacs/bashdb.el 1970-01-01 01:00:00.000000000 +0100
+++ cvs/emacs/bashdb.el 2002-11-16 01:42:34.000000000 +0100
@@ -0,0 +1,176 @@
+;;; bashdb.el --- BASH Debugger mode via GUD and bashdb
+;;; $Id: bashdb.el,v 1.3 2002/11/16 00:42:34 masata-y Exp $
+
+;; Copyright (C) 2002 Rocky Bernstein (rocky@panix.com)
+;; and Masatake YAMATO (jet@gyve.org)
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;; Commentary:
+;; 1. Add
+;;
+;; (autoload 'bashdb "bashdb" "BASH Debugger mode via GUD and bashdb" t)
+;;
+;; to your .emacs file.
+;; 2. Do M-x bashdb
+
+;; Codes:
+(require 'gud)
+;; ======================================================================
+;; bashdb functions
+
+;;; History of argument lists passed to bashdb.
+(defvar gud-bashdb-history nil)
+
+;; Convert a command line as would be typed normally to run a script
+;; into one that invokes an Emacs-enabled debugging session.
+;; "--debugger" in inserted as the first switch.
+
+(defun gud-bashdb-massage-args (file args)
+ (let* ((new-args (list "--debugger"))
+ (seen-e nil)
+ (shift (lambda ()
+ (setq new-args (cons (car args) new-args))
+ (setq args (cdr args)))))
+
+ ;; Pass all switches and -e scripts through.
+ (while (and args
+ (string-match "^-" (car args))
+ (not (equal "-" (car args)))
+ (not (equal "--" (car args))))
+ (funcall shift))
+
+ (if (or (not args)
+ (string-match "^-" (car args)))
+ (error "Can't use stdin as the script to debug"))
+ ;; This is the program name.
+ (funcall shift)
+
+ (while args
+ (funcall shift))
+
+ (nreverse new-args)))
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(defun gud-bashdb-marker-filter (string)
+ (setq gud-marker-acc (concat gud-marker-acc string))
+ (let ((output ""))
+
+ ;; Process all the complete markers in this chunk.
+ ;; Format of line looks like this:
+ ;; (/etc/init.d/ntp.init:16):
+ ;; but we also allow DOS drive letters
+ ;; (d:/etc/init.d/ntp.init:16):
+ (while (string-match "\\(^\\|\n\\)(\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\)):.*\n"
+ gud-marker-acc)
+ (setq
+
+ ;; Extract the frame position from the marker.
+ gud-last-frame
+ (cons (substring gud-marker-acc (match-beginning 2) (match-end 2))
+ (string-to-int (substring gud-marker-acc
+ (match-beginning 4)
+ (match-end 4))))
+
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring gud-marker-acc 0 (match-beginning 0)))
+
+ ;; Set the accumulator to the remaining text.
+ gud-marker-acc (substring gud-marker-acc (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; gud-marker-acc until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "\032.*\\'" gud-marker-acc)
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring gud-marker-acc
+ 0 (match-beginning 0))))
+
+ ;; Everything after, we save, to combine with later input.
+ (setq gud-marker-acc
+ (substring gud-marker-acc (match-beginning 0))))
+
+ (setq output (concat output gud-marker-acc)
+ gud-marker-acc ""))
+
+ output))
+
+(defun gud-bashdb-find-file (f)
+ (save-excursion
+ (let ((buf (find-file-noselect f 'nowarn)))
+ (set-buffer buf)
+ buf)))
+
+(defcustom gud-bashdb-command-name "bash"
+ "File name for executing bash debugger."
+ :type 'string
+ :group 'gud)
+
+;;;###autoload
+(defun bashdb (command-line)
+ "Run bashdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive
+ (list (read-from-minibuffer "Run bashdb (like this): "
+ (if (consp gud-bashdb-history)
+ (car gud-bashdb-history)
+ (concat gud-bashdb-command-name
+ " "))
+ gud-minibuffer-local-map nil
+ '(gud-bashdb-history . 1))))
+
+ (gud-common-init command-line 'gud-bashdb-massage-args
+ 'gud-bashdb-marker-filter 'gud-bashdb-find-file)
+
+ (set (make-local-variable 'gud-minor-mode) 'bashdb)
+
+ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-tbreak "tbreak %l" "\C-t" "Set temporary breakpoint at current line.")
+ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
+ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
+ (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
+ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
+ (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
+ (gud-def gud-print "pe %e" "\C-p" "Evaluate bash expression at point.")
+
+ ;; Is this right?
+ (gud-def gud-statement "eval %e" "\C-e" "Execute Bash statement at point.")
+
+ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
+ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
+ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
+ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
+
+ (setq comint-prompt-regexp "^bashdb<+[0-9]*>+ ")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'bashdb-mode-hook)
+ )
+
+(provide 'bashdb)
+;;; bashdb.el ends here
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/emacs/gud.el.diff cvs/emacs/gud.el.diff
--- bash-2.05b/emacs/gud.el.diff 1970-01-01 01:00:00.000000000 +0100
+++ cvs/emacs/gud.el.diff 2002-11-11 22:44:49.000000000 +0100
@@ -0,0 +1,239 @@
+*** /home/src/build/emacs-21.2/lisp/gud.el Wed Feb 6 06:47:25 2002
+--- ./debugger/emacs/gud-new.el Mon Nov 11 15:58:41 2002
+***************
+*** 4,10 ****
+ ;; Maintainer: FSF
+ ;; Keywords: unix, tools
+
+! ;; Copyright (C) 1992, 93, 94, 95, 96, 1998, 2000 Free Software Foundation, Inc.
+
+ ;; This file is part of GNU Emacs.
+
+--- 4,10 ----
+ ;; Maintainer: FSF
+ ;; Keywords: unix, tools
+
+! ;; Copyright (C) 1992, 93, 94, 95, 96, 1998, 2000, 2002 Free Software Foundation, Inc.
+
+ ;; This file is part of GNU Emacs.
+
+***************
+*** 47,53 ****
+
+ (defgroup gud nil
+ "Grand Unified Debugger mode for gdb and other debuggers under Emacs.
+! Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), and jdb."
+ :group 'unix
+ :group 'tools)
+
+--- 47,53 ----
+
+ (defgroup gud nil
+ "Grand Unified Debugger mode for gdb and other debuggers under Emacs.
+! Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python), jdb, and bash."
+ :group 'unix
+ :group 'tools)
+
+***************
+*** 101,115 ****
+ '(([refresh] "Refresh" . gud-refresh)
+ ([remove] "Remove Breakpoint" . gud-remove)
+ ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak
+! :enable (memq gud-minor-mode '(gdb sdb xdb)))
+ ([break] "Set Breakpoint" . gud-break)
+ ([up] menu-item "Up Stack" gud-up
+! :enable (memq gud-minor-mode '(gdb dbx xdb)))
+ ([down] menu-item "Down Stack" gud-down
+! :enable (memq gud-minor-mode '(gdb dbx xdb)))
+ ([print] "Print Expression" . gud-print)
+ ([finish] menu-item "Finish Function" gud-finish
+! :enable (memq gud-minor-mode '(gdb xdb)))
+ ([stepi] "Step Instruction" . gud-stepi)
+ ([step] "Step Line" . gud-step)
+ ([next] "Next Line" . gud-next)
+--- 101,115 ----
+ '(([refresh] "Refresh" . gud-refresh)
+ ([remove] "Remove Breakpoint" . gud-remove)
+ ([tbreak] menu-item "Temporary Breakpoint" gud-tbreak
+! :enable (memq gud-minor-mode '(gdb sdb xdb bashdb)))
+ ([break] "Set Breakpoint" . gud-break)
+ ([up] menu-item "Up Stack" gud-up
+! :enable (memq gud-minor-mode '(gdb dbx xdb bashdb)))
+ ([down] menu-item "Down Stack" gud-down
+! :enable (memq gud-minor-mode '(gdb dbx xdb bashdb)))
+ ([print] "Print Expression" . gud-print)
+ ([finish] menu-item "Finish Function" gud-finish
+! :enable (memq gud-minor-mode '(gdb xdb bashdb)))
+ ([stepi] "Step Instruction" . gud-stepi)
+ ([step] "Step Line" . gud-step)
+ ([next] "Next Line" . gud-next)
+***************
+*** 1904,1909 ****
+--- 1904,2070 ----
+ (gud-jdb-build-source-files-list gud-jdb-directories "\\.java$")))))
+
+
++ ;; ======================================================================
++ ;;
++ ;; BASHDB support.
++ ;;
++ ;; AUTHOR: Rocky Bernstein <rocky@panix.com>
++ ;;
++ ;; CREATED: Sun Nov 10 10:46:38 2002 Rocky Bernstein.
++ ;;
++ ;; INVOCATION NOTES:
++ ;;
++ ;; You invoke bashdb-mode with:
++ ;;
++ ;; M-x bashdb <enter>
++ ;;
++ ;; It responds with:
++ ;;
++ ;; Run bashdb (like this): bash
++ ;;
++
++ ;;; History of argument lists passed to bashdb.
++ (defvar gud-bashdb-history nil)
++
++ ;; Convert a command line as would be typed normally to run a script
++ ;; into one that invokes an Emacs-enabled debugging session.
++ ;; "--debugger" in inserted as the first switch.
++
++ (defun gud-bashdb-massage-args (file args)
++ (let* ((new-args (list "--debugger"))
++ (seen-e nil)
++ (shift (lambda ()
++ (setq new-args (cons (car args) new-args))
++ (setq args (cdr args)))))
++
++ ;; Pass all switches and -e scripts through.
++ (while (and args
++ (string-match "^-" (car args))
++ (not (equal "-" (car args)))
++ (not (equal "--" (car args))))
++ (funcall shift))
++
++ (if (or (not args)
++ (string-match "^-" (car args)))
++ (error "Can't use stdin as the script to debug"))
++ ;; This is the program name.
++ (funcall shift)
++
++ (while args
++ (funcall shift))
++
++ (nreverse new-args)))
++
++ ;; There's no guarantee that Emacs will hand the filter the entire
++ ;; marker at once; it could be broken up across several strings. We
++ ;; might even receive a big chunk with several markers in it. If we
++ ;; receive a chunk of text which looks like it might contain the
++ ;; beginning of a marker, we save it here between calls to the
++ ;; filter.
++ (defun gud-bashdb-marker-filter (string)
++ (setq gud-marker-acc (concat gud-marker-acc string))
++ (let ((output ""))
++
++ ;; Process all the complete markers in this chunk.
++ ;; Format of line looks like this:
++ ;; (/etc/init.d/ntp.init:16):
++ ;; but we also allow DOS drive letters
++ ;; (d:/etc/init.d/ntp.init:16):
++ (while (string-match "\\(^\\|\n\\)(\\(\\([a-zA-Z]:\\)?[^:\n]*\\):\\([0-9]*\\)):.*\n"
++ gud-marker-acc)
++ (setq
++
++ ;; Extract the frame position from the marker.
++ gud-last-frame
++ (cons (substring gud-marker-acc (match-beginning 2) (match-end 2))
++ (string-to-int (substring gud-marker-acc
++ (match-beginning 4)
++ (match-end 4))))
++
++ ;; Append any text before the marker to the output we're going
++ ;; to return - we don't include the marker in this text.
++ output (concat output
++ (substring gud-marker-acc 0 (match-beginning 0)))
++
++ ;; Set the accumulator to the remaining text.
++ gud-marker-acc (substring gud-marker-acc (match-end 0))))
++
++ ;; Does the remaining text look like it might end with the
++ ;; beginning of another marker? If it does, then keep it in
++ ;; gud-marker-acc until we receive the rest of it. Since we
++ ;; know the full marker regexp above failed, it's pretty simple to
++ ;; test for marker starts.
++ (if (string-match "\032.*\\'" gud-marker-acc)
++ (progn
++ ;; Everything before the potential marker start can be output.
++ (setq output (concat output (substring gud-marker-acc
++ 0 (match-beginning 0))))
++
++ ;; Everything after, we save, to combine with later input.
++ (setq gud-marker-acc
++ (substring gud-marker-acc (match-beginning 0))))
++
++ (setq output (concat output gud-marker-acc)
++ gud-marker-acc ""))
++
++ output))
++
++ (defun gud-bashdb-find-file (f)
++ (save-excursion
++ (let ((buf (find-file-noselect f 'nowarn)))
++ (set-buffer buf)
++ buf)))
++
++ (defcustom gud-bashdb-command-name "bash"
++ "File name for executing bash debugger."
++ :type 'string
++ :group 'gud)
++
++ ;;;###autoload
++ (defun bashdb (command-line)
++ "Run bashdb on program FILE in buffer *gud-FILE*.
++ The directory containing FILE becomes the initial working directory
++ and source-file directory for your debugger."
++ (interactive
++ (list (read-from-minibuffer "Run bashdb (like this): "
++ (if (consp gud-bashdb-history)
++ (car gud-bashdb-history)
++ (concat gud-bashdb-command-name
++ " "))
++ nil nil
++ '(gud-bashdb-history . 1))))
++
++ (gud-common-init command-line 'gud-bashdb-massage-args
++ 'gud-bashdb-marker-filter 'gud-bashdb-find-file)
++
++ (set (make-local-variable 'gud-minor-mode) 'bashdb)
++
++ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
++ (gud-def gud-tbreak "tbreak %l" "\C-t" "Set temporary breakpoint at current line.")
++ (gud-def gud-remove "clear %l" "\C-d" "Remove breakpoint at current line")
++ (gud-def gud-step "step" "\C-s" "Step one source line with display.")
++ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
++ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
++ (gud-def gud-finish "finish" "\C-f" "Finish executing current function.")
++ (gud-def gud-up "up %p" "<" "Up N stack frames (numeric arg).")
++ (gud-def gud-down "down %p" ">" "Down N stack frames (numeric arg).")
++ (gud-def gud-print "pe %e" "\C-p" "Evaluate bash expression at point.")
++
++ ;; Is this right?
++ (gud-def gud-statement "eval %e" "\C-e" "Execute Python statement at point.")
++
++ (local-set-key [menu-bar debug tbreak] '("Temporary Breakpoint" . gud-tbreak))
++ (local-set-key [menu-bar debug finish] '("Finish Function" . gud-finish))
++ (local-set-key [menu-bar debug up] '("Up Stack" . gud-up))
++ (local-set-key [menu-bar debug down] '("Down Stack" . gud-down))
++
++ (setq comint-prompt-regexp "^bashdb<+[0-9]*>+ ")
++ (setq paragraph-start comint-prompt-regexp)
++ (run-hooks 'bashdb-mode-hook)
++ )
++
++ (provide 'bashdb)
++
+ ;;
+ ;; End of debugger-specific information
+ ;;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/error.c cvs/error.c
--- bash-2.05b/error.c 2002-06-21 23:56:41.000000000 +0200
+++ cvs/error.c 2002-09-14 03:38:05.000000000 +0200
@@ -20,6 +20,7 @@
#include "config.h"
#include "bashtypes.h"
+#include "shell.h"
#include <fcntl.h>
#if defined (HAVE_UNISTD_H)
@@ -94,8 +95,16 @@
char *name;
name = (char *)NULL;
- if (interactive_shell == 0)
- name = dollar_vars[0];
+ if (interactive_shell == 0) {
+ SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
+ ARRAY *bash_source_a;
+
+ if (bash_source_var != NULL) {
+ bash_source_a = array_cell (bash_source_var);
+ name = array_reference(bash_source_a, 0);
+ } else
+ name = dollar_vars[0];
+ }
if (name == 0 && shell_name && *shell_name)
name = base_pathname (shell_name);
if (name == 0)
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/examples/bashdb/README cvs/examples/bashdb/README
--- bash-2.05b/examples/bashdb/README 1970-01-01 01:00:00.000000000 +0100
+++ cvs/examples/bashdb/README 2002-11-26 13:20:52.000000000 +0100
@@ -0,0 +1,10 @@
+The code here predates the current debugger effort. If you are
+looking, say, for skeleton code how a debugger might work, or a
+somewhat simple script to do simple kinds of debugging, then the
+script in this directory might be helpful. However if you are looking
+for a full-featured debugger, see the collection of files in the
+debugger directory.
+
+Rocky
+
+$Id: README,v 1.1 2002/11/26 12:20:52 rockyb Exp $
Only in bash-2.05b/examples/bashdb: bashdb.el
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/examples/scripts.noah/prompt.bash cvs/examples/scripts.noah/prompt.bash
--- bash-2.05b/examples/scripts.noah/prompt.bash 1995-05-25 22:17:08.000000000 +0200
+++ cvs/examples/scripts.noah/prompt.bash 2002-08-20 17:16:06.000000000 +0200
@@ -3,7 +3,7 @@
# Created: 1992-01-15
# Public domain
-# $Id: prompt.bash,v 1.2 1994/10/18 16:34:35 friedman Exp $
+# $Id: prompt.bash,v 1.1.1.1 2002/08/20 15:16:06 rocky Exp $
# Commentary:
# Code:
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/execute_cmd.c cvs/execute_cmd.c
--- bash-2.05b/execute_cmd.c 2002-03-18 19:24:22.000000000 +0100
+++ cvs/execute_cmd.c 2003-08-11 10:06:11.000000000 +0200
@@ -1,6 +1,6 @@
/* execute_command.c -- Execute a COMMAND structure. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -94,6 +94,10 @@
# include "bashhist.h"
#endif
+/* How many subshells are we nested down in. Attached to BASH_SUBSHEL
+ dynamic variable. Sort of like SHLVL. */
+int subshell_level=0;
+
extern int posixly_correct;
extern int breaking, continuing, loop_level;
extern int expand_aliases;
@@ -196,6 +200,14 @@
`test' needs this, for example. */
char *this_command_name;
+/* Same as the_printed_command but we don't set if the command is a
+ trap statement. (If you wanted that value the handler could get it
+ directly from "trap -p".) A debugger, signal handler or diagnostic
+ information gatherer can use this to know with more granularity
+ where in a given line the program is.
+*/
+char *the_printed_command_sans_trap;
+
static COMMAND *currently_executing_command;
struct stat SB; /* used for debugging */
@@ -278,27 +290,40 @@
}
}
+
+/* Sort of a big hack: 1 if we are running debug to show the line containing
+ the function name. This is used in executing_line_number to report
+ the right line number.
+*/
+static int showing_function_line=0;
+
/* Return the line number of the currently executing command. */
int
executing_line_number ()
{
- if (executing && (variable_context == 0 || interactive_shell == 0) && currently_executing_command)
+ if (executing && !showing_function_line
+ && (variable_context == 0 || interactive_shell == 0)
+ && currently_executing_command)
{
- if (currently_executing_command->type == cm_simple)
- return currently_executing_command->value.Simple->line;
- else if (currently_executing_command->type == cm_cond)
+ /* rocky: I think all of these tests can/should go and we just
+ return the line number... */
+#if defined (COND_COMMAND)
+ if (currently_executing_command->type == cm_cond)
return currently_executing_command->value.Cond->line;
+#endif
+#if defined (DPAREN_ARITHMETIC)
else if (currently_executing_command->type == cm_arith)
return currently_executing_command->value.Arith->line;
+#endif
+#if defined (ARITH_FOR_COMMAND)
else if (currently_executing_command->type == cm_arith_for)
return currently_executing_command->value.ArithFor->line;
+#endif
else
return line_number;
- }
- else if (running_trap)
- return trap_line_number;
- else
+ } else {
return line_number;
+ }
}
/* Execute the command passed in COMMAND. COMMAND is exactly what
@@ -475,7 +500,7 @@
run_pending_traps ();
- if (running_trap == 0)
+ /* if (running_trap == 0) */
currently_executing_command = command;
invert = (command->flags & CMD_INVERT_RETURN) != 0;
@@ -505,11 +530,12 @@
control and call execute_command () on the command again. */
paren_pid = make_child (savestring (make_command_string (command)),
asynchronous);
- if (paren_pid == 0)
- exit (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close));
+ if (paren_pid == 0) {
+ int rc=execute_in_subshell (command, asynchronous, pipe_in, pipe_out,
+ fds_to_close);
+ exit(rc);
/* NOTREACHED */
- else
- {
+ } else {
close_pipes (pipe_in, pipe_out);
#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
@@ -544,7 +570,6 @@
DESCRIBE_PID (paren_pid);
run_pending_traps ();
-
return (EXECUTION_SUCCESS);
}
}
@@ -616,6 +641,8 @@
{
case cm_simple:
{
+ int save_line_number = line_number;
+
/* We can't rely on this variable retaining its value across a
call to execute_simple_command if a longjmp occurs as the
result of a `return' builtin. This is true for sure with gcc. */
@@ -626,10 +653,14 @@
command->value.Simple->flags |= CMD_IGNORE_RETURN;
if (command->flags & CMD_STDIN_REDIR)
command->value.Simple->flags |= CMD_STDIN_REDIR;
+
+ line_number = command->value.Simple->line;
exec_result =
execute_simple_command (command->value.Simple, pipe_in, pipe_out,
asynchronous, fds_to_close);
+ line_number = save_line_number;
+
/* The temporary environment should be used for only the simple
command immediately following its definition. */
dispose_used_env_vars ();
@@ -798,7 +829,11 @@
case cm_cond:
if (ignore_return)
command->value.Cond->flags |= CMD_IGNORE_RETURN;
- exec_result = execute_cond_command (command->value.Cond);
+ {
+ int line_number_save = line_number;
+ exec_result = execute_cond_command (command->value.Cond);
+ line_number = line_number_save;
+ }
break;
#endif
@@ -1120,6 +1155,7 @@
int ois;
COMMAND *tcom;
+ subshell_level++;
USE_VAR(user_subshell);
USE_VAR(invert);
USE_VAR(tcom);
@@ -1270,6 +1306,8 @@
return_code = run_exit_trap ();
}
+ subshell_level--;
+
return (return_code);
/* NOTREACHED */
}
@@ -1523,6 +1561,8 @@
SHELL_VAR *v;
char *identifier;
int retval;
+ int line_number_save = line_number;
+
#if 0
SHELL_VAR *old_value = (SHELL_VAR *)NULL; /* Remember the old value of x. */
#endif
@@ -1560,17 +1600,38 @@
for (retval = EXECUTION_SUCCESS; list; list = list->next)
{
QUIT;
+
+ line_number = for_command->line;
+
+ /* Remember what this command line looks like at invocation. */
+ command_string_index = 0;
+ print_for_command_head (for_command);
+ if (echo_command_at_execute)
+ xtrace_print_for_command_head (for_command);
+
+ /* Save the command unless it was a trap command. */
+ if ( this_command_name == NULL
+ || strcmp(this_command_name, "trap") != 0) {
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
+ }
+
+ /* Run the debug trap before each running this command. */
+ if (0 != run_debug_trap ()) continue;
+
this_command_name = (char *)NULL;
v = bind_variable (identifier, list->word->word);
if (readonly_p (v) || noassign_p (v))
{
if (readonly_p (v) && interactive_shell == 0 && posixly_correct)
{
+ line_number = line_number_save;
last_command_exit_value = EXECUTION_FAILURE;
jump_to_top_level (FORCE_EOF);
}
else
{
+ line_number = line_number_save;
run_unwind_frame ("for");
loop_level--;
return (EXECUTION_FAILURE);
@@ -1595,6 +1656,8 @@
}
loop_level--;
+ line_number = line_number_save;
+
#if 0
if (lexical_scoping)
@@ -1647,9 +1710,15 @@
if (echo_command_at_execute)
xtrace_print_arith_cmd (new);
this_command_name = "(("; /* )) for expression error messages */
- if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0)
- run_debug_trap ();
- expresult = evalexp (new->word->word, okp);
+
+ command_string_index = 0;
+ print_arith_command (new);
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
+
+ /* Run the debug after we have update recorded the command above. */
+ if (0 == run_debug_trap ())
+ expresult = evalexp (new->word->word, okp);
dispose_words (new);
}
else
@@ -1666,7 +1735,8 @@
ARITH_FOR_COM *arith_for_command;
{
intmax_t expresult;
- int expok, body_status, arith_lineno, save_lineno;
+ int expok, body_status, arith_lineno;
+ int line_number_save = line_number;
body_status = EXECUTION_SUCCESS;
loop_level++;
@@ -1680,21 +1750,22 @@
line_number before executing each expression -- for $LINENO
and the DEBUG trap. */
arith_lineno = arith_for_command->line;
- if (variable_context && interactive_shell)
- line_number = arith_lineno -= function_line_number;
+ line_number = arith_lineno;
+
/* Evaluate the initialization expression. */
expresult = eval_arith_for_expr (arith_for_command->init, &expok);
- if (expok == 0)
+ if (expok == 0) {
+ line_number = line_number_save;
return (EXECUTION_FAILURE);
+ }
while (1)
{
/* Evaluate the test expression. */
- save_lineno = line_number;
line_number = arith_lineno;
expresult = eval_arith_for_expr (arith_for_command->test, &expok);
- line_number = save_lineno;
+ line_number = line_number_save;
if (expok == 0)
{
@@ -1725,10 +1796,9 @@
}
/* Evaluate the step expression. */
- save_lineno = line_number;
line_number = arith_lineno;
expresult = eval_arith_for_expr (arith_for_command->step, &expok);
- line_number = save_lineno;
+ line_number = line_number_save;
if (expok == 0)
{
@@ -1738,6 +1808,7 @@
}
loop_level--;
+ line_number_save = line_number;
return (body_status);
}
#endif
@@ -1923,10 +1994,30 @@
SHELL_VAR *v;
char *identifier, *ps3_prompt, *selection;
int retval, list_len, show_menu;
+ int line_number_save = line_number;
if (check_identifier (select_command->name, 1) == 0)
return (EXECUTION_FAILURE);
+ line_number = select_command->line;
+
+ /* Remember what this command line looks like at invocation. */
+ command_string_index = 0;
+ print_select_command_head (select_command);
+ if (echo_command_at_execute)
+ xtrace_print_select_command_head (select_command);
+
+ /* Save the command unless it was a trap command. */
+ if ( this_command_name == NULL
+ || strcmp(this_command_name, "trap") != 0) {
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
+ }
+
+ /* Run the debug trap before running this command. */
+ if (0 != run_debug_trap ())
+ return (EXECUTION_SUCCESS);
+
loop_level++;
identifier = select_command->name->word;
@@ -1938,6 +2029,7 @@
{
if (list)
dispose_words (list);
+ line_number = line_number_save;
return (EXECUTION_SUCCESS);
}
@@ -1952,6 +2044,7 @@
while (1)
{
+ line_number = select_command->line;
ps3_prompt = get_string_value ("PS3");
if (ps3_prompt == 0)
ps3_prompt = "#? ";
@@ -1978,6 +2071,7 @@
else
{
run_unwind_frame ("select");
+ line_number = line_number_save;
return (EXECUTION_FAILURE);
}
}
@@ -2009,6 +2103,7 @@
}
loop_level--;
+ line_number = line_number_save;
run_unwind_frame ("select");
return (retval);
@@ -2028,7 +2123,28 @@
PATTERN_LIST *clauses;
char *word, *pattern;
int retval, match, ignore_return;
+ int save_line_number = line_number;
+
+ line_number = case_command->line;
+ /* Remember what this command line looks like at invocation. */
+ command_string_index = 0;
+ print_case_command_head (case_command);
+ if (echo_command_at_execute)
+ xtrace_print_case_command_head (case_command);
+
+ /* Save the command unless it was a trap command. */
+ if ( this_command_name == NULL
+ || strcmp(this_command_name, "trap") != 0) {
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
+ }
+
+ if (0 != run_debug_trap ()) {
+ line_number = save_line_number;
+ return EXECUTION_SUCCESS;
+ }
+
/* Posix.2 specifies that the WORD is tilde expanded. */
if (member ('~', case_command->word->word))
{
@@ -2096,6 +2212,7 @@
exit_case_command:
free (word);
discard_unwind_frame ("case");
+ line_number = save_line_number;
return (retval);
}
@@ -2192,9 +2309,11 @@
IF_COM *if_command;
{
int return_value;
+ int save_line_number=line_number;
if_command->test->flags |= CMD_IGNORE_RETURN;
return_value = execute_command (if_command->test);
+ line_number=save_line_number;
if (return_value == EXECUTION_SUCCESS)
{
@@ -2223,22 +2342,27 @@
{
int expok;
intmax_t expresult;
- WORD_LIST *new;
+ int line_number_save = line_number;
+ WORD_LIST *new = expand_words (arith_command->exp);;
expresult = 0;
this_command_name = "(("; /* )) */
- /* If we're in a function, update the line number information. */
- if (variable_context && interactive_shell)
- line_number = arith_command->line - function_line_number;
+ line_number = arith_command->line;
+
+ command_string_index = 0;
+ print_arith_command (new);
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
/* Run the debug trap before each arithmetic command, but do it after we
update the line number information and before we expand the various
words in the expression. */
- if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0)
- run_debug_trap ();
-
- new = expand_words (arith_command->exp);
+ if (0 != run_debug_trap ()) {
+ line_number = line_number_save;
+ return EXECUTION_SUCCESS;
+ }
+
/* If we're tracing, make a new word list with `((' at the front and `))'
at the back and print it. */
@@ -2246,9 +2370,10 @@
xtrace_print_arith_cmd (new);
expresult = evalexp (new->word->word, &expok);
+ line_number = line_number_save;
dispose_words (new);
- if (expok == 0)
+ if (expok == 0)
return (EXECUTION_FAILURE);
return (expresult == 0 ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
@@ -2335,23 +2460,31 @@
COND_COM *cond_command;
{
int result;
+ int line_number_save = line_number;
result = EXECUTION_SUCCESS;
this_command_name = "[[";
- /* If we're in a function, update the line number information. */
- if (variable_context && interactive_shell)
- line_number = cond_command->line - function_line_number;
+
+ /* Update the line number information and record what's going to
+ get run. */
+ line_number = cond_command->line;
+ command_string_index = 0;
+ print_cond_command (cond_command);
+
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
/* Run the debug trap before each conditional command, but do it after we
- update the line number information. */
- if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0)
- run_debug_trap ();
+ update the line number information and have recorded the command. */
+ if (0 == run_debug_trap ()) {
#if 0
- debug_print_cond_command (cond_command);
+ debug_print_cond_command (cond_command);
#endif
- last_command_exit_value = result = execute_cond_node (cond_command);
+ last_command_exit_value = result = execute_cond_node (cond_command);
+ }
+ line_number = line_number_save;
return (result);
}
#endif /* COND_COMMAND */
@@ -2469,19 +2602,22 @@
special_builtin_failed = builtin_is_special = 0;
command_line = (char *)0;
- /* If we're in a function, update the line number information. */
- if (variable_context && interactive_shell)
- line_number = simple_command->line - function_line_number;
-
- /* Run the debug trap before each simple command, but do it after we
- update the line number information. */
- if (signal_is_trapped (DEBUG_TRAP) && signal_is_ignored (DEBUG_TRAP) == 0)
- run_debug_trap ();
-
/* Remember what this command line looks like at invocation. */
command_string_index = 0;
print_simple_command (simple_command);
+ /* Save the command unless it was a trap command. */
+ if ( this_command_name == NULL || strcmp(this_command_name, "trap") != 0) {
+ FREE (the_printed_command_sans_trap);
+ the_printed_command_sans_trap = savestring(the_printed_command);
+ }
+
+ /* Run the debug trap before each simple command, but do it after we
+ update the line number information. */
+ if (0 != run_debug_trap ()) {
+ return EXECUTION_SUCCESS;
+ }
+
first_word_quoted =
simple_command->words ? (simple_command->words->word->flags & W_QUOTED): 0;
@@ -2581,7 +2717,7 @@
begin_unwind_frame ("simple-command");
if (echo_command_at_execute)
- xtrace_print_word_list (words);
+ xtrace_print_word_list (words, 1);
builtin = (sh_builtin_func_t *)NULL;
func = (SHELL_VAR *)NULL;
@@ -2690,10 +2826,12 @@
setup_async_signals ();
}
+ subshell_level++;
execute_subshell_builtin_or_function
(words, simple_command->redirects, builtin, func,
pipe_in, pipe_out, async, fds_to_close,
simple_command->flags);
+ subshell_level--;
}
else
{
@@ -2822,6 +2960,12 @@
add_unwind_protect (merge_temporary_env, (char *)NULL);
}
+ /* FIXME: THIS IS A TEST TO SEE ABOUT SETTING TRAP ON A BUILTIN */
+#if FIXME
+ if (TRAP_STRING(DEBUG_TRAP) && trace_p(???var_for_fn???))
+ run_debug_trap ();
+#endif
+
result = ((*builtin) (words->next));
/* This shouldn't happen, but in case `return' comes back instead of
@@ -2851,8 +2995,17 @@
{
int return_val, result;
COMMAND *tc, *fc;
- char *debug_trap, *error_trap;
+ char *debug_trap, *error_trap, *return_trap;
+ static int function_nesting_level=0;
+ SHELL_VAR *funcname_var = find_variable ("FUNCNAME");
+ ARRAY *funcname_a = array_cell (funcname_var);
+ SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
+ ARRAY *bash_source_a = array_cell (bash_source_var);
+ SHELL_VAR *bash_lineno_var = find_variable ("BASH_LINENO");
+ ARRAY *bash_lineno_a = array_cell (bash_lineno_var);
+ char *source_file = "";
+
USE_VAR(fc);
tc = (COMMAND *)copy_command (function_cell (var));
@@ -2879,14 +3032,19 @@
this_shell_function = var;
make_funcname_visible (1);
- debug_trap = TRAP_STRING(DEBUG_TRAP);
- error_trap = TRAP_STRING(ERROR_TRAP);
+ /*
+
+ Reset debug, error and return trap handlers. Set up to
+ restore them on return.
+
+ The order of the unwind protects for debug_trap, error_trap and
+ return_trap is important here! unwind-protect commands are run
+ in reverse order of registration. If this causes problems, take
+ out the xfree unwind-protect calls and live with the small memory
+ leak. */
- /* The order of the unwind protects for debug_trap and error_trap is
- important here! unwind-protect commands are run in reverse order
- of registration. If this causes problems, take out the xfree
- unwind-protect calls and live with the small memory leak. */
- if (debug_trap && (trace_p (var) == 0))
+ debug_trap = TRAP_STRING(DEBUG_TRAP);
+ if (debug_trap && ((trace_p (var) == 0) && !function_trace_mode))
{
if (subshell == 0)
{
@@ -2897,7 +3055,9 @@
restore_default_signal (DEBUG_TRAP);
}
- if (error_trap)
+
+ error_trap = TRAP_STRING(ERROR_TRAP);
+ if (error_trap && !error_trace_mode)
{
if (subshell == 0)
{
@@ -2908,14 +3068,41 @@
restore_default_signal (ERROR_TRAP);
}
+ return_trap = TRAP_STRING(RETURN_TRAP);
+ if (return_trap)
+ {
+ if (subshell == 0)
+ {
+ return_trap = savestring (return_trap);
+ add_unwind_protect (xfree, return_trap);
+ add_unwind_protect (set_return_trap, return_trap);
+ }
+ restore_default_signal (RETURN_TRAP);
+ }
+
+ /* Save source file name and function name in BASH_SOURCE and
+ FUNCNAME arrays. */
+ {
+ FUNCTION_DEF *shell_fn = find_function_def(this_shell_function->name);
+
+ if (NULL != shell_fn)
+ source_file = shell_fn->source_file;
+
+ function_nesting_level++;
+ array_shift_element(bash_source_a, savestring(source_file));
+ array_shift_element(bash_lineno_a, itos(executing_line_number ()));
+ array_shift_element(funcname_a, savestring(this_shell_function->name));
+
+ }
+
/* The temporary environment for a function is supposed to apply to
all commands executed within the function body. */
remember_args (words->next, 1);
-
+ push_args (words->next);
+
/* Number of the line on which the function body starts. */
- if (interactive_shell)
- line_number = function_line_number = tc->line;
+ line_number = function_line_number = tc->line;
if (subshell)
{
@@ -2935,12 +3122,32 @@
if (return_val)
result = return_catch_value;
- else
- result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close);
+ else {
+ /* Showing function_line is a hack that I'd like to get rid of.
+ Without it, executing_line_number may gets its line from
+ "currently_executing_command" rather than line_number set above.
+ */
+ showing_function_line=1;
+ if (0 == run_debug_trap ()) {
+ showing_function_line=0;
+ result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE,
+ fds_to_close);
+ run_return_trap ();
+ }
+ showing_function_line=0;
+ }
+
+ pop_args();
if (subshell == 0)
run_unwind_frame ("function_calling");
+ array_dispose_element(array_unshift_element(bash_source_a));
+ array_dispose_element(array_unshift_element(bash_lineno_a));
+ array_dispose_element(array_unshift_element(funcname_a));
+
+ function_nesting_level--;
+
if (variable_context == 0 || this_shell_function == 0)
make_funcname_visible (0);
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/externs.h cvs/externs.h
--- bash-2.05b/externs.h 2002-03-27 20:52:29.000000000 +0100
+++ cvs/externs.h 2002-12-09 14:16:42.000000000 +0100
@@ -32,12 +32,21 @@
/* Functions from print_cmd.c. */
extern char *make_command_string __P((COMMAND *));
extern void print_command __P((COMMAND *));
+extern void print_cond_command __P((COND_COM *));
extern void print_simple_command __P((SIMPLE_COM *));
extern char *named_function_string __P((char *, COMMAND *, int));
extern void print_word_list __P((WORD_LIST *, char *));
extern char *indirection_level_string __P((void));
-extern void xtrace_print_word_list __P((WORD_LIST *));
+extern void xtrace_print_word_list __P((WORD_LIST *, int));
+extern void print_for_command_head __P((FOR_COM *));
+extern void xtrace_print_for_command_head __P((FOR_COM *));
+extern void print_case_command_head __P((CASE_COM *));
+extern void xtrace_print_case_command_head __P((CASE_COM *));
+#if defined (SELECT_COMMAND)
+extern void print_select_command_head __P((SELECT_COM *));
+#endif
#if defined (DPAREN_ARITHMETIC)
+extern void print_arith_command __P((WORD_LIST *));
extern void xtrace_print_arith_cmd __P((WORD_LIST *));
#endif
#if defined (COND_COMMAND)
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/flags.c cvs/flags.c
--- bash-2.05b/flags.c 2002-04-08 19:28:47.000000000 +0200
+++ cvs/flags.c 2002-11-06 04:43:05.000000000 +0100
@@ -111,6 +111,14 @@
/* */
/* **************************************************************** */
+/* Non-zero means TRAP DEBUG should preserve the trap through
+ a function call. */
+int function_trace_mode = 0;
+
+/* Non-zero means TRAP ERROR should preserve the trap through
+ a function call. */
+int error_trace_mode = 0;
+
#if 0
/* Non-zero means do lexical scoping in the body of a FOR command. */
int lexical_scoping = 0;
@@ -163,7 +171,9 @@
#if defined (JOB_CONTROL)
{ 'b', &asynchronous_notification },
#endif /* JOB_CONTROL */
+ { 'd', &function_trace_mode },
{ 'e', &exit_immediately_on_error },
+ { 'E', &error_trace_mode },
{ 'f', &disallow_filename_globbing },
{ 'h', &hashing_enabled },
{ 'i', &forced_interactive },
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/flags.h cvs/flags.h
--- bash-2.05b/flags.h 2002-04-08 19:28:51.000000000 +0200
+++ cvs/flags.h 2002-11-06 04:43:05.000000000 +0100
@@ -46,7 +46,9 @@
just_one_command, unbound_vars_is_error, echo_input_at_read,
echo_command_at_execute, no_invisible_vars, noclobber,
hashing_enabled, forced_interactive, privileged_mode,
- asynchronous_notification, interactive_comments, no_symbolic_links;
+ asynchronous_notification, interactive_comments, no_symbolic_links,
+ function_trace_mode, /* run "trap fn ... DEBUG" through function calls? */
+ error_trace_mode; /* run "trap fn ... ERROR" through function calls? */
#if 0
extern int lexical_scoping;
Binary files bash-2.05b/htdocs/bashdb-break.png and cvs/htdocs/bashdb-break.png differ
Binary files bash-2.05b/htdocs/bashdb-ddd.png and cvs/htdocs/bashdb-ddd.png differ
Binary files bash-2.05b/htdocs/bashdb-where.png and cvs/htdocs/bashdb-where.png differ
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/htdocs/index.html cvs/htdocs/index.html
--- bash-2.05b/htdocs/index.html 1970-01-01 01:00:00.000000000 +0100
+++ cvs/htdocs/index.html 2002-12-08 06:58:48.000000000 +0100
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<HTML>
+<HEAD>
+ <TITLE>
+ BASH with Debugger and Improved Debug Support and Error Handling
+ </TITLE>
+ <LINK REV="made"HREF="mailto:rocky@panix.com">
+ <META NAME="keywords" CONTENT="bash">
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000"
+VLINK="#9900DD">
+
+<H3>
+BASH with Debugger and Improved Debug Support and Error Handling
+</H3>
+<P>
+<HR>
+<P>
+The Bash Debugger Project contains patched sources to BASH that enable
+better debugging support as well as improved error reporting. In
+addition, this project contains the most comprehensive source-code
+debugger for bash that has been written.
+
+<p>Since this project maintains as an open CVS development and
+encourages developers and ideas, the space could be also be used
+springboard for other experiments and additions to BASH.
+If you are interesting in contributing to this project, please contact
+<a href=mailto:rocky@panix.com>rocky@panix.com</a>.
+
+<p>However, if you are looking for the plain vanilla BASH, try <a
+href=http://www.gnu.org/software/bash>here.</a>
+
+<center>
+<table WIDTH="80%" BORDER=0 CELLPADDING=10 CELLSPACING=0>
+
+ <tr>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b><a HREF="http://bashdb.sourceforge.net/bashdb.html">
+ BASHDB Documentation</a></b></font></th>
+ <td><p>
+ Debugger documentation online.
+ </td>
+
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b><a HREF="http://bashdb.sourceforge.net/bashref.html">
+ BASH Documentation</a></b></font></th>
+ <td><p>
+ Documentation including changes to support debugging
+ </td>
+
+ </tr>
+ <tr>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b>
+ Screenshot 1
+ <a HREF="http://bashdb.sourceforge.net/bashdb-break.png">[breakpoint]</a>
+ </b></font></th>
+ <td><p>
+ A screenshot of bashdb in Emacs
+ </td>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b>
+ Screenshot 2
+ <a HREF="http://bashdb.sourceforge.net/bashdb-where.png">[backtrace]</a>
+ </b></font></th>
+ <td><p>
+ Another screenshot of bashdb in Emacs
+ </td>
+ </tr>
+
+ <tr>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b><a
+ HREF="http://prdownloads.sourceforge.net/bashdb/?sort_by=date&sort=desc"
+ NAME="TOCdownload"> Download</a></b></font></th>
+ <td ><p>
+ Get the latest version here.
+ </td>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b>
+ Screenshot 3
+ <a HREF="http://bashdb.sourceforge.net/bashdb-ddd.png">[ddd]</a>
+ </b></font></th>
+ <td><p>
+ A screenshot of bashdb under DDD
+ </td>
+
+ </tr>
+
+ <tr>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b>
+ <a HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/bashdb/bashdb">
+ CVS</a></b></font></th>
+ <td><p>
+ Browse the CVS Tree
+ </td
+ </TR>
+
+ <tr>
+ <th ALIGN=RIGHT VALIGN=TOP>
+ <font SIZE="+1"><b>
+ <a HREF="http://sourceforge.net/projects/bashdb">
+ Sourceforge</a></b></font></th>
+ <td><p>
+ The <code>sourceforge.net</code> project page.
+ </td>
+
+ </tr>
+<!----------------------------
+ <TR>
+ <TH ALIGN=RIGHT VALIGN=TOP>
+ <FONT SIZE="+1"><B><A HREF="changelog.html">
+ What's New</A></B></FONT></TH>
+ <TD><P>
+ See what has changed since the last release.
+ </TD>
+ </TR>
+ <TR>
+ <TH ALIGN=RIGHT VALIGN=TOP>
+ <FONT SIZE="+1"><B><A HREF="bugs.html">
+ Reporting Bugs</A></B></FONT></TH>
+ <TD><P>
+ If you encounter a bug, let me know. This document
+ explains the kind of information that will be most helpful to me.
+ The more information you give me, the easier it will be for me
+ to fix the bug.
+ </TD>
+ </TR>
+------------------------------>
+
+</table>
+</center>
+
+<p><hr><p>
+
+<a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=61395" width="88" height="31" border="0" alt="SourceForge Logo"></a>
+
+<p>
+<i>$Id: index.html,v 1.13 2002/12/08 05:58:48 rockyb Exp $</i>
+</body><P>
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/include/shmbutil.h cvs/include/shmbutil.h
--- bash-2.05b/include/shmbutil.h 2002-05-06 19:58:39.000000000 +0200
+++ cvs/include/shmbutil.h 2003-08-11 10:08:00.000000000 +0200
@@ -30,7 +30,7 @@
/* For platforms which support the ISO C amendement 1 functionality we
support user defined character classes. */
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
+#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined(HAVE_WCWIDTH)
# include <wchar.h>
# include <wctype.h>
# if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
@@ -120,6 +120,8 @@
state = state_bak; \
(_i)++; \
} \
+ else if (mblength == 0) \
+ (_i)++; \
else \
(_i) += mblength; \
} \
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/jobs.c cvs/jobs.c
--- bash-2.05b/jobs.c 2002-05-09 17:56:20.000000000 +0200
+++ cvs/jobs.c 2002-08-25 23:42:06.000000000 +0200
@@ -2753,7 +2753,7 @@
for (i = 0; i < nchild; i++)
{
interrupt_immediately = 1;
- parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST);
+ parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST, 1);
}
run_unwind_frame ("SIGCHLD trap");
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/bind.c cvs/lib/readline/bind.c
--- bash-2.05b/lib/readline/bind.c 2002-01-24 17:15:52.000000000 +0100
+++ cvs/lib/readline/bind.c 2002-12-07 04:51:32.000000000 +0100
@@ -311,7 +311,7 @@
mapped to something, `abc' to be mapped to something else,
and the function bound to `a' to be executed when the user
types `abx', leaving `bx' in the input queue. */
- if (k.function /* && k.type == ISFUNC */)
+ if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
{
map[ANYOTHERKEY] = k;
k.function = 0;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/display.c cvs/lib/readline/display.c
--- bash-2.05b/lib/readline/display.c 2002-06-04 16:54:47.000000000 +0200
+++ cvs/lib/readline/display.c 2003-06-06 07:02:18.000000000 +0200
@@ -70,7 +70,7 @@
static void cr PARAMS((void));
#if defined (HANDLE_MULTIBYTE)
-static int _rl_col_width PARAMS((char *, int, int));
+static int _rl_col_width PARAMS((const char *, int, int));
static int *_rl_wrapped_line;
#else
# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s))
@@ -1348,9 +1348,9 @@
{
_rl_output_some_chars (nfd + lendiff, temp - lendiff);
#if 0
- _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff;
-#else
_rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff);
+#else
+ _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff);
#endif
}
}
@@ -1510,8 +1510,15 @@
#if defined (HANDLE_MULTIBYTE)
/* If we have multibyte characters, NEW is indexed by the buffer point in
a multibyte string, but _rl_last_c_pos is the display position. In
- this case, NEW's display position is not obvious. */
- if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return;
+ this case, NEW's display position is not obvious and must be
+ calculated. */
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ {
+ if (_rl_last_c_pos == new)
+ return;
+ }
+ else if (_rl_last_c_pos == _rl_col_width (data, 0, new))
+ return;
#else
if (_rl_last_c_pos == new) return;
#endif
@@ -1594,11 +1601,7 @@
#endif
{
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- tputs (_rl_term_cr, 1, _rl_output_character_function);
- for (i = 0; i < new; i++)
- putc (data[i], rl_outstream);
- }
+ _rl_backspace (_rl_last_c_pos - _rl_col_width (data, 0, new));
else
_rl_backspace (_rl_last_c_pos - new);
}
@@ -2117,7 +2120,7 @@
scan from the beginning of the string to take the state into account. */
static int
_rl_col_width (str, start, end)
- char *str;
+ const char *str;
int start, end;
{
wchar_t wc;
@@ -2193,4 +2196,3 @@
return width;
}
#endif /* HANDLE_MULTIBYTE */
-
Only in bash-2.05b/lib/readline/doc: Makefile
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/examples/Makefile cvs/lib/readline/examples/Makefile
--- bash-2.05b/lib/readline/examples/Makefile 2001-11-20 21:16:23.000000000 +0100
+++ cvs/lib/readline/examples/Makefile 2003-05-24 22:10:25.000000000 +0200
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
-EXECUTABLES = fileman rltest rl
+EXECUTABLES = fileman rltest rl histexamp
CFLAGS = -g -I../.. -I.. -DREADLINE_LIBRARY
LDFLAGS = -g -L..
@@ -38,6 +38,9 @@
rlcat: rlcat.o
$(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline -ltermcap
+histexamp: histexamp.o
+ $(CC) $(LDFLAGS) -o $@ histexamp.o -lreadline -ltermcap
+
fileman.o: fileman.c
rltest.o: rltest.c
rl.o: rl.c
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/examples/histexamp.c cvs/lib/readline/examples/histexamp.c
--- bash-2.05b/lib/readline/examples/histexamp.c 2002-04-16 22:52:36.000000000 +0200
+++ cvs/lib/readline/examples/histexamp.c 2003-05-24 22:10:25.000000000 +0200
@@ -31,6 +31,7 @@
char **argv;
{
char line[1024], *t;
+
int len, done = 0;
line[0] = 0;
@@ -86,8 +87,18 @@
the_list = history_list ();
if (the_list)
- for (i = 0; the_list[i]; i++)
- printf ("%d: %s\n", i + history_base, the_list[i]->line);
+ for (i = 0; the_list[i]; i++) {
+ char time_str[100];
+ time_t t = history_get_time(the_list[i]);
+
+ if (t != 0)
+ strftime(time_str, 100, "%a %R", localtime(&t));
+ else
+ strcpy(time_str, "??");
+
+ printf ("%d %s: %s\n", i + history_base, time_str,
+ the_list[i]->line);
+ }
}
else if (strncmp (line, "delete", 6) == 0)
{
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/histfile.c cvs/lib/readline/histfile.c
--- bash-2.05b/lib/readline/histfile.c 2002-03-26 15:00:26.000000000 +0100
+++ cvs/lib/readline/histfile.c 2003-09-08 08:40:52.000000000 +0200
@@ -156,6 +156,7 @@
int file, current_line, chars_read;
struct stat finfo;
size_t file_size;
+ char *last_timestamp_str = NULL;
buffer = (char *)NULL;
input = history_filename (filename);
@@ -217,12 +218,17 @@
current_line = 0;
/* Skip lines until we are at FROM. */
- for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
- if (*line_end == '\n')
- {
- current_line++;
- line_start = line_end + 1;
- }
+ for (line_start = line_end = buffer;
+ line_end < bufend && current_line < from; line_end++)
+ {
+ if (*line_end == '\n')
+ {
+ char *p = line_end + 1;
+ if (!is_history_timestamp(p))
+ current_line++;
+ line_start = p;
+ }
+ }
/* If there are lines left to gobble, then gobble them now. */
for (line_end = line_start; line_end < bufend; line_end++)
@@ -230,8 +236,18 @@
{
*line_end = '\0';
- if (*line_start)
- add_history (line_start);
+ if (*line_start) {
+ if (!is_history_timestamp(line_start)) {
+ add_history (line_start);
+ if (NULL != last_timestamp_str) {
+ add_history_time(last_timestamp_str);
+ last_timestamp_str = NULL;
+ }
+ } else {
+ last_timestamp_str = line_start;
+ current_line--;
+ }
+ }
current_line++;
@@ -240,6 +256,7 @@
line_start = line_end + 1;
}
+
FREE (input);
#ifndef HAVE_MMAP
@@ -260,6 +277,7 @@
int lines;
{
char *buffer, *filename, *bp;
+ char *bp1; /* bp+1 */
int file, chars_read, rv;
struct stat finfo;
size_t file_size;
@@ -322,11 +340,15 @@
}
/* Count backwards from the end of buffer until we have passed
- LINES lines. */
- for (bp = buffer + chars_read - 1; lines && bp > buffer; bp--)
+ LINES lines. bp1 is set funny initially. But since bp+1 can't
+ be a comment character (since it's off the end) and bp isn't
+ both \n and history_comment_char it's okay initially - I guess.
+ */
+ for (bp1 = bp = buffer + chars_read - 1; lines && bp > buffer; bp--)
{
- if (*bp == '\n')
+ if (*bp == '\n' && !is_history_timestamp(bp1))
lines--;
+ bp1=bp;
}
/* If this is the first line, then the file contains exactly the
@@ -334,12 +356,14 @@
anything. It's the first line if we don't find a newline between
the current value of i and 0. Otherwise, write from the start of
this line until the end of the buffer. */
- for ( ; bp > buffer; bp--)
- if (*bp == '\n')
+ for ( ; bp > buffer; bp--) {
+ if (*bp == '\n' && !is_history_timestamp(bp1))
{
bp++;
break;
}
+ bp1=bp;
+ }
/* Write only if there are more lines in the file than we want to
truncate to. */
@@ -407,8 +431,10 @@
the_history = history_list ();
/* Calculate the total number of bytes to write. */
- for (buffer_size = 0, i = history_length - nelements; i < history_length; i++)
- buffer_size += 1 + strlen (the_history[i]->line);
+ for (buffer_size = 0, i = history_length - nelements;
+ i < history_length; i++)
+ buffer_size += 2 + strlen (the_history[i]->line)
+ + strlen(the_history[i]->timestamp);
/* Allocate the buffer, and fill it. */
#ifdef HAVE_MMAP
@@ -436,6 +462,9 @@
for (j = 0, i = history_length - nelements; i < history_length; i++)
{
+ strcpy (buffer + j, the_history[i]->timestamp);
+ j += strlen (the_history[i]->timestamp);
+ buffer[j++] = '\n';
strcpy (buffer + j, the_history[i]->line);
j += strlen (the_history[i]->line);
buffer[j++] = '\n';
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/history.c cvs/lib/readline/history.c
--- bash-2.05b/lib/readline/history.c 2002-03-12 17:27:34.000000000 +0100
+++ cvs/lib/readline/history.c 2003-09-08 08:40:53.000000000 +0200
@@ -83,6 +83,18 @@
/* The logical `base' of the history array. It defaults to 1. */
int history_base = 1;
+static void
+free_history_entry(HIST_ENTRY **the_history)
+{
+ if (*the_history) {
+ free ((*the_history)->line);
+ free ((*the_history)->timestamp);
+ free (*the_history);
+ *the_history=NULL;
+ }
+}
+
+
/* Return the current HISTORY_STATE of the history. */
HISTORY_STATE *
history_get_history_state ()
@@ -123,14 +135,16 @@
}
/* Return the number of bytes that the primary history entries are using.
- This just adds up the lengths of the_history->lines. */
+ This just adds up the lengths of the_history->lines and
+ the_history->timestamps. */
int
history_total_bytes ()
{
register int i, result;
for (i = result = 0; the_history && the_history[i]; i++)
- result += strlen (the_history[i]->line);
+ result += strlen (the_history[i]->line)
+ + strlen(the_history[i]->timestamp);
return (result);
}
@@ -164,6 +178,38 @@
return (the_history);
}
+/* Return 1 if timestamp_str is in the format of a valid timestamp line and
+ 0 otherwise.
+ A timestamp line is a history_comment_char followed by a nonzero nu
+*/
+int
+is_history_timestamp (const char * timestamp_str)
+{
+ if (history_comment_char != timestamp_str[0])
+ return 0;
+ else {
+ const char *t = timestamp_str+1;
+ char *endptr;
+ long int val=strtol(t, &endptr, 10);
+ return val != 0 && timestamp_str != '\0'
+ && ((*endptr == '\0') || (*endptr == '\n'));
+ }
+}
+
+/*
+ Return the time assocated with the history entry or 0 if something
+ went wrong.
+ */
+time_t
+history_get_time (HIST_ENTRY *hist_entry)
+{
+ char *timestamp_str;
+ if (NULL == hist_entry || NULL == hist_entry->timestamp) return 0;
+ timestamp_str = hist_entry->timestamp;
+ if (history_comment_char != timestamp_str[0]) return 0;
+ return atol(++timestamp_str);
+}
+
/* Return the history entry at the current position, as determined by
history_offset. If there is no entry there, return a NULL pointer. */
HIST_ENTRY *
@@ -224,11 +270,7 @@
return;
/* If there is something in the slot, then remove it. */
- if (the_history[0])
- {
- free (the_history[0]->line);
- free (the_history[0]);
- }
+ free_history_entry(&the_history[0]);
/* Copy the rest of the entries, moving down one slot. */
for (i = 0; i < history_length; i++)
@@ -259,11 +301,29 @@
temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
temp->line = savestring (string);
temp->data = (char *)NULL;
+ {
+ time_t t = time(NULL);
+ char time_str[80];
+ sprintf(time_str, "X%lu", (unsigned long) t);
+ temp->timestamp = savestring (time_str);
+ temp->timestamp[0]=history_comment_char;
+ }
the_history[history_length] = (HIST_ENTRY *)NULL;
the_history[history_length - 1] = temp;
}
+/* Change the top history timestamp at the end of the history list to
+ STRING.
+*/
+void
+add_history_time (string)
+ const char *string;
+{
+ unsigned int len=strlen(the_history[history_length - 1]->timestamp);
+ strncpy(the_history[history_length - 1]->timestamp, string, len);
+}
+
/* Make the history entry at WHICH have LINE and DATA. This returns
the old entry so you can dispose of the data. In the case of an
invalid WHICH, a NULL pointer is returned. */
@@ -283,6 +343,7 @@
temp->line = savestring (line);
temp->data = data;
+ temp->timestamp = old_value->timestamp;
the_history[which] = temp;
return (old_value);
@@ -327,10 +388,7 @@
{
/* This loses because we cannot free the data. */
for (i = 0, j = history_length - max; i < j; i++)
- {
- free (the_history[i]->line);
- free (the_history[i]);
- }
+ free_history_entry(&the_history[i]);
history_base = i;
for (j = 0, i = history_length - max; j < max; i++, j++)
@@ -371,11 +429,7 @@
/* This loses because we cannot free the data. */
for (i = 0; i < history_length; i++)
- {
- free (the_history[i]->line);
- free (the_history[i]);
- the_history[i] = (HIST_ENTRY *)NULL;
- }
+ free_history_entry(&the_history[i]);
history_offset = history_length = 0;
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/history.h cvs/lib/readline/history.h
--- bash-2.05b/lib/readline/history.h 2001-08-22 15:37:23.000000000 +0200
+++ cvs/lib/readline/history.h 2003-09-08 08:40:53.000000000 +0200
@@ -26,6 +26,7 @@
extern "C" {
#endif
+#include <time.h>
#if defined READLINE_LIBRARY
# include "rlstdc.h"
# include "rltypedefs.h"
@@ -44,6 +45,7 @@
typedef struct _hist_entry {
char *line;
histdata_t data;
+ char *timestamp;
} HIST_ENTRY;
/* A structure used to pass the current state of the history stuff around. */
@@ -72,10 +74,20 @@
/* Manage the history list. */
+/* Return 1 if timestamp_str is in the format of a valid timestamp and
+ 0 otherwise.
+*/
+extern int is_history_timestamp (const char * timestamp_str);
+
/* Place STRING at the end of the history list.
The associated data field (if any) is set to NULL. */
extern void add_history PARAMS((const char *));
+/* Change the top history timestamp at the end of the history list to
+ STRING.
+*/
+extern void add_history_time PARAMS((const char *));
+
/* A reasonably useless function, only here for completeness. WHICH
is the magic number that tells us which element to delete. The
elements are numbered from 0. */
@@ -119,6 +131,10 @@
array. OFFSET is relative to history_base. */
extern HIST_ENTRY *history_get PARAMS((int));
+/* Return the history entry which is logically at OFFSET in the history
+ array. OFFSET is relative to history_base. */
+extern time_t history_get_time PARAMS((HIST_ENTRY *hist_entry));
+
/* Return the number of bytes that the primary history entries are using.
This just adds up the lengths of the_history->lines. */
extern int history_total_bytes PARAMS((void));
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/mbutil.c cvs/lib/readline/mbutil.c
--- bash-2.05b/lib/readline/mbutil.c 2002-06-04 17:54:29.000000000 +0200
+++ cvs/lib/readline/mbutil.c 2003-06-06 07:02:18.000000000 +0200
@@ -205,14 +205,16 @@
if (tmp == (size_t)(-2))
{
/* shorted to compose multibyte char */
- memset (ps, 0, sizeof(mbstate_t));
+ if (ps)
+ memset (ps, 0, sizeof(mbstate_t));
return -2;
}
else if (tmp == (size_t)(-1))
{
/* invalid to compose multibyte char */
/* initialize the conversion state */
- memset (ps, 0, sizeof(mbstate_t));
+ if (ps)
+ memset (ps, 0, sizeof(mbstate_t));
return -1;
}
else if (tmp == (size_t)0)
@@ -225,9 +227,12 @@
return 1. Otherwise return 0. */
int
_rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
- char *buf1, *buf2;
- mbstate_t *ps1, *ps2;
- int pos1, pos2;
+ char *buf1;
+ int pos1;
+ mbstate_t *ps1;
+ char *buf2;
+ int pos2;
+ mbstate_t *ps2;
{
int i, w1, w2;
@@ -276,8 +281,11 @@
pos++;
/* clear the state of the byte sequence, because
in this case effect of mbstate is undefined */
- memset (ps, 0, sizeof (mbstate_t));
+ if (ps)
+ memset (ps, 0, sizeof (mbstate_t));
}
+ else if (tmp == 0)
+ pos++;
else
pos += tmp;
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/nls.c cvs/lib/readline/nls.c
--- bash-2.05b/lib/readline/nls.c 2001-10-15 20:32:29.000000000 +0200
+++ cvs/lib/readline/nls.c 2003-08-11 10:08:16.000000000 +0200
@@ -87,7 +87,8 @@
char *t;
/* Set the LC_CTYPE locale category from environment variables. */
- t = setlocale (LC_CTYPE, "");
+ // t = setlocale (LC_CTYPE, "");
+ t = setlocale (LC_CTYPE, NULL);
if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
{
_rl_meta_flag = 1;
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/readline.c cvs/lib/readline/readline.c
--- bash-2.05b/lib/readline/readline.c 2002-03-13 23:10:46.000000000 +0100
+++ cvs/lib/readline/readline.c 2002-12-07 04:51:32.000000000 +0100
@@ -684,6 +684,7 @@
}
#if defined (VI_MODE)
if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/rlmbutil.h cvs/lib/readline/rlmbutil.h
--- bash-2.05b/lib/readline/rlmbutil.h 2001-12-20 15:54:38.000000000 +0100
+++ cvs/lib/readline/rlmbutil.h 2003-06-06 06:01:43.000000000 +0200
@@ -32,7 +32,7 @@
/* For platforms which support the ISO C amendement 1 functionality we
support user defined character classes. */
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
-#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
+#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined(HAVE_WCWIDTH)
# include <wchar.h>
# include <wctype.h>
# if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/readline/vi_mode.c cvs/lib/readline/vi_mode.c
--- bash-2.05b/lib/readline/vi_mode.c 2002-05-23 19:27:58.000000000 +0200
+++ cvs/lib/readline/vi_mode.c 2003-06-06 07:02:18.000000000 +0200
@@ -680,7 +680,8 @@
int count;
{
wchar_t wc;
- char mb[MB_LEN_MAX];
+ char mb[MB_LEN_MAX+1];
+ int mblen;
mbstate_t ps;
memset (&ps, 0, sizeof (mbstate_t));
@@ -703,7 +704,9 @@
/* Vi is kind of strange here. */
if (wc)
{
- wctomb (mb, wc);
+ mblen = wctomb (mb, wc);
+ if (mblen >= 0)
+ mb[mblen] = '\0';
rl_begin_undo_group ();
rl_delete (1, 0);
rl_insert_text (mb);
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/sh/inet_aton.c cvs/lib/sh/inet_aton.c
--- bash-2.05b/lib/sh/inet_aton.c 2001-10-15 18:04:50.000000000 +0200
+++ cvs/lib/sh/inet_aton.c 2002-08-20 17:16:06.000000000 +0200
@@ -57,7 +57,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id: inet_addr.c,v 1.5 1996/08/14 03:48:37 drepper Exp $";
+static char rcsid[] = "$Id: inet_aton.c,v 1.1.1.1 2002/08/20 15:16:06 rocky Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/lib/termcap/grot/texinfo.tex cvs/lib/termcap/grot/texinfo.tex
--- bash-2.05b/lib/termcap/grot/texinfo.tex 1995-08-03 01:11:07.000000000 +0200
+++ cvs/lib/termcap/grot/texinfo.tex 2002-08-20 17:16:06.000000000 +0200
@@ -34,7 +34,7 @@
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision: 2.146 $
+\deftexinfoversion$Revision: 1.1.1.1 $
\message{Loading texinfo package [Version \texinfoversion]:}
% If in a .fmt file, print the version number
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/make_cmd.c cvs/make_cmd.c
--- bash-2.05b/make_cmd.c 2002-05-06 19:37:02.000000000 +0200
+++ cvs/make_cmd.c 2002-09-12 12:44:32.000000000 +0200
@@ -61,7 +61,7 @@
#define WDCACHESIZE 60
#define WLCACHESIZE 60
-static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *));
+static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int));
#if defined (ARITH_FOR_COMMAND)
static WORD_LIST *make_arith_for_expr __P((char *));
#endif
@@ -199,7 +199,7 @@
}
static COMMAND *
-make_for_or_select (type, name, map_list, action)
+make_for_or_select (type, name, map_list, action, line_number)
enum command_type type;
WORD_DESC *name;
WORD_LIST *map_list;
@@ -209,6 +209,7 @@
temp = (FOR_COM *)xmalloc (sizeof (FOR_COM));
temp->flags = 0;
+ temp->line = line_number;
temp->name = name;
temp->map_list = map_list;
temp->action = action;
@@ -216,22 +217,23 @@
}
COMMAND *
-make_for_command (name, map_list, action)
+make_for_command (name, map_list, action, line_number)
WORD_DESC *name;
WORD_LIST *map_list;
COMMAND *action;
{
- return (make_for_or_select (cm_for, name, map_list, action));
+ return (make_for_or_select (cm_for, name, map_list, action, line_number));
}
COMMAND *
-make_select_command (name, map_list, action)
+make_select_command (name, map_list, action, line_number)
WORD_DESC *name;
WORD_LIST *map_list;
COMMAND *action;
+ int line_number;
{
#if defined (SELECT_COMMAND)
- return (make_for_or_select (cm_select, name, map_list, action));
+ return (make_for_or_select (cm_select, name, map_list, action, line_number));
#else
last_command_exit_value = 2;
return ((COMMAND *)NULL);
@@ -337,7 +339,7 @@
}
COMMAND *
-make_case_command (word, clauses)
+make_case_command (word, clauses, case_line_number)
WORD_DESC *word;
PATTERN_LIST *clauses;
{
@@ -345,6 +347,7 @@
temp = (CASE_COM *)xmalloc (sizeof (CASE_COM));
temp->flags = 0;
+ temp->line = case_line_number;
temp->word = word;
temp->clauses = REVERSE_LIST (clauses, PATTERN_LIST *);
return (make_command (cm_case, (SIMPLE_COM *)temp));
@@ -732,6 +735,29 @@
temp->line = lineno;
temp->flags = 0;
command->line = lstart;
+
+ /* Save source file name in BASH_SOURCE array. */
+ {
+ SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
+ ARRAY *bash_source_a;
+
+ temp->source_file = NULL;
+ /* Could be NULL if we define a function in a "here" doc? */
+ if (NULL != bash_source_var)
+ {
+ bash_source_a = array_cell (bash_source_var);
+ /* We could be in a profile definition in which case we
+ don't have a source_file listed. Or it could be something's
+ wrong.
+ */
+ if (bash_source_a -> num_elements > 0) {
+ temp->source_file=savestring(array_reference(bash_source_a, 0));
+ }
+ }
+ if (NULL == temp->source_file)
+ temp->source_file=savestring("");
+ }
+ bind_function_def(name->word, temp);
return (make_command (cm_function_def, (SIMPLE_COM *)temp));
}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/make_cmd.h cvs/make_cmd.h
--- bash-2.05b/make_cmd.h 2002-02-28 18:16:38.000000000 +0100
+++ cvs/make_cmd.h 2002-09-12 12:44:32.000000000 +0200
@@ -36,9 +36,9 @@
extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *));
extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int));
-extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *));
+extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
extern COMMAND *make_group_command __P((COMMAND *));
-extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *));
+extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *, int));
extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *));
extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *));
extern COMMAND *make_while_command __P((COMMAND *, COMMAND *));
@@ -52,7 +52,7 @@
extern COMMAND *make_arith_command __P((WORD_LIST *));
-extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *));
+extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
#if defined (COND_COMMAND)
extern COND_COM *make_cond_node __P((int, WORD_DESC *, COND_COM *, COND_COM *));
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/parse.y cvs/parse.y
--- bash-2.05b/parse.y 2002-05-21 17:57:30.000000000 +0200
+++ cvs/parse.y 2003-08-11 10:06:15.000000000 +0200
@@ -270,6 +270,24 @@
/* The line number in a script at which an arithmetic for command starts. */
static int arith_for_lineno;
+/* The line number in a script at which a word of a "case WORD" or
+ "select WORD" starts. */
+#define MAX_CASE 100
+static int word_lineno[MAX_CASE];
+static int word_top=-1;
+
+#define push_line_number \
+ if (word_top < MAX_CASE) word_top++; \
+ word_lineno[word_top] = line_number;
+
+#define pop_line_number \
+ if (word_top > 0) word_top--;
+
+
+
+/* The globally known line number. */
+int line_number = 0;
+
static REDIRECTEE redir;
%}
@@ -547,9 +565,35 @@
;
simple_command: simple_command_element
- { $$ = make_simple_command ($1, (COMMAND *)NULL); }
+ {
+ if ($1.word && $1.word->flags & W_ASSIGNMENT ) {
+ /* Use line number where of '=' token, not the
+ end of the parsed assignment command.
+ */
+ int save_line_number = line_number;
+ line_number = word_lineno[word_top];
+ $$ = make_simple_command ($1, (COMMAND *)NULL);
+ line_number = save_line_number;
+ pop_line_number;
+ } else
+ $$ = make_simple_command ($1, (COMMAND *)NULL);
+ }
+
+
| simple_command simple_command_element
- { $$ = make_simple_command ($2, $1); }
+ {
+ if ($2.word && $2.word->flags & W_ASSIGNMENT ) {
+ /* Use line number where of '=' token, not the
+ end of the parsed assignment command.
+ */
+ int save_line_number = line_number;
+ line_number = word_lineno[word_top];
+ $$ = make_simple_command ($2, $1);
+ line_number = save_line_number;
+ pop_line_number;
+ } else
+ $$ = make_simple_command ($2, $1);
+ }
;
command: simple_command
@@ -601,65 +645,104 @@
;
for_command: FOR WORD newline_list DO compound_list DONE
- { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5); }
+ { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ pop_line_number;
+ }
| FOR WORD newline_list '{' compound_list '}'
- { $$ = make_for_command ($2, add_string_to_list ("$@", (WORD_LIST *)NULL), $5); }
+ { $$ = make_for_command ($2, add_string_to_list ("$@", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ pop_line_number;
+ }
| FOR WORD ';' newline_list DO compound_list DONE
- { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6); }
+ { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ pop_line_number;
+ }
| FOR WORD ';' newline_list '{' compound_list '}'
- { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6); }
+ { $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ pop_line_number;
+ }
| FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE
- { $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9); }
+ { $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ pop_line_number;
+}
| FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}'
- { $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9); }
+ { $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ pop_line_number;
+}
| FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE
- { $$ = make_for_command ($2, (WORD_LIST *)NULL, $8); }
+ { $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]);
+ pop_line_number;
+ }
| FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}'
- { $$ = make_for_command ($2, (WORD_LIST *)NULL, $8); }
+ { $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]);
+ pop_line_number;
+ }
;
arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE
- { $$ = make_arith_for_command ($2, $6, arith_for_lineno); }
+ { $$ = make_arith_for_command ($2, $6, arith_for_lineno);
+ pop_line_number;
+ }
| FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}'
- { $$ = make_arith_for_command ($2, $6, arith_for_lineno); }
+ { $$ = make_arith_for_command ($2, $6, arith_for_lineno);
+ pop_line_number;
+ }
| FOR ARITH_FOR_EXPRS DO compound_list DONE
- { $$ = make_arith_for_command ($2, $4, arith_for_lineno); }
+ { $$ = make_arith_for_command ($2, $4, arith_for_lineno);
+ pop_line_number;
+ }
| FOR ARITH_FOR_EXPRS '{' compound_list '}'
- { $$ = make_arith_for_command ($2, $4, arith_for_lineno); }
+ { $$ = make_arith_for_command ($2, $4, arith_for_lineno);
+ pop_line_number;
+ }
;
select_command: SELECT WORD newline_list DO list DONE
{
- $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5);
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ pop_line_number;
}
| SELECT WORD newline_list '{' list '}'
{
- $$ = make_select_command ($2, add_string_to_list ("$@", (WORD_LIST *)NULL), $5);
+ $$ = make_select_command ($2, add_string_to_list ("$@", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ pop_line_number;
}
| SELECT WORD ';' newline_list DO list DONE
{
- $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6);
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ pop_line_number;
}
| SELECT WORD ';' newline_list '{' list '}'
{
- $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6);
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ pop_line_number;
}
| SELECT WORD newline_list IN word_list list_terminator newline_list DO list DONE
{
- $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9);
+ $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ pop_line_number;
}
| SELECT WORD newline_list IN word_list list_terminator newline_list '{' list '}'
{
- $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9);
+ $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ pop_line_number;
}
;
case_command: CASE WORD newline_list IN newline_list ESAC
- { $$ = make_case_command ($2, (PATTERN_LIST *)NULL); }
+ {
+ $$ = make_case_command ($2, (PATTERN_LIST *)NULL, word_lineno[word_top]);
+ pop_line_number;
+ }
| CASE WORD newline_list IN case_clause_sequence newline_list ESAC
- { $$ = make_case_command ($2, $5); }
+ {
+ $$ = make_case_command ($2, $5, word_lineno[word_top]);
+ pop_line_number;
+ }
| CASE WORD newline_list IN case_clause ESAC
- { $$ = make_case_command ($2, $5); }
+ {
+ $$ = make_case_command ($2, $5, word_lineno[word_top]);
+ pop_line_number;
+ }
;
function_def: WORD '(' ')' newline_list function_body
@@ -1269,9 +1352,6 @@
#endif /* BUFFERED_INPUT */
} STREAM_SAVER;
-/* The globally known line number. */
-int line_number = 0;
-
#if defined (COND_COMMAND)
static int cond_lineno;
static int cond_token;
@@ -1586,8 +1666,11 @@
else if (c == '\\' && remove_quoted_newline)
{
peekc = yy_getc ();
- if (peekc == '\n')
- continue; /* Make the unquoted \<newline> pair disappear. */
+ if (peekc == '\n')
+ {
+ line_number++;
+ continue; /* Make the unquoted \<newline> pair disappear. */
+ }
else
{
yy_ungetc (peekc);
@@ -2028,7 +2111,7 @@
if (last_lastarg)
last_lastarg = savestring (last_lastarg);
- parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST);
+ parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST, 0);
last_shell_builtin = temp_last;
this_shell_builtin = temp_this;
@@ -3098,6 +3181,10 @@
t[i] = '='; t[i+1] = '\0';
r = assignment (t);
t[i] = c; t[i+1] = c1;
+ /* The line number for an assignment statement is the line number
+ of the left-hand side, i.e. the line number in effect now.
+ Save this for can use when the enclosing statement is made. */
+ push_line_number;
return r;
}
@@ -3133,7 +3220,7 @@
/* DOLLAR_PRESENT becomes non-zero if we see a `$'. */
int dollar_present;
- /* QUOTED becomes non-zero if we see one of ("), ('), (`), or (\). */
+ /* QUOTED becomes non-zero if we see one of ("), ('), (`), or (\). " */
int quoted;
/* Non-zero means to ignore the value of the next character, and just
@@ -3503,12 +3590,20 @@
result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT))
? ASSIGNMENT_WORD : WORD;
- if (last_read_token == FUNCTION)
+ switch (last_read_token)
{
+ case FUNCTION:
parser_state |= PST_ALLOWOPNBRC;
function_dstart = line_number;
+ break;
+ case SELECT:
+ case CASE:
+ case FOR:
+ push_line_number;
+ break;
}
+
return (result);
}
@@ -4524,7 +4619,7 @@
static void
set_line_mbstate ()
{
- int i, previ, len;
+ int i, previ, len, c;
mbstate_t mbs, prevs;
size_t mbclen;
@@ -4539,7 +4634,8 @@
{
mbs = prevs;
- if (shell_input_line[i] == EOF)
+ c = shell_input_line[i];
+ if (c == EOF)
{
int j;
for (j = i; j < len; j++)
@@ -4563,7 +4659,11 @@
}
else
{
- /* mbrlen doesn't return any other values */
+ /* XXX - what to do if mbrlen returns 0? (null wide character) */
+ int j;
+ for (j = i; j < len; j++)
+ shell_input_line_property[j] = 1;
+ break;
}
shell_input_line_property[i] = mbclen;
Only in bash-2.05b: parser-built
Only in bash-2.05b: pathnames.h
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/pathnames.h.in cvs/pathnames.h.in
--- bash-2.05b/pathnames.h.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/pathnames.h.in 2002-08-23 06:17:00.000000000 +0200
@@ -0,0 +1,33 @@
+/* pathnames.h -- absolute filenames that bash wants for various defaults. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ Bash is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+ License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+
+#if !defined (_PATHNAMES_H_)
+#define _PATHNAMES_H_
+
+/* The default file for hostname completion. */
+#define DEFAULT_HOSTS_FILE "/etc/hosts"
+
+/* The default login shell startup file. */
+#define SYS_PROFILE "/etc/profile"
+
+/* Location of top-level debugger script. */
+#define DEBUGGER_START_FILE "@DEBUGGER_START_FILE@"
+
+#endif /* _PATHNAMES_H */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/print_cmd.c cvs/print_cmd.c
--- bash-2.05b/print_cmd.c 2002-03-12 20:39:30.000000000 +0100
+++ cvs/print_cmd.c 2003-02-13 21:22:09.000000000 +0100
@@ -79,6 +79,9 @@
static void print_arith_for_command __P((ARITH_FOR_COM *));
#endif
#if defined (SELECT_COMMAND)
+void print_select_command_head __P((SELECT_COM *));
+void xtrace_print_select_command_head __P((SELECT_COM *));
+static void print_select_command __P((SELECT_COM *));
static void print_select_command __P((SELECT_COM *));
#endif
static void print_group_command __P((GROUP_COM *));
@@ -87,12 +90,9 @@
static void print_until_command __P((WHILE_COM *));
static void print_until_or_while __P((WHILE_COM *, char *));
static void print_if_command __P((IF_COM *));
-#if defined (DPAREN_ARITHMETIC)
-static void print_arith_command __P((ARITH_COM *));
-#endif
#if defined (COND_COMMAND)
static void print_cond_node __P((COND_COM *));
-static void print_cond_command __P((COND_COM *));
+void print_cond_command __P((COND_COM *));
#endif
static void print_function_def __P((FUNCTION_DEF *));
@@ -197,7 +197,7 @@
#if defined (DPAREN_ARITHMETIC)
case cm_arith:
- print_arith_command (command->value.Arith);
+ print_arith_command (command->value.Arith->exp);
break;
#endif
@@ -348,13 +348,16 @@
/* A function to print the words of a simple command when set -x is on. */
void
-xtrace_print_word_list (list)
+xtrace_print_word_list (list, show_indirection_level)
WORD_LIST *list;
+ int show_indirection_level;
+
{
WORD_LIST *w;
char *t, *x;
- fprintf (stderr, "%s", indirection_level_string ());
+ if (show_indirection_level)
+ fprintf (stderr, "%s", indirection_level_string ());
for (w = list; w; w = w->next)
{
t = w->word->word;
@@ -386,12 +389,28 @@
_print_word_list (list, separator, cprintf);
}
-static void
-print_for_command (for_command)
+void
+print_for_command_head (for_command)
FOR_COM *for_command;
{
cprintf ("for %s in ", for_command->name->word);
command_print_word_list (for_command->map_list, " ");
+}
+
+void
+xtrace_print_for_command_head (for_command)
+ FOR_COM *for_command;
+{
+ fprintf (stderr, "%s", indirection_level_string ());
+ fprintf (stderr, "for %s in ", for_command->name->word);
+ xtrace_print_word_list (for_command->map_list, 0);
+}
+
+static void
+print_for_command (for_command)
+ FOR_COM *for_command;
+{
+ print_for_command_head(for_command);
cprintf (";");
newline ("do\n");
indentation += indentation_amount;
@@ -423,13 +442,28 @@
#endif /* ARITH_FOR_COMMAND */
#if defined (SELECT_COMMAND)
-static void
-print_select_command (select_command)
+void
+print_select_command_head (select_command)
SELECT_COM *select_command;
{
cprintf ("select %s in ", select_command->name->word);
command_print_word_list (select_command->map_list, " ");
- cprintf (";");
+}
+
+void
+xtrace_print_select_command_head (select_command)
+ SELECT_COM *select_command;
+{
+ fprintf (stderr, "%s", indirection_level_string ());
+ fprintf (stderr, "select %s in ", select_command->name->word);
+ xtrace_print_word_list (select_command->map_list, 0);
+}
+
+static void
+print_select_command (select_command)
+ SELECT_COM *select_command;
+{
+ print_select_command_head(select_command);
newline ("do\n");
indentation += indentation_amount;
make_command_string_internal (select_command->action);
@@ -476,11 +510,27 @@
group_command_nesting--;
}
+void
+print_case_command_head (case_command)
+ CASE_COM *case_command;
+{
+ cprintf ("case %s in ", case_command->word->word);
+}
+
+void
+xtrace_print_case_command_head (case_command)
+ CASE_COM *case_command;
+{
+ fprintf (stderr, "%s", indirection_level_string ());
+ fprintf (stderr, "case %s in ", case_command->word->word);
+ fprintf (stderr, "\n");
+}
+
static void
print_case_command (case_command)
CASE_COM *case_command;
{
- cprintf ("case %s in ", case_command->word->word);
+ print_case_command_head(case_command);
if (case_command->clauses)
print_case_clauses (case_command->clauses);
newline ("esac");
@@ -562,12 +612,12 @@
}
#if defined (DPAREN_ARITHMETIC)
-static void
-print_arith_command (arith_command)
- ARITH_COM *arith_command;
+void
+print_arith_command (list)
+ WORD_LIST *list;
{
cprintf ("(( ");
- command_print_word_list (arith_command->exp, " ");
+ command_print_word_list (list, " ");
cprintf (" ))");
}
#endif
@@ -618,7 +668,7 @@
}
}
-static void
+void
print_cond_command (cond)
COND_COM *cond;
{
@@ -681,6 +731,7 @@
fprintf (stderr, "%s%s", w->word->word, w->next ? " " : "");
fprintf (stderr, " ))\n");
}
+
#endif
void
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/shell.c cvs/shell.c
--- bash-2.05b/shell.c 2002-07-01 17:27:11.000000000 +0200
+++ cvs/shell.c 2002-10-10 14:34:01.000000000 +0200
@@ -186,6 +186,8 @@
/* Values for the long-winded argument names. */
static int debugging; /* Do debugging things. */
+static int debugger; /* Source debugger code to cause source
+ file to get debugged. */
static int no_rc; /* Don't execute ~/.bashrc */
static int no_profile; /* Don't execute .profile */
static int do_version; /* Display interesting version info. */
@@ -208,6 +210,7 @@
char **char_value;
} long_args[] = {
{ "debug", Int, &debugging, (char **)0x0 },
+ { "debugger", Int, &debugger, (char **)0x0 },
{ "dump-po-strings", Int, &dump_po_strings, (char **)0x0 },
{ "dump-strings", Int, &dump_translatable_strings, (char **)0x0 },
{ "help", Int, &want_initial_help, (char **)0x0 },
@@ -248,7 +251,7 @@
int malloc_trace_at_exit = 0;
static int shell_reinitialized = 0;
-static char *local_pending_command;
+char *command_execution_string;
static FILE *default_input;
@@ -374,7 +377,7 @@
/* Initialize `local' variables for all `invocations' of main (). */
arg_index = 1;
- local_pending_command = (char *)NULL;
+ command_execution_string = (char *)NULL;
want_pending_command = locally_skip_execution = read_from_stdin = 0;
default_input = stdin;
#if defined (BUFFERED_INPUT)
@@ -447,8 +450,8 @@
following args are $0...$n respectively. */
if (want_pending_command)
{
- local_pending_command = argv[arg_index];
- if (local_pending_command == 0)
+ command_execution_string = argv[arg_index];
+ if (command_execution_string == 0)
{
report_error ("-c: option requires an argument");
exit (EX_USAGE);
@@ -469,7 +472,7 @@
Refer to Posix.2, the description of the `sh' utility. */
if (forced_interactive || /* -i flag */
- (!local_pending_command && /* No -c command and ... */
+ (!command_execution_string && /* No -c command and ... */
wordexp_only == 0 && /* No --wordexp and ... */
((arg_index == argc) || /* no remaining args or... */
read_from_stdin) && /* -s flag with args, and */
@@ -614,16 +617,29 @@
exit_shell (last_command_exit_value);
}
- if (local_pending_command)
+ if (command_execution_string)
{
arg_index = bind_args (argv, arg_index, argc, 0);
startup_state = 2;
+
+ /* Run debugger profile. */
+ if (debugger) {
+ old_errexit_flag = exit_immediately_on_error;
+ exit_immediately_on_error = 0;
+
+ maybe_execute_file (DEBUGGER_START_FILE, 1);
+ /* Consider putting inside an if? */
+ function_trace_mode=1;
+
+ exit_immediately_on_error += old_errexit_flag;
+ }
+
#if defined (ONESHOT)
executing = 1;
- run_one_command (local_pending_command);
+ run_one_command (command_execution_string);
exit_shell (last_command_exit_value);
#else /* ONESHOT */
- with_input_from_string (local_pending_command, "-c");
+ with_input_from_string (command_execution_string, "-c");
goto read_and_execute;
#endif /* !ONESHOT */
}
@@ -648,6 +664,20 @@
/* Bind remaining args to $1 ... $n */
arg_index = bind_args (argv, arg_index, argc, 1);
+
+ /* Run debugger profile. */
+ if (debugger && locally_skip_execution == 0 && running_setuid == 0)
+ {
+ old_errexit_flag = exit_immediately_on_error;
+ exit_immediately_on_error = 0;
+
+ maybe_execute_file (DEBUGGER_START_FILE, 1);
+ /* Consider putting inside an if? */
+ function_trace_mode=1;
+
+ exit_immediately_on_error += old_errexit_flag;
+ }
+
/* Do the things that should be done only for interactive shells. */
if (interactive_shell)
{
@@ -929,7 +959,7 @@
/* get the rshd/sshd case out of the way first. */
if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 &&
- act_like_sh == 0 && local_pending_command)
+ act_like_sh == 0 && command_execution_string)
{
#ifdef SSH_SOURCE_BASHRC
run_by_ssh = (find_variable ("SSH_CLIENT") != (SHELL_VAR *)0) ||
@@ -1225,7 +1255,7 @@
command_error ("run_one_command", CMDERR_BADJUMP, code, 0);
}
}
- return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST));
+ return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST, 0));
}
#endif /* ONESHOT */
@@ -1250,9 +1280,13 @@
FREE (dollar_vars[0]);
dollar_vars[0] = savestring (args->word->word);
remember_args (args->next, 1);
+ push_args(args->next);
}
- else /* bind to $1...$n for shell script */
+ else { /* bind to $1...$n for shell script */
remember_args (args, 1);
+ push_args(args);
+ }
+
dispose_words (args);
}
@@ -1264,6 +1298,7 @@
unbind_args ()
{
remember_args ((WORD_LIST *)NULL, 1);
+ pop_args();
}
static int
@@ -1276,9 +1311,19 @@
int sample_len;
struct stat sb;
+ SHELL_VAR *funcname_var = find_variable ("FUNCNAME");
+ ARRAY *funcname_a = array_cell (funcname_var);
+ SHELL_VAR *bash_source_var = find_variable ("BASH_SOURCE");
+ ARRAY *bash_source_a = array_cell (bash_source_var);
+ SHELL_VAR *bash_lineno_var = find_variable ("BASH_LINENO");
+ ARRAY *bash_lineno_a = array_cell (bash_lineno_var);
+
free (dollar_vars[0]);
dollar_vars[0] = savestring (script_name);
filename = savestring (script_name);
+ array_shift_element(bash_source_a, savestring (script_name));
+ array_shift_element(bash_lineno_a, itos(executing_line_number ()));
+ array_shift_element(funcname_a, savestring("main"));
fd = open (filename, O_RDONLY);
if ((fd < 0) && (errno == ENOENT) && (absolute_program (filename) == 0))
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/shell.h cvs/shell.h
--- bash-2.05b/shell.h 2002-03-07 22:59:10.000000000 +0100
+++ cvs/shell.h 2002-09-14 05:04:29.000000000 +0200
@@ -89,6 +89,10 @@
extern int interactive, interactive_shell;
extern int startup_state;
+/* If -c is given, this is the command string that follows. */
+extern char *command_execution_string;
+
+
/* Structure to pass around that holds a bitmap of file descriptors
to close, and the size of that structure. Used in execute_cmd.c. */
struct fd_bitmap {
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/subst.c cvs/subst.c
--- bash-2.05b/subst.c 2002-06-24 13:59:45.000000000 +0200
+++ cvs/subst.c 2003-02-17 23:01:58.000000000 +0100
@@ -4,7 +4,7 @@
/* ``Have a little faith, there's magic in the night. You ain't a
beauty, but, hey, you're alright.'' */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987,2002,2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -122,6 +122,7 @@
/* Extern functions and variables from different files. */
extern int last_command_exit_value;
+extern int subshell_level;
extern int subshell_environment;
extern int eof_encountered;
extern int return_catch_flag, return_catch_value;
@@ -1638,11 +1639,10 @@
/* This performs word splitting and quoted null character removal on
STRING. */
-#if 0
-#define issep(c) ((separators)[1] ? (member ((c), separators)) : (c) == (separators)[0])
-#else
-#define issep(c) ((separators)[1] ? isifs(c) : (c) == (separators)[0])
-#endif
+#define issep(c) \
+ (((separators)[0]) ? ((separators)[1] ? isifs(c) \
+ : (c) == (separators)[0]) \
+ : 0)
WORD_LIST *
list_string (string, separators, quoted)
@@ -3598,7 +3598,7 @@
dev_fd_list[parent_pipe_fd] = 0;
#endif /* HAVE_DEV_FD */
- result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST));
+ result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST), 0);
#if !defined (HAVE_DEV_FD)
/* Make sure we close the named pipe in the child before we exit. */
@@ -3717,6 +3717,7 @@
pid_t pid, old_pid, old_pipeline_pgrp;
char *istring;
int result, fildes[2], function_value;
+ int reset_line_number=interactive;
istring = (char *)NULL;
@@ -3842,8 +3843,13 @@
exit (EXECUTION_FAILURE);
else if (function_value)
exit (return_catch_value);
- else
- exit (parse_and_execute (string, "command substitution", SEVAL_NOHIST));
+ else {
+ int rc;
+ subshell_level++;
+ rc=parse_and_execute (string, "command substitution", SEVAL_NOHIST, reset_line_number);
+ subshell_level--;
+ exit(rc);
+ }
}
else
{
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/support/Makefile.in cvs/support/Makefile.in
--- bash-2.05b/support/Makefile.in 2002-04-16 16:31:35.000000000 +0200
+++ cvs/support/Makefile.in 2002-11-20 16:09:01.000000000 +0100
@@ -1,3 +1,4 @@
+# $Id: Makefile.in,v 1.3 2002/11/20 15:09:01 rockyb Exp $
#
# Simple Makefile for the support programs.
#
@@ -9,7 +10,7 @@
# Currently only man2html is built
#
#
-# Copyright (C) 1998 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,6 +37,7 @@
RM = rm -f
SHELL = @MAKE_SHELL@
CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
EXEEXT = @EXEEXT@
@@ -78,6 +80,6 @@
$(CC) $(CCFLAGS) $(OBJ1) -o $@ ${LIBS}
clean:
- rm man2html
+ rm man2html *.o *.~
man2html.o: man2html.c
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/support/mkdist cvs/support/mkdist
--- bash-2.05b/support/mkdist 1970-01-01 01:00:00.000000000 +0100
+++ cvs/support/mkdist 2002-09-02 06:36:55.000000000 +0200
@@ -0,0 +1,100 @@
+#! /bin/bash -
+#
+# mkdist - make a distribution directory from a master manifest file
+#
+# usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version
+#
+# SRCDIR defaults to src
+# MANIFEST defaults to $SRCDIR/MANIFEST
+#
+
+SRCDIR=src
+ROOTNAME=bash
+
+usage()
+{
+ echo usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version 1>&2
+ exit 2
+}
+
+vmsg()
+{
+ if [ -n "$verbose" ]; then
+ echo mkdist: "$@"
+ fi
+}
+
+while getopts m:s:r:v name
+do
+ case $name in
+ m) MANIFEST=$OPTARG ;;
+ s) SRCDIR=$OPTARG ;;
+ r) ROOTNAME=$OPTARG ;;
+ v) verbose=yes ;;
+ ?) usage ;;
+ esac
+done
+
+: ${MANIFEST:=$SRCDIR/MANIFEST}
+
+vmsg using $MANIFEST
+
+shift $(( $OPTIND - 1 ))
+
+if [ $# -lt 1 ]; then
+ usage
+fi
+
+version=$1
+newdir=${ROOTNAME}-$version
+
+vmsg creating distribution for $ROOTNAME version $version in $newdir
+
+if [ ! -d $newdir ]; then
+ mkdir $newdir || { echo $0: cannot make directory $newdir 1>&2 ; exit 1; }
+fi
+
+dirmode=755
+filmode=644
+
+while read fname type mode
+do
+ [ -z "$fname" ] && continue
+
+ case "$fname" in
+ \#*) continue ;;
+ esac
+
+ case "$type" in
+ d) mkdir $newdir/$fname ;;
+ f) cp -p $SRCDIR/$fname $newdir/$fname ;;
+ *) echo "unknown file type $type" 1>&2 ;;
+ esac
+
+ if [ -n "$mode" ]; then
+ chmod $mode $newdir/$fname
+ fi
+
+done < $MANIFEST
+
+# cut off the `-alpha' in something like `2.0-alpha', leaving just the
+# numeric version
+#version=${version%%-*}
+
+#case "$version" in
+#*.*.*) vers=${version%.*} ;;
+#*.*) vers=${version} ;;
+#esac
+
+#echo $vers > $newdir/.distribution
+
+#case "$version" in
+#*.*.*) plevel=${version##*.} ;;
+#*) plevel=0 ;;
+#esac
+#[ -z "$plevel" ] && plevel=0
+#echo ${plevel} > $newdir/.patchlevel
+
+vmsg $newdir created
+
+exit 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/support/mksignames.c cvs/support/mksignames.c
--- bash-2.05b/support/mksignames.c 2002-01-02 17:02:39.000000000 +0100
+++ cvs/support/mksignames.c 2003-02-17 23:02:23.000000000 +0100
@@ -1,7 +1,7 @@
/* signames.c -- Create and write `signames.h', which contains an array of
signal names. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992,2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,10 +39,11 @@
* EXIT == 0
* DEBUG == NSIG
* ERR == NSIG+1
+ * RETURN == NSIG+2
*/
-#define LASTSIG NSIG+1
+#define LASTSIG NSIG+2
-char *signal_names[2 * NSIG + 3];
+char *signal_names[2 * (LASTSIG)];
#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0]))
@@ -369,6 +370,7 @@
signal_names[NSIG] = "DEBUG";
signal_names[NSIG+1] = "ERR";
+ signal_names[NSIG+2] = "RETURN";
}
void
@@ -382,7 +384,7 @@
fprintf (stream, " Do not edit. Edit support/mksignames.c instead. */\n\n");
fprintf (stream,
"/* A translation list so we can be polite to our users. */\n");
- fprintf (stream, "char *signal_names[NSIG + 3] = {\n");
+ fprintf (stream, "char *signal_names[NSIG + 4] = {\n");
for (i = 0; i <= LASTSIG; i++)
fprintf (stream, " \"%s\",\n", signal_names[i]);
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/support/texi2dvi cvs/support/texi2dvi
--- bash-2.05b/support/texi2dvi 1999-09-28 21:36:53.000000000 +0200
+++ cvs/support/texi2dvi 2002-09-03 05:18:37.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
-# $Id: texi2dvi,v 0.43 1999/09/28 19:36:53 karl Exp $
+# $Id: texi2dvi,v 1.3 2002/09/03 03:18:37 rocky Exp $
#
# Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
#
@@ -26,7 +26,7 @@
# the `--debug' option when making a bug report.
# This string is expanded by rcs automatically when this file is checked out.
-rcs_revision='$Revision: 0.43 $'
+rcs_revision='$Revision: 1.3 $'
rcs_version=`set - $rcs_revision; echo $2`
program=`echo $0 | sed -e 's!.*/!!'`
version="texi2dvi (GNU Texinfo 4.0) $rcs_version
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/support/texi2html cvs/support/texi2html
--- bash-2.05b/support/texi2html 2001-10-05 20:30:15.000000000 +0200
+++ cvs/support/texi2html 2002-09-02 06:36:55.000000000 +0200
@@ -36,7 +36,7 @@
#--##############################################################################
# CVS version:
-# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $
+# $Id: texi2html,v 1.3 2002/09/02 04:36:55 rocky Exp $
# Homepage:
$T2H_HOMEPAGE = <<EOT;
@@ -92,7 +92,7 @@
# Copy this file and make changes to it, if you like.
# Afterwards, either, load it with command-line option -init_file <your_init_file>
#
-# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $
+# $Id: texi2html,v 1.3 2002/09/02 04:36:55 rocky Exp $
######################################################################
# stuff which can also be set by command-line options
@@ -1510,7 +1510,7 @@
# --------------------------------------------------------------------------
# Locally modified by obachman (Display type instead of env, order by cmp)
-# $Id: MySimple.pm,v 1.1 2000/07/03 08:44:13 obachman Exp $
+# $Id: texi2html,v 1.3 2002/09/02 04:36:55 rocky Exp $
# use strict;
# no strict 'refs';
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/array.right cvs/tests/array.right
--- bash-2.05b/tests/array.right 2002-03-28 21:51:21.000000000 +0100
+++ cvs/tests/array.right 2002-10-10 14:34:04.000000000 +0200
@@ -6,7 +6,12 @@
abcde
abcde bdef
abcde bdef
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
declare -a a='([0]="abcde" [1]="" [2]="bdef")'
declare -a b='()'
declare -ar c='()'
@@ -29,7 +34,12 @@
readonly -a a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
readonly -a c='()'
a test
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
declare -ar c='()'
@@ -47,7 +57,12 @@
./array.tests: line 109: []=abcde: bad array subscript
./array.tests: line 109: [*]=last: cannot assign to non-numeric index
./array.tests: line 109: [-65]=negative: bad array subscript
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
declare -ar c='()'
@@ -59,7 +74,12 @@
this is a test of read using arrays
this test
this is a test of arrays
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
declare -ar c='()'
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/bashdb-bp.tests cvs/tests/bashdb-bp.tests
--- bash-2.05b/tests/bashdb-bp.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/bashdb-bp.tests 2002-09-05 04:11:35.000000000 +0200
@@ -0,0 +1,38 @@
+#!../bash
+
+fn1() {
+ echo "fn1 here"
+ x=5
+ fn3
+}
+
+fn2() {
+ name="fn2"
+ echo "$name here"
+ x=6
+}
+
+fn3() {
+ name="fn3"
+ x=3
+}
+
+x=1
+x=a
+y=8
+x=a
+x=10
+x=a
+y=b
+x=9
+echo $(fn3)
+fn3
+fn1;
+for i in 0 1 ; do
+ x=4
+done
+fn3
+exit 0;
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/check_common.in cvs/tests/check_common.in
--- bash-2.05b/tests/check_common.in 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/check_common.in 2003-08-09 04:40:44.000000000 +0200
@@ -0,0 +1,15 @@
+# $Id: check_common.in,v 1.1 2003/08/09 02:40:44 rockyb Exp $
+
+if test -z $THIS_SH ; then
+ THIS_SH=../bash
+fi
+
+export TOP_BUILDDIR=`pwd`/../
+
+check_output() {
+ testfile="$1"
+ rightfile="$2"
+ set -o noglob
+ @DIFF@ @DIFF_OPTS@ $testfile $rightfile && rm -f $testfile
+ return $?
+}
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-fns cvs/tests/dbg-fns
--- bash-2.05b/tests/dbg-fns 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-fns 2003-02-27 08:34:02.000000000 +0100
@@ -0,0 +1,33 @@
+#!../bash
+#
+# Test functioning of bashdb-fns.inc
+#
+#$Id: dbg-fns,v 1.2 2003/02/27 07:34:02 rockyb Exp $
+source ../debugger/bashdb-init.inc
+source ../debugger/bashdb-fns.inc
+
+_set_assoc_scalar_entry "hash_" "value1" "1"
+echo "`_get_assoc_scalar_entry "hash_" "value1"`"
+
+_set_assoc_scalar_entry "hash_" "value2" "2"
+echo "`_get_assoc_scalar_entry "hash_" "value2"`"
+
+if [ "$hash_value1" != 1 ] ; then
+ echo "Problem with hash_value1: $hash_value1"
+fi
+
+if [ "$hash_value2" != 2 ] ; then
+ echo "Problem with hash_value2: $hash_value2"
+fi
+
+_Dbg_readin "./dbg-fns"
+
+filevar=`_Dbg_file2var ./db-fns`
+echo "`_get_assoc_scalar_entry "_read_" $filevar`"
+echo "`_get_assoc_scalar_entry "_maxline_" $filevar $i`"
+echo "line 24 `_Dbg_get_source_line 24 ./db-fns`"
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-fns.dat cvs/tests/dbg-fns.dat
--- bash-2.05b/tests/dbg-fns.dat 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-fns.dat 2002-08-24 22:57:07.000000000 +0200
@@ -0,0 +1 @@
+#;;; Local Variables: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-is-fn.right cvs/tests/dbg-is-fn.right
--- bash-2.05b/tests/dbg-is-fn.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-is-fn.right 2003-02-27 08:34:02.000000000 +0100
@@ -0,0 +1,6 @@
+1
+1
+1
+bad: 0
+_Dbg_is_function 0 worked
+_Dbg_is_function 1 worked
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-is-fn.tests cvs/tests/dbg-is-fn.tests
--- bash-2.05b/tests/dbg-is-fn.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-is-fn.tests 2003-02-27 08:34:02.000000000 +0100
@@ -0,0 +1,21 @@
+#!../bash
+#
+# Test functioning of _is_function in bashdb-fns.inc
+#
+source ../debugger/dbg-fns.inc
+
+f1() {
+ line=7
+}
+
+_Dbg_is_function 'f1'
+_Dbg_is_function 'f1' 0
+_Dbg_is_function 'f1' 1
+echo 'bad: ' `_Dbg_is_function 'bad'`
+[ -z `_Dbg_is_function '_Dbg_is_function' 0` ] || echo "_Dbg_is_function 0 worked"
+[ -n `_Dbg_is_function '_Dbg_is_function' 1` ] && echo "_Dbg_is_function 1 worked"
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-multicmd.right cvs/tests/dbg-multicmd.right
--- bash-2.05b/tests/dbg-multicmd.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-multicmd.right 2002-12-07 04:57:01.000000000 +0100
@@ -0,0 +1,45 @@
+./dbg-multicmd.tests at line 17
+last command was x=1
+./dbg-multicmd.tests at line 17
+last command was y=x
+./dbg-multicmd.tests at line 17
+last command was z=3
+./dbg-multicmd.tests at line 18
+last command was [[ $x = 1 ]]
+./dbg-multicmd.tests at line 18
+last command was [[ $y = x ]]
+./dbg-multicmd.tests at line 18
+last command was echo "true"
+true
+./dbg-multicmd.tests at line 19
+last command was z=x
+./dbg-multicmd.tests at line 19
+last command was x=y
+./dbg-multicmd.tests at line 19
+last command was x=5
+./dbg-multicmd.tests at line 20
+last command was [ $z = x ]
+./dbg-multicmd.tests at line 20
+last command was [ $x = y ]
+./dbg-multicmd.tests at line 21
+last command was x=1
+./dbg-multicmd.tests at line 21
+last command was y=2
+./dbg-multicmd.tests at line 21
+last command was z=3
+./dbg-multicmd.tests at line 24
+last command was (( x+1 == y ))
+./dbg-multicmd.tests at line 24
+last command was (( y == z-x ))
+./dbg-multicmd.tests at line 24
+last command was echo "true a third time"
+true a third time
+./dbg-multicmd.tests at line 25
+last command was x=1
+./dbg-multicmd.tests at line 26
+last command was set -o fntrace
+./dbg-multicmd.tests at line 27
+last command was case `builtin echo "testing./dbg-multicmd.tests at line 29
+last command was ECHO_N=-n ECHO_C= ECHO_T=
+./dbg-multicmd.tests at line 32
+last command was exit 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-multicmd.tests cvs/tests/dbg-multicmd.tests
--- bash-2.05b/tests/dbg-multicmd.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-multicmd.tests 2002-11-19 21:52:38.000000000 +0100
@@ -0,0 +1,32 @@
+#!../bash
+#$Id: dbg-multicmd.tests,v 1.1 2002/11/19 20:52:38 rockyb Exp $
+# Test that last_cmd works for lines with multiple commands
+# and conditions on the line.
+print_trap() {
+ local -ir lineno=$1
+ shift
+ local last_cmd="$1"
+ shift
+ local -ar ARG=($@)
+ echo -e "${BASH_SOURCE[0]} at line ${BASH_LINENO[0]}"
+ echo -e "last command was $last_cmd"
+}
+
+trap 'print_trap $LINENO "$BASH_COMMAND" $*' DEBUG
+# set -xv
+x=1; y=x; z=3
+[[ $x = 1 ]] && [[ $y = x ]] && echo "true"
+z=x; x=y; x=5
+[ $z = x ] && [ $x = y ] && echo "true again"
+x=1; y=2; z=3
+# Look carefully and you'll see that the spacing printed on the trace
+# is different from below.
+(( x+1 == y )) && ((y == z-x)) && echo "true a third time"
+x=1
+set -o fntrace
+case `builtin echo "testing\c"; builtin echo 1,2,3`,`builtin echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+exit 0
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-support.right cvs/tests/dbg-support.right
--- bash-2.05b/tests/dbg-support.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-support.right 2003-08-08 04:36:37.000000000 +0200
@@ -0,0 +1,299 @@
+debug lineno: 63 main
+debug lineno: 66 main
+FUNCNAME main
+debug lineno: 70 main
+debug lineno: 17 fn1
+debug lineno: 18 fn1
+LINENO 18
+debug lineno: 19 fn1
+LINENO 19
+debug lineno: 20 fn1
+BASH_SOURCE[0] ./dbg-support.tests
+debug lineno: 21 fn1
+FUNCNAME[0] fn1
+debug lineno: 22 fn1
+debug lineno: 22 fn1 70 ./dbg-support.tests
+debug lineno: 23 fn1
+debug lineno: 23 fn1 70 main ./dbg-support.tests
+debug lineno: 24 fn1
+debug lineno: 24 fn1
+debug lineno: 25 fn1
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [EXPR]
+debug lineno: 25 fn1
+debug lineno: 71 main
+debug lineno: 28 fn2
+debug lineno: 29 fn2
+fn2 here. Calling fn1...
+debug lineno: 30 fn2
+debug lineno: 17 fn1
+debug lineno: 18 fn1
+LINENO 18
+debug lineno: 19 fn1
+LINENO 19
+debug lineno: 20 fn1
+BASH_SOURCE[0] ./dbg-support.tests
+debug lineno: 21 fn1
+FUNCNAME[0] fn1
+debug lineno: 22 fn1
+debug lineno: 22 fn1 30 ./dbg-support.tests
+debug lineno: 23 fn1
+debug lineno: 23 fn1 30 fn2 ./dbg-support.tests
+debug lineno: 24 fn1
+debug lineno: 24 fn1 71 main ./dbg-support.tests
+debug lineno: 25 fn1
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [EXPR]
+debug lineno: 25 fn1
+debug lineno: 72 main
+debug lineno: 33 fn3
+debug lineno: 34 fn3
+LINENO 34
+debug lineno: 35 fn3
+BASH_SOURCE[0] ./dbg-support.tests
+debug lineno: 38 fn3
+debug lineno: 39 fn3
+debug lineno: 40 fn3
+debug lineno: 40 fn3
+debug lineno: 41 fn3
+debug lineno: 42 fn3
+debug lineno: 43 fn3
+fn3 called from file `./dbg-support.tests' at line 0
+debug lineno: 40 fn3
+debug lineno: 40 fn3
+debug lineno: 41 fn3
+debug lineno: 42 fn3
+debug lineno: 42 fn3
+debug lineno: 43 fn3
+main called from file `./dbg-support.tests' at line 0
+debug lineno: 40 fn3
+debug lineno: 40 fn3
+debug lineno: 46 fn3
+debug lineno: 18 source
+SOURCED LINENO 18
+debug lineno: 19 source
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+debug lineno: 20 source
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 46
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 72
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[3]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 73 main
+debug lineno: 18 source
+SOURCED LINENO 18
+debug lineno: 19 source
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+debug lineno: 20 source
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 73
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[2]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 76 main
+debug lineno: 79 main
+LINENO 18
+LINENO 19
+BASH_SOURCE[0] ./dbg-support.tests
+FUNCNAME[0] fn1
+79 ./dbg-support.tests
+79 main ./dbg-support.tests
+
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [EXPR]
+
+debug lineno: 80 main
+fn2 here. Calling fn1...
+LINENO 18
+LINENO 19
+BASH_SOURCE[0] ./dbg-support.tests
+FUNCNAME[0] fn1
+30 ./dbg-support.tests
+30 fn2 ./dbg-support.tests
+80 main ./dbg-support.tests
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [EXPR]
+
+debug lineno: 81 main
+LINENO 34
+BASH_SOURCE[0] ./dbg-support.tests
+fn3 called from file `./dbg-support.tests' at line 0
+main called from file `./dbg-support.tests' at line 0
+SOURCED LINENO 18
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+FUNCNAME[1]: source called from ./dbg-support.tests at line 46
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 81
+FUNCNAME[3]: main called from ./dbg-support.tests at line 0
+debug lineno: 82 main
+fn4 here. Calling fn3...
+LINENO 34
+BASH_SOURCE[0] ./dbg-support.tests
+fn3 called from file `./dbg-support.tests' at line 82
+fn4 called from file `./dbg-support.tests' at line 0
+main called from file `./dbg-support.tests' at line 0
+SOURCED LINENO 18
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+FUNCNAME[1]: source called from ./dbg-support.tests at line 46
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 51
+FUNCNAME[3]: fn4 called from ./dbg-support.tests at line 82
+FUNCNAME[4]: main called from ./dbg-support.tests at line 0
+debug lineno: 83 main
+SOURCED LINENO 18
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+FUNCNAME[1]: source called from ./dbg-support.tests at line 83
+FUNCNAME[2]: main called from ./dbg-support.tests at line 0
+debug lineno: 86 main
+debug lineno: 89 main
+debug lineno: 18 source
+SOURCED LINENO 18
+debug lineno: 19 source
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+debug lineno: 20 source
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 89
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[2]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 90 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 94 main
+debug lineno: 97 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 94 main
+debug lineno: 97 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 94 main
+debug lineno: 95 main
+Hit 2
+debug lineno: 97 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 103 main
+SOURCED FN LINENO 5 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 103 FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 104 main
+SOURCED FN LINENO 5 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 104 FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 105 main
+debug lineno: 106 main
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 106
+FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 110 main
+debug lineno: 111 main
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 111
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 114 main
+debug lineno: 119 main
+debug lineno: 123 main
+got it
+debug lineno: 131 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 131 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 139 main
+debug lineno: 143 main
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-support.sub cvs/tests/dbg-support.sub
--- bash-2.05b/tests/dbg-support.sub 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-support.sub 2002-09-13 00:10:21.000000000 +0200
@@ -0,0 +1,26 @@
+# This file is intended to be sourced from one of the bashdb test programs
+
+sourced_fn() {
+ name="fn2"
+ echo "SOURCED FN LINENO $LINENO"
+
+ # Print a stack trace
+ declare -i n
+ n=${#FUNCNAME[@]}
+ for (( i=0 ; (( i < $n )) ; i++ )) ; do
+ local -i j=i+1
+ [ $j -eq $n ] && j=i # main()'s file is the same as the first caller
+ echo "FUNCNAME[$i]: ${FUNCNAME[$i]} called from ${BASH_SOURCE[$j]}" \
+ "at line ${BASH_LINENO[$i]}"
+ done
+}
+
+echo "SOURCED LINENO $LINENO"
+echo "SOURCED BASH_SOURCE[0]" ${BASH_SOURCE[0]}
+sourced_fn
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-support.tests cvs/tests/dbg-support.tests
--- bash-2.05b/tests/dbg-support.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-support.tests 2003-08-08 04:36:37.000000000 +0200
@@ -0,0 +1,149 @@
+#!../bash
+#
+# Test correct functioning bash debug support not via the bashdb
+# debugger but merely by printing via print_trap()
+# $Id: dbg-support.tests,v 1.14 2003/08/08 02:36:37 rockyb Exp $
+
+print_debug_trap() {
+ echo "debug lineno: $1 ${FUNCNAME[1]}"
+ return
+}
+
+print_return_trap() {
+ echo "return lineno: $1 ${FUNCNAME[1]}"
+ return
+}
+
+fn1() {
+ echo "LINENO $LINENO"
+ echo "LINENO $LINENO"
+ echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]}
+ echo "FUNCNAME[0]" ${FUNCNAME[0]}
+ echo `caller`
+ echo `caller 0`
+ echo `caller 1`
+ echo `caller foo`
+}
+
+fn2() {
+ echo "fn2 here. Calling fn1..."
+ fn1
+}
+
+fn3() {
+ echo "LINENO $LINENO"
+ echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]}
+
+ # Print a stack trace
+ declare -i n
+ n=${#FUNCNAME[@]}
+ for (( i=0 ; (( i < $n )) ; i++ )) ; do
+ local -i j=i+1
+ [ $j -eq $n ] && j=i # main()'s file is the same as the first caller
+ echo "${FUNCNAME[$i]} called from file " \
+ "\`${BASH_SOURCE[$j]}' at line ${BASH_LINENO[$j]}"
+ done
+ source ./dbg-support.sub
+}
+
+fn4() {
+ echo "fn4 here. Calling fn3..."
+ fn3
+}
+
+
+#!../bash
+#
+# Test of support for debugging facilities in bash
+#
+# Test debugger set option fntrace - set on. Not in vanilla Bash 2.05
+#
+set -o fntrace
+trap 'print_debug_trap $LINENO' DEBUG
+trap 'print_return_trap $LINENO' RETURN
+
+# Funcname is now an array. Vanilla Bash 2.05 doesn't have FUNCNAME array.
+echo "FUNCNAME" ${FUNCNAME[0]}
+
+# We should trace into the below.
+# Start easy with a simple function.
+fn1
+fn2
+fn3
+source ./dbg-support.sub
+
+# Test debugger set option fntrace - set off
+set +d
+
+# We should not trace into this.
+fn1
+fn2
+fn3
+fn4
+source ./dbg-support.sub
+
+# Another way to say: set -o fntrace
+set -d
+
+# We should trace into this.
+source ./dbg-support.sub
+set +d
+
+# Test that the line numbers in the presence of conditionals are correct.
+for (( i=0 ; (( i <= 2 )) ; i++ )) ; do
+ if [ $i -eq 2 ] ; then
+ echo "Hit 2"
+ fi
+ j=4
+done
+
+#
+# Check line numbers in command substitution
+#
+echo $(sourced_fn)
+echo `sourced_fn`
+x=$((sourced_fn))
+x={ sourced_fn }
+
+# Make sure we step into sourced_fn as a comand when we request to do so.
+# Vanilla bash 2.0 doesn't do.
+set -o fntrace
+x={ sourced_fn }
+
+# Should see line number of xyzzy below. Vanilla bash 2.05b doesn't do
+case xyzzy in
+ a )
+ x=5
+ ;;
+ xyzz? )
+ case 3 in
+ 2 )
+ x=6 ;;
+ 3 )
+ echo "got it" ;;
+ * ) echo "no good" ;;
+ esac
+ ;;
+ * )
+esac
+
+# Should see line numbers for initial for lines.
+for i in 0 1 ; do
+ for j in 3 4 ; do
+ ((x=i+j))
+ done
+done
+
+# The following line number for the following assignment should where
+# the line number of "s", not of the end of the assignment )`
+s=`(
+ echo Bug reported by
+ echo Mikael Andersson
+)`
+y="Another multi-line
+test
+"
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-support2.right cvs/tests/dbg-support2.right
--- bash-2.05b/tests/dbg-support2.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-support2.right 2002-11-12 13:37:32.000000000 +0100
@@ -0,0 +1,7 @@
+lineno: 17 (6) main
+lineno: 18 (6) main
+x is 1
+lineno: 19 (6) main
+lineno: 20 (6) main
+lineno: 21 (6) main
+x is 1
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/dbg-support2.tests cvs/tests/dbg-support2.tests
--- bash-2.05b/tests/dbg-support2.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/dbg-support2.tests 2002-11-12 05:39:28.000000000 +0100
@@ -0,0 +1,26 @@
+#!../bash
+#
+# Test correct trap return codes = 2 means skip execution.
+
+print_trap() {
+ echo "lineno: $1 ($LINENO) ${FUNCNAME[1]}"
+ if [[ $debug_exit == 2 ]] ; then
+ debug_exit=0
+ return 2
+ fi
+ return 0
+}
+
+debug_exit=0
+trap 'print_trap $LINENO' DEBUG
+
+x=1
+echo "x is $x"
+debug_exit=2
+x=2
+echo "x is $x"
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/errors.right cvs/tests/errors.right
--- bash-2.05b/tests/errors.right 2002-06-24 21:07:52.000000000 +0200
+++ cvs/tests/errors.right 2003-02-17 23:02:25.000000000 +0100
@@ -1,100 +1,103 @@
-./errors.tests: line 17: alias: -x: invalid option
+./errors.tests: line 20: alias: -x: invalid option
alias: usage: alias [-p] [name[=value] ... ]
-./errors.tests: line 18: unalias: -x: invalid option
+./errors.tests: line 21: unalias: -x: invalid option
unalias: usage: unalias [-a] [name ...]
-./errors.tests: line 19: alias: hoowah: not found
-./errors.tests: line 20: unalias: hoowah: not found
-./errors.tests: line 23: `1': not a valid identifier
+./errors.tests: line 22: alias: hoowah: not found
+./errors.tests: line 23: unalias: hoowah: not found
+./errors.tests: line 26: `1': not a valid identifier
declare -fr func
-./errors.tests: line 36: func: readonly function
-./errors.tests: line 39: unset: -x: invalid option
+./errors.tests: line 39: func: readonly function
+./errors.tests: line 42: unset: -x: invalid option
unset: usage: unset [-f] [-v] [name ...]
-./errors.tests: line 42: unset: func: cannot unset: readonly function
-./errors.tests: line 45: declare: func: readonly function
-./errors.tests: line 49: unset: XPATH: cannot unset: readonly variable
-./errors.tests: line 52: unset: `/bin/sh': not a valid identifier
-./errors.tests: line 55: unset: cannot simultaneously unset a function and a variable
-./errors.tests: line 58: declare: -z: invalid option
+./errors.tests: line 45: unset: func: cannot unset: readonly function
+./errors.tests: line 48: declare: func: readonly function
+./errors.tests: line 52: unset: XPATH: cannot unset: readonly variable
+./errors.tests: line 55: unset: `/bin/sh': not a valid identifier
+./errors.tests: line 58: unset: cannot simultaneously unset a function and a variable
+./errors.tests: line 61: declare: -z: invalid option
declare: usage: declare [-afFirtx] [-p] name[=value] ...
-./errors.tests: line 60: declare: `-z': not a valid identifier
-./errors.tests: line 61: declare: `/bin/sh': not a valid identifier
-./errors.tests: line 65: declare: cannot use `-f' to make functions
-./errors.tests: line 68: exec: -i: invalid option
+./errors.tests: line 63: declare: `-z': not a valid identifier
+./errors.tests: line 64: declare: `/bin/sh': not a valid identifier
+./errors.tests: line 68: declare: cannot use `-f' to make functions
+./errors.tests: line 71: exec: -i: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
-./errors.tests: line 72: export: XPATH: not a function
-./errors.tests: line 75: break: only meaningful in a `for', `while', or `until' loop
-./errors.tests: line 76: continue: only meaningful in a `for', `while', or `until' loop
-./errors.tests: line 79: shift: label: numeric argument required
-./errors.tests: line 84: shift: too many arguments
-./errors.tests: line 90: let: expression expected
-./errors.tests: line 93: local: can only be used in a function
-./errors.tests: line 96: logout: not login shell: use `exit'
-./errors.tests: line 99: hash: notthere: not found
-./errors.tests: line 102: hash: -v: invalid option
+./errors.tests: line 75: export: XPATH: not a function
+./errors.tests: line 78: break: only meaningful in a `for', `while', or `until' loop
+./errors.tests: line 79: continue: only meaningful in a `for', `while', or `until' loop
+./errors.tests: line 82: shift: label: numeric argument required
+./errors.tests: line 87: shift: too many arguments
+./errors.tests: line 93: let: expression expected
+./errors.tests: line 96: local: can only be used in a function
+./errors.tests: line 99: logout: not login shell: use `exit'
+./errors.tests: line 102: hash: notthere: not found
+./errors.tests: line 105: hash: -v: invalid option
hash: usage: hash [-lr] [-p pathname] [-dt] [name ...]
-./errors.tests: line 106: hash: hashing disabled
-./errors.tests: line 109: export: `AA[4]': not a valid identifier
-./errors.tests: line 110: readonly: `AA[4]': not a valid identifier
-./errors.tests: line 113: [-2]: bad array subscript
-./errors.tests: line 117: AA: readonly variable
-./errors.tests: line 121: AA: readonly variable
-./errors.tests: line 129: shift: 5: shift count out of range
-./errors.tests: line 130: shift: -2: shift count out of range
-./errors.tests: line 133: shopt: no_such_option: invalid shell option name
-./errors.tests: line 134: shopt: no_such_option: invalid shell option name
-./errors.tests: line 137: umask: 09: octal number out of range
-./errors.tests: line 138: umask: `:': invalid symbolic mode character
-./errors.tests: line 139: umask: `:': invalid symbolic mode operator
-./errors.tests: line 142: umask: -i: invalid option
+./errors.tests: line 109: hash: hashing disabled
+./errors.tests: line 112: export: `AA[4]': not a valid identifier
+./errors.tests: line 113: readonly: `AA[4]': not a valid identifier
+./errors.tests: line 116: [-2]: bad array subscript
+./errors.tests: line 120: AA: readonly variable
+./errors.tests: line 124: AA: readonly variable
+./errors.tests: line 132: shift: 5: shift count out of range
+./errors.tests: line 133: shift: -2: shift count out of range
+./errors.tests: line 136: shopt: no_such_option: invalid shell option name
+./errors.tests: line 137: shopt: no_such_option: invalid shell option name
+./errors.tests: line 140: umask: 09: octal number out of range
+./errors.tests: line 141: umask: `:': invalid symbolic mode character
+./errors.tests: line 142: umask: `:': invalid symbolic mode operator
+./errors.tests: line 145: umask: -i: invalid option
umask: usage: umask [-p] [-S] [mode]
-./errors.tests: line 146: umask: `u': invalid symbolic mode character
-./errors.tests: line 155: VAR: readonly variable
-./errors.tests: line 158: declare: VAR: readonly variable
-./errors.tests: line 159: declare: VAR: readonly variable
-./errors.tests: line 161: declare: unset: not found
-./errors.tests: line 164: VAR: readonly variable
-./errors.tests: command substitution: line 2: syntax error: unexpected end of file
-./errors.tests: command substitution: line 1: syntax error near unexpected token `done'
-./errors.tests: command substitution: line 1: ` for z in 1 2 3; done '
-./errors.tests: line 171: cd: HOME not set
-./errors.tests: line 172: cd: /tmp/xyz.bash: No such file or directory
-./errors.tests: line 174: cd: OLDPWD not set
-./errors.tests: line 175: cd: /bin/sh: Not a directory
-./errors.tests: line 177: cd: /tmp/cd-notthere: No such file or directory
-./errors.tests: line 180: .: filename argument required
-.: usage: . filename
-./errors.tests: line 181: source: filename argument required
-source: usage: source filename
-./errors.tests: line 184: .: -i: invalid option
-.: usage: . filename
-./errors.tests: line 187: set: -q: invalid option
+./errors.tests: line 149: umask: `u': invalid symbolic mode character
+./errors.tests: line 158: VAR: readonly variable
+./errors.tests: line 161: declare: VAR: readonly variable
+./errors.tests: line 162: declare: VAR: readonly variable
+./errors.tests: line 164: declare: unset: not found
+./errors.tests: line 167: VAR: readonly variable
+./errors.tests: command substitution: line 171: syntax error: unexpected end of file
+./errors.tests: command substitution: line 171: syntax error near unexpected token `done'
+./errors.tests: command substitution: line 171: ` for z in 1 2 3; done '
+./errors.tests: line 174: cd: HOME not set
+./errors.tests: line 175: cd: /tmp/xyz.bash: No such file or directory
+./errors.tests: line 177: cd: OLDPWD not set
+./errors.tests: line 178: cd: /bin/sh: Not a directory
+./errors.tests: line 180: cd: /tmp/cd-notthere: No such file or directory
+./errors.tests: line 183: .: filename argument required
+.: usage: . FILENAME [ARGUMENTS]
+./errors.tests: line 184: source: filename argument required
+source: usage: source FILENAME [ARGUMENTS]
+./errors.tests: line 187: .: -i: invalid option
+.: usage: . FILENAME [ARGUMENTS]
+./errors.tests: line 190: set: -q: invalid option
set: usage: set [--abefhkmnptuvxBCHP] [-o option] [arg ...]
-./errors.tests: line 190: enable: sh: not a shell builtin
-./errors.tests: line 190: enable: bash: not a shell builtin
-./errors.tests: line 193: shopt: cannot set and unset shell options simultaneously
-./errors.tests: line 196: read: var: invalid timeout specification
-./errors.tests: line 199: read: `/bin/sh': not a valid identifier
-./errors.tests: line 202: VAR: readonly variable
-./errors.tests: line 205: readonly: -x: invalid option
+./errors.tests: line 193: enable: sh: not a shell builtin
+./errors.tests: line 193: enable: bash: not a shell builtin
+./errors.tests: line 196: shopt: cannot set and unset shell options simultaneously
+./errors.tests: line 199: read: var: invalid timeout specification
+./errors.tests: line 202: read: `/bin/sh': not a valid identifier
+./errors.tests: line 205: VAR: readonly variable
+./errors.tests: line 208: readonly: -x: invalid option
readonly: usage: readonly [-anf] [name[=value] ...] or readonly -p
-./errors.tests: line 208: eval: -i: invalid option
+./errors.tests: line 211: eval: -i: invalid option
eval: usage: eval [arg ...]
-./errors.tests: line 209: command: -i: invalid option
+./errors.tests: line 212: command: -i: invalid option
command: usage: command [-pVv] command [arg ...]
-./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
-./errors.tests: line 1: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
-./errors.tests: line 216: trap: NOSIG: invalid signal specification
-./errors.tests: line 219: trap: -s: invalid option
+./errors.tests: line 215: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 216: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 219: trap: NOSIG: invalid signal specification
+./errors.tests: line 222: trap: -s: invalid option
trap: usage: trap [arg] [signal_spec ...] or trap -l
-./errors.tests: line 225: return: can only `return' from a function or sourced script
-./errors.tests: line 229: break: 0: loop count out of range
-./errors.tests: line 233: continue: 0: loop count out of range
-./errors.tests: line 238: builtin: bash: not a shell builtin
-./errors.tests: line 242: bg: no job control
-./errors.tests: line 243: fg: no job control
-./errors.tests: line 246: kill: -s: option requires an argument
-./errors.tests: line 248: kill: S: invalid signal specification
-./errors.tests: line 250: kill: `': not a pid or valid job spec
+./errors.tests: line 228: return: can only `return' from a function or sourced script
+./errors.tests: line 232: break: 0: loop count out of range
+./errors.tests: line 236: continue: 0: loop count out of range
+./errors.tests: line 241: builtin: bash: not a shell builtin
+./errors.tests: line 245: bg: no job control
+./errors.tests: line 246: fg: no job control
+./errors.tests: line 249: kill: -s: option requires an argument
+./errors.tests: line 251: kill: S: invalid signal specification
+./errors.tests: line 253: kill: `': not a pid or valid job spec
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
-./errors.tests: line 255: set: trackall: invalid option name
-./errors.tests: line 262: `!!': not a valid identifier
+./errors.tests: line 258: set: trackall: invalid option name
+./errors.sub: line 5: let: x=: syntax error: operand expected (error token is "=")
+./errors.tests: line 266: read_i: readonly variable
+./errors.tests: line 272: read_i: readonly variable
+./errors.tests: line 281: `!!': not a valid identifier
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/errors.sub cvs/tests/errors.sub
--- bash-2.05b/tests/errors.sub 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/errors.sub 2002-08-31 04:31:18.000000000 +0200
@@ -0,0 +1,10 @@
+# $Id: errors.sub,v 1.1 2002/08/31 02:31:18 rocky Exp $
+# This file is intended to be sourced.
+# Let's make sure we report the right file name in the error below:
+set +xv
+let x=
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/errors.tests cvs/tests/errors.tests
--- bash-2.05b/tests/errors.tests 2001-08-10 00:26:49.000000000 +0200
+++ cvs/tests/errors.tests 2002-09-12 22:09:08.000000000 +0200
@@ -1,3 +1,6 @@
+#!../bash
+# $Id: errors.tests,v 1.3 2002/09/12 20:09:08 rockyb Exp $
+
# These should all be safe
LC_ALL=C
LC_CTYPE=C
@@ -254,6 +257,22 @@
# bad shell option names
set -o trackall # bash is not ksh
+# Check errors in sourced code
+source ./errors.sub
+
+# Test error messages in for loops blow.
+declare -ir read_i=10
+declare -ir read_j=20
+for read_i in 1 2 ; do
+ y=1
+ for read_j in 0 ; do
+ echo $read_i
+ done
+done
+for (( read_i=1; read_i<=2; read_i++ )) ; do
+ y=i
+done
+
# this must be last!
# in posix mode, a function name must be a valid identifier
# this can't go in posix2.tests, since it causes the shell to exit
@@ -263,3 +282,8 @@
set +o posix
echo end
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/func.right cvs/tests/func.right
--- bash-2.05b/tests/func.right 2001-02-21 17:49:01.000000000 +0100
+++ cvs/tests/func.right 2002-09-13 21:24:50.000000000 +0200
@@ -18,7 +18,7 @@
AVAR
5
5
-f1
+f1 52 ./func.tests
f1 ()
{
( return 5 );
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/heredoc.right cvs/tests/heredoc.right
--- bash-2.05b/tests/heredoc.right 1997-02-21 19:53:20.000000000 +0100
+++ cvs/tests/heredoc.right 2002-12-07 14:02:17.000000000 +0100
@@ -17,6 +17,7 @@
abc
def ghi
jkl mno
+LINENO is: 85
fff is a function
fff ()
{
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/heredoc.tests cvs/tests/heredoc.tests
--- bash-2.05b/tests/heredoc.tests 1997-04-17 18:03:15.000000000 +0200
+++ cvs/tests/heredoc.tests 2002-12-07 14:02:17.000000000 +0100
@@ -82,6 +82,8 @@
aa=1
}
+echo "LINENO is: $LINENO"
+
type fff
export -f fff
${THIS_SH} -c 'type fff'
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/history.right cvs/tests/history.right
--- bash-2.05b/tests/history.right 2002-03-25 15:45:36.000000000 +0100
+++ cvs/tests/history.right 2003-05-30 05:35:50.000000000 +0200
@@ -35,7 +35,9 @@
echo $BASH_VERSION
echo line for history
displaying $HISTFILE after history -a
+
echo line for history
+
HISTFILE=/tmp/newhistory
1 for i in one two three; do echo $i; done
2 /bin/sh -c 'echo this is $0'
@@ -45,13 +47,21 @@
6 HISTFILE=/tmp/newhistory
7 echo displaying \$HISTFILE after history -a
8 cat $HISTFILE
+
for i in one two three; do echo $i; done
+
/bin/sh -c 'echo this is $0'
+
ls
+
echo $BASH_VERSION
+
echo line for history
+
HISTFILE=/tmp/newhistory
+
echo displaying \$HISTFILE after history -a
+
cat $HISTFILE
1 for i in one two three; do echo $i; done
2 /bin/sh -c 'echo this is $0'
@@ -90,22 +100,24 @@
13 # created
14 set -H
15 echo line 2 for history
-16 unset HISTSIZE
-17 unset HISTFILE
+16 # Check that history uses HISTIMEFORMAT
+17 export HISTTIMEFORMAT="%% F%tOO "
+18 unset HISTSIZE
+19 unset HISTFILE
4 echo $BASH_VERSION
5 echo line for history
6 HISTFILE=/tmp/newhistory
7 echo displaying \$HISTFILE after history -a
8 cat $HISTFILE
-./history.tests: line 73: fc: history specification out of range
- 14 set -H
- 15 echo line 2 for history
- 16 unset HISTSIZE
- 17 unset HISTFILE
+./history.tests: line 76: fc: history specification out of range
+ 16 % F OO # Check that history uses HISTIMEFORMAT
+ 17 % F OO export HISTTIMEFORMAT="%% F%tOO "
+ 18 % F OO unset HISTSIZE
+ 19 % F OO unset HISTFILE
aa ab ac
echo xx xb xc
xx xb xc
echo 44 48 4c
44 48 4c
-./history.tests: line 88: fc: no command found
+./history.tests: line 91: fc: no command found
1
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/history.tests cvs/tests/history.tests
--- bash-2.05b/tests/history.tests 2001-11-21 19:15:07.000000000 +0100
+++ cvs/tests/history.tests 2003-05-30 05:35:50.000000000 +0200
@@ -64,6 +64,9 @@
!!
!e
+# Check that history uses HISTIMEFORMAT
+export HISTTIMEFORMAT="%% F%tOO "
+
unset HISTSIZE
unset HISTFILE
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-all cvs/tests/run-all
--- bash-2.05b/tests/run-all 1999-10-08 17:07:46.000000000 +0200
+++ cvs/tests/run-all 2002-11-14 15:03:37.000000000 +0100
@@ -1,4 +1,11 @@
-#! /bin/sh
+#!../bash
+#$Id: run-all,v 1.4 2002/11/14 14:03:37 rockyb Exp $
+
+if [ -z "$*" ] ; then
+ TESTS=run-*
+else
+ TESTS=$*
+fi
PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
export PATH
@@ -17,12 +24,12 @@
echo Any output from any test, unless otherwise noted, indicates a possible anomaly
-for x in run-*
+for x in $TESTS
do
case $x in
$0|run-minimal|run-gprof) ;;
*.orig|*~) ;;
- *) echo $x ; sh $x ;;
+ *) echo $x ; ${THIS_SH} $x ;;
esac
done
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-dbg-is-fn cvs/tests/run-dbg-is-fn
--- bash-2.05b/tests/run-dbg-is-fn 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/run-dbg-is-fn 2003-08-22 10:18:58.000000000 +0200
@@ -0,0 +1,12 @@
+#!../bash
+#$Id: run-dbg-is-fn,v 1.4 2003/08/19 14:14:38 rockyb Exp $
+
+. ./check_common
+TEST_NAME='dbg-is-fn'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > ${TEST_FILE} 2>&1 < /dev/null
+check_output ${TEST_FILE} ${TEST_NAME}.right
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-dbg-multicmd cvs/tests/run-dbg-multicmd
--- bash-2.05b/tests/run-dbg-multicmd 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/run-dbg-multicmd 2003-08-09 04:40:44.000000000 +0200
@@ -0,0 +1,16 @@
+#!../bash
+#$Id: run-dbg-multicmd,v 1.2 2003/08/09 02:40:44 rockyb Exp $
+
+. ./check_common
+TEST_NAME='dbg-multicmd'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-dbg-support cvs/tests/run-dbg-support
--- bash-2.05b/tests/run-dbg-support 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/run-dbg-support 2003-08-09 04:40:44.000000000 +0200
@@ -0,0 +1,16 @@
+#!../bash
+#$Id: run-dbg-support,v 1.6 2003/08/09 02:40:44 rockyb Exp $
+
+. ./check_common
+TEST_NAME='dbg-support'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-dbg-support2 cvs/tests/run-dbg-support2
--- bash-2.05b/tests/run-dbg-support2 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/run-dbg-support2 2003-08-09 04:40:44.000000000 +0200
@@ -0,0 +1,16 @@
+#!../bash
+#$Id: run-dbg-support2,v 1.4 2003/08/09 02:40:44 rockyb Exp $
+
+. ./check_common
+TEST_NAME='dbg-support2'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-heredoc cvs/tests/run-heredoc
--- bash-2.05b/tests/run-heredoc 1996-09-11 21:12:50.000000000 +0200
+++ cvs/tests/run-heredoc 2003-08-09 04:40:44.000000000 +0200
@@ -1,2 +1,17 @@
-${THIS_SH} ./heredoc.tests > /tmp/xx 2>&1
-diff /tmp/xx heredoc.right && rm -f /tmp/xx
+#!../bash
+#$Id: run-heredoc,v 1.3 2003/08/09 02:40:44 rockyb Exp $
+
+. ./check_common
+TEST_NAME='heredoc'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-histexpand cvs/tests/run-histexpand
--- bash-2.05b/tests/run-histexpand 1997-07-03 17:51:55.000000000 +0200
+++ cvs/tests/run-histexpand 2003-05-24 22:45:25.000000000 +0200
@@ -1,4 +1,13 @@
+#!../bash
+#$Id: run-histexpand,v 1.2 2003/05/24 20:45:25 rockyb Exp $
+THIS_SH=../bash
+TEST_NAME='histexp'
+TEST_FILE="/tmp/${TEST_NAME}.check"
echo "warning: all of these tests will fail if history has not been compiled" >&2
echo "warning: into the shell" >&2
-${THIS_SH} ./histexp.tests > /tmp/xx 2>&1
-diff /tmp/xx histexp.right && rm -f /tmp/xx
+export HISTTIMEFORMAT=''
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1
+diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-history cvs/tests/run-history
--- bash-2.05b/tests/run-history 1997-03-06 22:08:53.000000000 +0100
+++ cvs/tests/run-history 2003-05-24 22:45:25.000000000 +0200
@@ -1,4 +1,14 @@
+#!../bash
+#$Id: run-history,v 1.2 2003/05/24 20:45:25 rockyb Exp $
+THIS_SH=../bash
+TEST_NAME='history'
+TEST_FILE="/tmp/${TEST_NAME}.check"
echo "warning: all of these tests will fail if history has not been compiled" >&2
echo "warning: into the shell" >&2
-${THIS_SH} ./history.tests > /tmp/xx 2>&1
-diff /tmp/xx history.right && rm -f /tmp/xx
+export HISTTIMEFORMAT=''
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1
+diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-set-x cvs/tests/run-set-x
--- bash-2.05b/tests/run-set-x 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/run-set-x 2003-08-09 04:40:44.000000000 +0200
@@ -0,0 +1,16 @@
+#!../bash
+#$Id: run-set-x,v 1.2 2003/08/09 02:40:44 rockyb Exp $
+
+. ./check_common
+TEST_NAME='set-x'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-shopt cvs/tests/run-shopt
--- bash-2.05b/tests/run-shopt 1997-11-14 20:37:47.000000000 +0100
+++ cvs/tests/run-shopt 2003-08-22 10:19:03.000000000 +0200
@@ -1,2 +1,12 @@
-${THIS_SH} ./shopt.tests > /tmp/xx 2>&1
-diff /tmp/xx shopt.right && rm -f /tmp/xx
+#!../bash
+#$Id: run-shopt,v 1.2 2003/08/19 14:14:38 rockyb Exp $
+
+. ./check_common
+TEST_NAME='shopt'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > ${TEST_FILE} 2>&1 < /dev/null
+check_output ${TEST_FILE} ${TEST_NAME}.right
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-trap cvs/tests/run-trap
--- bash-2.05b/tests/run-trap 1997-12-16 16:31:51.000000000 +0100
+++ cvs/tests/run-trap 2003-08-09 04:40:44.000000000 +0200
@@ -1,6 +1,16 @@
-echo "warning: UNIX versions number signals differently. If output differing" >&2
-echo "warning: only in line numbers is produced, please do not consider this" >&2
-echo "warning: a test failure." >&2
+#!../bash
+#$Id: run-trap,v 1.3 2003/08/09 02:40:44 rockyb Exp $
-${THIS_SH} ./trap.tests > /tmp/xx 2>&1
-diff /tmp/xx trap.right && rm -f /tmp/xx
+. ./check_common
+TEST_NAME='trap'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/run-type cvs/tests/run-type
--- bash-2.05b/tests/run-type 1997-02-24 20:26:51.000000000 +0100
+++ cvs/tests/run-type 2003-08-09 04:40:44.000000000 +0200
@@ -1,2 +1,16 @@
-${THIS_SH} ./type.tests > /tmp/xx 2>&1
-diff /tmp/xx type.right && rm -f /tmp/xx
+#!../bash
+#$Id: run-type,v 1.4 2003/08/09 02:40:44 rockyb Exp $
+
+. ./check_common
+TEST_NAME='type'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -o noglob
+check_output $TEST_FILE ${TEST_NAME}.right
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/set-x.right cvs/tests/set-x.right
--- bash-2.05b/tests/set-x.right 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/set-x.right 2002-12-09 14:12:37.000000000 +0100
@@ -0,0 +1,28 @@
++ (( i=0 ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ for i in 0 1 2
++ x=i
++ for i in 0 1 2
++ x=i
++ for i in 0 1 2
++ x=i
++ case x in
++ x=i
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/set-x.tests cvs/tests/set-x.tests
--- bash-2.05b/tests/set-x.tests 1970-01-01 01:00:00.000000000 +0100
+++ cvs/tests/set-x.tests 2002-12-09 14:12:37.000000000 +0100
@@ -0,0 +1,21 @@
+#!../bash
+# $Id: set-x.tests,v 1.1 2002/12/09 13:12:37 rockyb Exp $
+#
+# Test that "set -x" shows what we think it should.
+#
+set -x
+for ((i=0; i<=5; i++ )) ; do
+ x=0
+done
+for i in 0 1 2 ; do
+ x=i
+done
+case x in
+ 0) x=i ;;
+ *) x=i ;;
+esac
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/shopt.right cvs/tests/shopt.right
--- bash-2.05b/tests/shopt.right 2002-03-25 15:51:01.000000000 +0100
+++ cvs/tests/shopt.right 2003-08-22 10:19:07.000000000 +0200
@@ -86,6 +86,8 @@
set -o braceexpand
set -o emacs
set +o errexit
+set +o errtrace
+set +o fntrace
set -o hashall
set -o histexpand
set -o history
@@ -111,6 +113,8 @@
braceexpand on
emacs on
errexit off
+errtrace off
+fntrace off
hashall on
histexpand on
history on
@@ -136,6 +140,8 @@
set -o braceexpand
set -o emacs
set +o errexit
+set +o errtrace
+set +o fntrace
set -o hashall
set -o histexpand
set -o history
@@ -171,6 +177,8 @@
--
set +o allexport
set +o errexit
+set +o errtrace
+set +o fntrace
set +o ignoreeof
set +o keyword
set +o noclobber
@@ -188,6 +196,8 @@
--
allexport off
errexit off
+errtrace off
+fntrace off
ignoreeof off
keyword off
noclobber off
@@ -205,3 +215,4 @@
--
./shopt.tests: line 93: shopt: xyz1: invalid shell option name
./shopt.tests: line 94: shopt: xyz1: invalid option name
+./shopt.tests: line 98: shift: shift count out of range
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/shopt.tests cvs/tests/shopt.tests
--- bash-2.05b/tests/shopt.tests 1999-09-21 17:49:32.000000000 +0200
+++ cvs/tests/shopt.tests 2003-08-22 10:19:08.000000000 +0200
@@ -92,3 +92,7 @@
builtin printf -- "--\n"
shopt -p xyz1
shopt -o -p xyz1
+
+# bash 2.05b causes a segfault for the below
+shopt -s shift_verbose
+shift
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/trap.right cvs/tests/trap.right
--- bash-2.05b/tests/trap.right 2002-03-14 19:24:09.000000000 +0100
+++ cvs/tests/trap.right 2002-11-19 21:55:41.000000000 +0100
@@ -29,6 +29,7 @@
[28] debug
./trap.tests[33] debug
./trap.tests[34] debug
+func2[30] debug
func2[31] debug
func2debug line
./trap.tests[36] debug
@@ -68,6 +69,5 @@
trap -- 'echo caught a child death' SIGCHLD
trap -- 'echo exiting' EXIT
trap -- 'echo aborting' SIGABRT
-trap -- 'echo caught a child death' SIGCHLD
trap -- '' SIGUSR2
exiting
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/tests/trap.tests cvs/tests/trap.tests
--- bash-2.05b/tests/trap.tests 2002-03-12 15:43:25.000000000 +0100
+++ cvs/tests/trap.tests 2002-11-19 21:55:41.000000000 +0100
@@ -81,6 +81,6 @@
# Now reset some of the signals the shell handles specially back to
# their default values (with or without the SIG prefix)
-trap SIGINT QUIT TERM
+trap SIGINT QUIT TERM CHLD
trap
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/trap.c cvs/trap.c
--- bash-2.05b/trap.c 2002-03-14 17:50:20.000000000 +0100
+++ cvs/trap.c 2003-02-17 23:01:59.000000000 +0100
@@ -1,7 +1,7 @@
/* trap.c -- Not the trap command, but useful functions for manipulating
those objects. The trap command is in builtins/trap.def. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -36,6 +36,7 @@
#include "shell.h"
#include "input.h" /* for save_token_state, restore_token_state */
#include "signames.h"
+#include "flags.h"
#include "builtins.h"
#include "builtins/common.h"
#include "builtins/builtext.h"
@@ -44,6 +45,9 @@
extern int errno;
#endif
+extern char *this_command_name;
+extern int subshell_level;
+
/* Flags which describe the current handling state of a signal. */
#define SIG_INHERITED 0x0 /* Value inherited from parent. */
#define SIG_TRAPPED 0x1 /* Currently trapped. */
@@ -54,7 +58,7 @@
#define SIG_CHANGED 0x20 /* Trap value changed in trap handler. */
#define SIG_IGNORED 0x40 /* The signal is currently being ignored. */
-#define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP)
+#define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP || (s) == RETURN_TRAP)
/* An array of such flags, one for each signal, describing what the
shell will do with a signal. DEBUG_TRAP == NSIG; some code below
@@ -66,7 +70,7 @@
static void get_original_signal __P((int));
-static void _run_trap_internal __P((int, char *));
+static int _run_trap_internal __P((int, char *));
static void reset_signal __P((int));
static void restore_signal __P((int));
@@ -99,11 +103,6 @@
trap command (e.g., when `return' is executed in the trap command). */
int running_trap;
-/* The value of line_number when the trap started executing, since
- parse_and_execute resets it to 1 and the trap command might want
- it. */
-int trap_line_number;
-
/* The (trapped) signal received while executing in the `wait' builtin */
int wait_signal_received;
@@ -289,7 +288,7 @@
else
{
token_state = save_token_state ();
- parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST);
+ parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST, 0);
restore_token_state (token_state);
free (token_state);
}
@@ -344,16 +343,26 @@
SIGRETURN (0);
}
+#define make_set_generic_trap_fn(fn, trap_name) \
+ void \
+ fn (command) \
+ char *command; \
+ { \
+ set_signal (trap_name, command); \
+ }
+
+
+#ifdef INCLUDE_UNUSED
+/* Set up COMMAND parameter to get executed when a SIGINT signal is
+ received. */
+make_set_generic_trap_fn(set_sigint_trap, SIGINT)
+#endif
+
#if defined (JOB_CONTROL) && defined (SIGCHLD)
#ifdef INCLUDE_UNUSED
-/* Make COMMAND_STRING be executed when SIGCHLD is caught. */
-void
-set_sigchld_trap (command_string)
- char *command_string;
-{
- set_signal (SIGCHLD, command_string);
-}
+/* Set up COMMAND parameter to get executed when a SIGCHLD event occurs. */
+make_set_generic_trap_fn(set_sigchld_trap, SIGCHLD)
#endif
/* Make COMMAND_STRING be executed when SIGCHLD is caught iff the current
@@ -367,28 +376,9 @@
}
#endif /* JOB_CONTROL && SIGCHLD */
-void
-set_debug_trap (command)
- char *command;
-{
- set_signal (DEBUG_TRAP, command);
-}
-
-void
-set_error_trap (command)
- char *command;
-{
- set_signal (ERROR_TRAP, command);
-}
-
-#ifdef INCLUDE_UNUSED
-void
-set_sigint_trap (command)
- char *command;
-{
- set_signal (SIGINT, command);
-}
-#endif
+make_set_generic_trap_fn(set_debug_trap, DEBUG_TRAP)
+make_set_generic_trap_fn(set_error_trap, ERROR_TRAP)
+make_set_generic_trap_fn(set_return_trap, RETURN_TRAP)
/* Reset the SIGINT handler so that subshells that are doing `shellsy'
things, like waiting for command substitution or executing commands
@@ -628,7 +618,7 @@
if (code == 0)
{
reset_parser ();
- parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST);
+ parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST, 0);
}
else if (code == EXITPROG)
return (last_command_exit_value);
@@ -648,13 +638,14 @@
/* Run a trap command for SIG. SIG is one of the signals the shell treats
specially. */
-static void
+static int
_run_trap_internal (sig, tag)
int sig;
char *tag;
{
char *trap_command, *old_trap;
int old_exit_value, *token_state;
+ int trap_exit_value = 0;
/* Run the trap only if SIG is trapped and not ignored, and we are not
currently executing in the trap handler. */
@@ -662,6 +653,7 @@
(trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER) &&
((sigmodes[sig] & SIG_INPROGRESS) == 0))
{
+ this_command_name="trap";
old_trap = trap_list[sig];
sigmodes[sig] |= SIG_INPROGRESS;
sigmodes[sig] &= ~SIG_CHANGED; /* just to be sure */
@@ -669,15 +661,19 @@
running_trap = sig + 1;
old_exit_value = last_command_exit_value;
- /* Need to copy the value of line_number because parse_and_execute
- resets it to 1, and the trap command might want it. */
- trap_line_number = line_number;
token_state = save_token_state ();
- parse_and_execute (trap_command, tag, SEVAL_NONINT|SEVAL_NOHIST);
+ parse_and_execute (trap_command, tag, SEVAL_NONINT|SEVAL_NOHIST, 0);
restore_token_state (token_state);
free (token_state);
+ trap_exit_value = last_command_exit_value;
+#if 0 /* DEBUGGING ONLY */
+ if (trap_exit_value != 0) {
+ printf("---debug: Nonzero:\n");
+ }
+#endif
+
last_command_exit_value = old_exit_value;
running_trap = 0;
@@ -685,23 +681,56 @@
if (sigmodes[sig] & SIG_CHANGED)
{
+#ifdef RETURN_TRAP_FIXED
free (old_trap);
+#else
+ if (sig != RETURN_TRAP) free (old_trap);
+#endif
+
sigmodes[sig] &= ~SIG_CHANGED;
}
}
+ return trap_exit_value;
}
-void
+extern int return_catch_flag, return_catch_value;
+
+/* Run's "trap fn ... DEBUG". The return value is the value returned by
+ fn. However if this value is 2 then we force a "return" */
+int
run_debug_trap ()
{
- if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0))
- _run_trap_internal (DEBUG_TRAP, "debug trap");
+ int trap_exit_value = 0;
+ if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED)
+ && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0)) {
+
+ trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap");
+ if (trap_exit_value==2&& return_catch_flag)
+ longjmp (return_catch, 1);
+ }
+
+ return trap_exit_value;
+}
+
+/* Run "trap *fn-name* ... RETURN" function if it has been set. */
+void
+run_return_trap ()
+{
+ if ((sigmodes[RETURN_TRAP] & SIG_TRAPPED)
+ && (sigmodes[RETURN_TRAP] & SIG_INPROGRESS) == 0) {
+ int old_exit_value = last_command_exit_value;
+ _run_trap_internal (RETURN_TRAP, "return trap");
+ last_command_exit_value = old_exit_value;
+ }
+
}
+/* Run "trap *fn-name* ... ERROR" function if it has been set. */
void
run_error_trap ()
{
- if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED) && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0)
+ if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED)
+ && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0)
_run_trap_internal (ERROR_TRAP, "error trap");
}
@@ -779,8 +808,10 @@
/* Command substitution and other child processes don't inherit the
debug or error traps. */
- sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED;
- sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED;
+ if (!function_trace_mode)
+ sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED;
+ if (!error_trace_mode)
+ sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED;
}
/* Reset trapped signals to their original values, but don't free the
@@ -833,26 +864,19 @@
return (0);
}
-int
-signal_is_trapped (sig)
- int sig;
-{
- return (sigmodes[sig] & SIG_TRAPPED);
-}
-int
-signal_is_special (sig)
- int sig;
-{
- return (sigmodes[sig] & SIG_SPECIAL);
-}
+#define make_signal_is_xxx_fn(fn, sigmask) \
+ int \
+ fn (sig) \
+ int sig; \
+ { \
+ return (sigmodes[sig] & sigmask); \
+ } \
-int
-signal_is_ignored (sig)
- int sig;
-{
- return (sigmodes[sig] & SIG_IGNORED);
-}
+
+make_signal_is_xxx_fn(signal_is_trapped, SIG_TRAPPED)
+make_signal_is_xxx_fn(signal_is_special, SIG_SPECIAL)
+make_signal_is_xxx_fn(signal_is_ignored, SIG_IGNORED)
void
set_signal_ignored (sig)
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/trap.h cvs/trap.h
--- bash-2.05b/trap.h 2001-05-23 18:35:06.000000000 +0200
+++ cvs/trap.h 2003-02-17 23:01:59.000000000 +0100
@@ -1,6 +1,6 @@
/* trap.h -- data structures used in the trap mechanism. */
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993,2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -39,10 +39,11 @@
/* Special shell trap names. */
#define DEBUG_TRAP NSIG
#define ERROR_TRAP NSIG+1
+#define RETURN_TRAP NSIG+2
#define EXIT_TRAP 0
/* system signals plus special bash traps */
-#define BASH_NSIG NSIG+2
+#define BASH_NSIG NSIG+4
#define signal_object_p(x) (decode_signal (x) != NO_SIG)
@@ -56,17 +57,43 @@
extern void initialize_traps __P((void));
extern void run_pending_traps __P((void));
extern void maybe_set_sigchld_trap __P((char *));
+
+/* Set up COMMAND parameter to get executed when a SIGINT signal is
+ received. */
+extern void set_sigint_trap __P((char *));
+
+/* Set up COMMAND parameter to get executed when a SIGCHLD event occurs. */
extern void set_sigchld_trap __P((char *));
+
+/* Set up COMMAND parameter to get executed when a DEBUG event occurs. */
extern void set_debug_trap __P((char *));
+
+/* Set up COMMAND parameter to get executed when an ERROR event occurs. */
extern void set_error_trap __P((char *));
-extern void set_sigint_trap __P((char *));
+
+/* Set up COMMAND parameter to get executed when a RETURN event occurs. */
+extern void set_return_trap __P((char *));
+
+/* Set SIG parameter to call STRING parameter as a command. */
extern void set_signal __P((int, char *));
+
extern void restore_default_signal __P((int));
extern void ignore_signal __P((int));
extern int run_exit_trap __P((void));
extern void run_trap_cleanup __P((int));
-extern void run_debug_trap __P((void));
+
+/* Run "trap *fn-name* ... DEBUG" function if it has been set. The
+ return value is that of the function (normally 0). If the value is
+ non-zero, the caller should not run the statement to be
+ executed. */
+extern int run_debug_trap __P((void));
+
+/* Run "trap *fn-name* ... ERROR" function if it has been set. */
extern void run_error_trap __P((void));
+
+/* Run "trap *fn-name* ... RETURN" function if it has been set. */
+extern void run_return_trap __P((void));
+
extern void free_trap_strings __P((void));
extern void reset_signal_handlers __P((void));
extern void restore_original_signals __P((void));
@@ -74,11 +101,23 @@
extern char *signal_name __P((int));
extern int decode_signal __P((char *));
+
+/* Run a trap set on SIGINT. This is called from throw_to_top_level (), and
+ declared here to localize the trap functions. */
extern void run_interrupt_trap __P((void));
+
extern int maybe_call_trap_handler __P((int));
+
+/* Return 1 if signal is currently trapped */
extern int signal_is_trapped __P((int));
+
+/* Return 1 if signal is currently ignored */
extern int signal_is_ignored __P((int));
+
+/* Return 1 if signal is currently special */
extern int signal_is_special __P((int));
+
+/* Make SIG parameter ignored */
extern void set_signal_ignored __P((int));
#endif /* _TRAP_H_ */
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/variables.c cvs/variables.c
--- bash-2.05b/variables.c 2002-06-25 15:43:33.000000000 +0200
+++ cvs/variables.c 2003-08-11 10:06:21.000000000 +0200
@@ -72,6 +72,7 @@
/* Variables used here and defined in other files. */
extern int posixly_correct;
extern int line_number;
+extern int subshell_level;
extern int subshell_environment, indirection_level;
extern int build_version, patch_level;
extern char *dist_version, *release_status;
@@ -81,6 +82,7 @@
extern sh_builtin_func_t *this_shell_builtin;
extern SHELL_VAR *this_shell_function;
extern char *this_command_name;
+extern char *the_printed_command_sans_trap;
extern time_t shell_start_time;
/* The list of shell variables that the user has created at the global
@@ -94,6 +96,9 @@
the environment. */
HASH_TABLE *shell_functions = (HASH_TABLE *)NULL;
+/* The list of function definitions */
+VAR_CONTEXT *function_defs = (VAR_CONTEXT *)NULL;
+
/* The current variable context. This is really a count of how deep into
executing functions we are. */
int variable_context = 0;
@@ -150,7 +155,11 @@
static SHELL_VAR *get_random __P((SHELL_VAR *));
static SHELL_VAR *assign_lineno __P((SHELL_VAR *, char *, arrayind_t));
+static SHELL_VAR *assign_subshell_level __P((SHELL_VAR *, char *, arrayind_t));
static SHELL_VAR *get_lineno __P((SHELL_VAR *));
+static SHELL_VAR *get_subshell_level __P((SHELL_VAR *));
+static SHELL_VAR *get_bash_lineno __P((SHELL_VAR *));
+static SHELL_VAR *get_bash_command __P((SHELL_VAR *));
#if defined (HISTORY)
static SHELL_VAR *get_histcmd __P((SHELL_VAR *));
@@ -164,9 +173,16 @@
#if defined (ARRAY_VARS)
static SHELL_VAR *get_groupset __P((SHELL_VAR *));
+static SHELL_VAR *init_bash_argc_var __P((void));
+static SHELL_VAR *init_bash_argv_var __P((void));
+static SHELL_VAR *init_bash_source_var __P((void));
+static SHELL_VAR *init_bash_lineno_var __P((void));
static SHELL_VAR *init_groups_var __P((void));
#endif
+static SHELL_VAR *get_bash_argc __P((SHELL_VAR *));
+static SHELL_VAR *get_bash_argv __P((SHELL_VAR *));
+static SHELL_VAR *get_bash_source __P((SHELL_VAR *));
static SHELL_VAR *get_funcname __P((SHELL_VAR *));
static SHELL_VAR *init_funcname_var __P((void));
@@ -239,6 +255,13 @@
if (shell_functions == 0)
shell_functions = hash_create (0);
+ if (function_defs == 0) {
+ function_defs = new_var_context ((char *) NULL, 0);
+ function_defs->scope = 0;
+ function_defs->table = hash_create (0);
+ }
+
+
for (string_index = 0; string = env[string_index++]; )
{
char_index = 0;
@@ -269,7 +292,7 @@
temp_string[char_index] = ' ';
strcpy (temp_string + char_index + 1, string);
- parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
+ parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST, 0);
/* Ancient backwards compatibility. Old versions of bash exported
functions like name()=() {...} */
@@ -404,6 +427,9 @@
/* Make a variable called BASH_VERSION which contains the version info. */
bind_variable ("BASH_VERSION", shell_version_string ());
+
+ bind_variable ("BASH_EXECUTION_STRING", command_execution_string);
+
#if defined (ARRAY_VARS)
make_vers_array ();
#endif
@@ -1039,16 +1065,22 @@
static unsigned long rseed = 1;
static int last_random_value;
-/* A linear congruential random number generator based on the example
- one in the ANSI C standard. This one isn't very good, but a more
- complicated one is overkill. */
+/* Use the random number genrator provided by the standard C library,
+ else use a linear congruential random number generator based on the
+ ANSI C standard. This one isn't very good (the values are alternately
+ odd and even, for example), but a more complicated one is overkill. */
/* Returns a pseudo-random number between 0 and 32767. */
static int
brand ()
{
+#if defined(HAVE_RANDOM)
+ rseed = (unsigned int) (labs(random()) & 32767);
+ return rseed;
+#else
rseed = rseed * 1103515245 + 12345;
return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */
+#endif
}
/* Set the random number generator seed to SEED. */
@@ -1056,8 +1088,12 @@
sbrand (seed)
unsigned long seed;
{
+#if defined(HAVE_SRANDOM)
+ srandom(seed);
+#else
rseed = seed;
last_random_value = 0;
+#endif
}
static SHELL_VAR *
@@ -1104,6 +1140,34 @@
}
static SHELL_VAR *
+assign_subshell_level (var, value, unused)
+ SHELL_VAR *var;
+ char *value;
+ arrayind_t unused;
+{
+ intmax_t new_value;
+
+ if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0)
+ new_value = 0;
+ subshell_level = new_value;
+ return var;
+}
+
+/* Function which returns the current line number. */
+static SHELL_VAR *
+get_subshell_level (var)
+ SHELL_VAR *var;
+{
+ char *p;
+ int ln;
+
+ p = itos (subshell_level);
+ FREE (value_cell (var));
+ var_setvalue (var, p);
+ return (var);
+}
+
+static SHELL_VAR *
assign_lineno (var, value, unused)
SHELL_VAR *var;
char *value;
@@ -1132,6 +1196,16 @@
return (var);
}
+/* Function which returns the current command executing. */
+static SHELL_VAR *
+get_bash_command (var)
+ SHELL_VAR *var;
+{
+ FREE (value_cell (var));
+ var_setvalue (var, savestring(the_printed_command_sans_trap));
+ return (var);
+}
+
#if defined (HISTORY)
static SHELL_VAR *
get_histcmd (var)
@@ -1208,6 +1282,59 @@
}
static SHELL_VAR *
+init_bash_argc_var ()
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("BASH_ARGC");
+ if (v)
+ return (v);
+ INIT_DYNAMIC_ARRAY_VAR ("BASH_ARGC", get_bash_argc, null_array_assign);
+ VSETATTR (v, att_invisible|att_noassign);
+ return v;
+}
+
+static SHELL_VAR *
+init_bash_argv_var ()
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("BASH_ARGV");
+ if (v)
+ return (v);
+ INIT_DYNAMIC_ARRAY_VAR ("BASH_ARGV", get_bash_argv, null_array_assign);
+ VSETATTR (v, att_invisible|att_noassign);
+ return v;
+}
+
+static SHELL_VAR *
+init_bash_source_var ()
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("BASH_SOURCE");
+ if (v)
+ return (v);
+ INIT_DYNAMIC_ARRAY_VAR ("BASH_SOURCE", get_bash_source, null_array_assign);
+ VSETATTR (v, att_invisible|att_noassign);
+ return v;
+}
+
+
+static SHELL_VAR *
+init_bash_lineno_var ()
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("BASH_LINENO");
+ if (v)
+ return (v);
+ INIT_DYNAMIC_ARRAY_VAR ("BASH_LINENO", get_bash_lineno, null_array_assign);
+ VSETATTR (v, att_invisible|att_noassign);
+ return v;
+}
+
+static SHELL_VAR *
init_groups_var ()
{
SHELL_VAR *v;
@@ -1222,16 +1349,38 @@
#endif /* ARRAY_VARS */
static SHELL_VAR *
+get_bash_argc (self)
+ SHELL_VAR *self;
+{
+ return (self);
+}
+
+static SHELL_VAR *
+get_bash_argv (self)
+ SHELL_VAR *self;
+{
+ return (self);
+}
+
+static SHELL_VAR *
+get_bash_source (self)
+ SHELL_VAR *self;
+{
+ return (self);
+}
+
+static SHELL_VAR *
+get_bash_lineno (self)
+ SHELL_VAR *self;
+{
+ return (self);
+}
+
+static SHELL_VAR *
get_funcname (self)
SHELL_VAR *self;
{
char *t;
- if (variable_context && this_shell_function)
- {
- FREE (value_cell (self));
- t = savestring (this_shell_function->name);
- var_setvalue (self, t);
- }
return (self);
}
@@ -1259,7 +1408,7 @@
v = find_variable ("FUNCNAME");
if (v)
return v;
- INIT_DYNAMIC_VAR ("FUNCNAME", (char *)NULL, get_funcname, null_assign);
+ INIT_DYNAMIC_ARRAY_VAR ("FUNCNAME", get_funcname, null_array_assign);
VSETATTR (v, att_invisible|att_noassign);
return v;
}
@@ -1271,6 +1420,10 @@
v = init_seconds_var ();
+ INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *) NULL, get_bash_command,
+ (sh_var_assign_func_t *) NULL);
+ INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell_level,
+ assign_subshell_level);
INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, assign_random);
INIT_DYNAMIC_VAR ("LINENO", (char *)NULL, get_lineno, assign_lineno);
@@ -1284,6 +1437,10 @@
#if defined (ARRAY_VARS)
v = init_groups_var ();
+ v = init_bash_argc_var ();
+ v = init_bash_argv_var ();
+ v = init_bash_source_var ();
+ v = init_bash_lineno_var ();
#endif
v = init_funcname_var ();
@@ -1376,6 +1533,15 @@
return (hash_lookup (name, shell_functions));
}
+/* Look up the function definition whose name matches STRING.
+ Returns the entry or NULL. */
+FUNCTION_DEF *
+find_function_def (name)
+ char *name;
+{
+ return (FUNCTION_DEF *) (var_lookup (name, function_defs));
+}
+
/* Return the value of VAR. VAR is assumed to have been the result of a
lookup without any subscript, if arrays are compiled into the shell. */
char *
@@ -1631,6 +1797,31 @@
return retval;
}
+/* Bind a variable NAME to VALUE. This conses up the name
+ and value strings. */
+void
+bind_function_def (name, value)
+ char *name;
+ FUNCTION_DEF *value;
+{
+ char *newval;
+ FUNCTION_DEF *entry;
+
+ entry = find_function_def(name);
+ if (!entry)
+ {
+ BUCKET_CONTENTS *elt;
+ FUNCTION_DEF *new_def = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF));
+
+ FASTCOPY ((char *)value, (char *)new_def, sizeof (FUNCTION_DEF));
+ elt = hash_insert (savestring (name), function_defs->table, HASH_NOSRCH);
+ elt->data = (PTR_T *) new_def;
+ }
+ else {
+ /* It's already there. Right now we are tacitly ignoring the bind. */
+ }
+}
+
/* Bind a variable NAME to VALUE in the HASH_TABLE TABLE, which may be the
temporary environment (but usually is not). */
static SHELL_VAR *
@@ -3297,10 +3488,67 @@
sv_ifs ("IFS"); /* XXX here for now */
}
+/* Save argument list in shell arrays BASH_ARGV and put count in BASH_ARGC. */
+void
+push_args (list)
+ WORD_LIST *list;
+{
+ SHELL_VAR *bash_argv_var = find_variable ("BASH_ARGV");
+ ARRAY *bash_argv_a = array_cell (bash_argv_var);
+ SHELL_VAR *bash_argc_var = find_variable ("BASH_ARGC");
+ ARRAY *bash_argc_a = array_cell (bash_argc_var);
+
+ WORD_LIST *l;
+ arrayind_t i=0;
+
+ if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots)
+ {
+ dollar_arg_stack = (WORD_LIST **)
+ xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10)
+ * sizeof (WORD_LIST **));
+ }
+
+ /* Add $* to the BASH_ARGV array and the count to the BASH_ARGC array. */
+ for (l=list; l; l = l->next, i++)
+ array_shift_element(bash_argv_a, savestring(l->word->word));
+ array_shift_element(bash_argc_a, itos(i));
+}
+
+
+/* Remove argument list from shell arrays BASH_ARGV. How many to remove
+ is taken from the count from BASH_ARGC, and the count is popped from
+ that array. */
+void
+pop_args (void)
+{
+ SHELL_VAR *bash_argv_var = find_variable ("BASH_ARGV");
+ ARRAY *bash_argv_a = array_cell (bash_argv_var);
+ SHELL_VAR *bash_argc_var = find_variable ("BASH_ARGC");
+ ARRAY *bash_argc_a = array_cell (bash_argc_var);
+ ARRAY_ELEMENT *ce = array_unshift_element(bash_argc_a);
+
+ intmax_t i;
+
+ if (ce == NULL || legal_number (value_cell(ce), &i) == 0)
+ i=0;
+
+ /* Get rid of $* elements from the BASH_ARGV array and the count
+ from the BASH_ARGC array. */
+ for ( ; i > 0; i-- )
+ array_dispose_element(array_unshift_element(bash_argv_a));
+
+ array_dispose_element(ce);
+}
+
/* Save the existing positional parameters on a stack. */
void
push_dollar_vars ()
{
+ SHELL_VAR *bash_argv_var = find_variable ("BASH_ARGV");
+ ARRAY *bash_argv_a = array_cell (bash_argv_var);
+ SHELL_VAR *bash_argc_var = find_variable ("BASH_ARGC");
+ ARRAY *bash_argc_a = array_cell (bash_argc_var);
+
if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots)
{
dollar_arg_stack = (WORD_LIST **)
@@ -3319,6 +3567,7 @@
return;
remember_args (dollar_arg_stack[--dollar_arg_stack_index], 1);
+
dispose_words (dollar_arg_stack[dollar_arg_stack_index]);
dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;
set_dollar_vars_unchanged ();
diff -ur --unidirectional-new-file --exclude CVS --exclude=.cvsignore bash-2.05b/variables.h cvs/variables.h
--- bash-2.05b/variables.h 2002-03-12 16:17:33.000000000 +0100
+++ cvs/variables.h 2002-10-10 14:34:01.000000000 +0200
@@ -201,6 +201,7 @@
extern int variable_context;
extern char *dollar_vars[];
+
extern char **export_env;
extern void initialize_shell_variables __P((char **, int));
@@ -214,12 +215,14 @@
extern SHELL_VAR *var_lookup __P((const char *, VAR_CONTEXT *));
extern SHELL_VAR *find_function __P((const char *));
+extern FUNCTION_DEF *find_function_def __P((char *));
extern SHELL_VAR *find_variable __P((const char *));
extern SHELL_VAR *find_variable_internal __P((const char *, int));
extern SHELL_VAR *find_tempenv_variable __P((const char *));
extern SHELL_VAR *copy_variable __P((SHELL_VAR *));
extern SHELL_VAR *make_local_variable __P((const char *));
extern SHELL_VAR *bind_variable __P((const char *, char *));
+extern void bind_function_def __P((char *, FUNCTION_DEF *));
extern SHELL_VAR *bind_function __P((const char *, COMMAND *));
extern SHELL_VAR **map_over __P((sh_var_map_func_t *, VAR_CONTEXT *));
@@ -268,6 +271,8 @@
extern void pop_context __P((void));
extern void push_dollar_vars __P((void));
extern void pop_dollar_vars __P((void));
+extern void push_args __P((WORD_LIST *));
+extern void pop_args __P((void));
extern void dispose_saved_dollar_vars __P((void));
extern void adjust_shell_level __P((int));
Only in bash-2.05b: y.tab.c
Only in bash-2.05b: y.tab.h
|