summaryrefslogtreecommitdiffstats
path: root/contrib/gdb/gdb/doc/gdb.info-3
blob: ada53b48bb5f0878b90839af57f451fdb7a17740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
This is gdb.info, produced by makeinfo version 4.6 from ./gdb.texinfo.

INFO-DIR-SECTION Software development
START-INFO-DIR-ENTRY
* Gdb: (gdb).                     The GNU debugger.
END-INFO-DIR-ENTRY

   This file documents the GNU debugger GDB.

   This is the Ninth Edition, of `Debugging with GDB: the GNU
Source-Level Debugger' for GDB Version 6.1.1.

   Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1998,
1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.

   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 "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."


File: gdb.info,  Node: Searching,  Prev: Readline Arguments,  Up: Readline Interaction

Searching for Commands in the History
-------------------------------------

Readline provides commands for searching through the command history
for lines containing a specified string.  There are two search modes:
"incremental" and "non-incremental".

   Incremental searches begin before the user has finished typing the
search string.  As each character of the search string is typed,
Readline displays the next entry from the history matching the string
typed so far.  An incremental search requires only as many characters
as needed to find the desired history entry.  To search backward in the
history for a particular string, type `C-r'.  Typing `C-s' searches
forward through the history.  The characters present in the value of
the `isearch-terminators' variable are used to terminate an incremental
search.  If that variable has not been assigned a value, the <ESC> and
`C-J' characters will terminate an incremental search.  `C-g' will
abort an incremental search and restore the original line.  When the
search is terminated, the history entry containing the search string
becomes the current line.

   To find other matching entries in the history list, type `C-r' or
`C-s' as appropriate.  This will search backward or forward in the
history for the next entry matching the search string typed so far.
Any other key sequence bound to a Readline command will terminate the
search and execute that command.  For instance, a <RET> will terminate
the search and accept the line, thereby executing the command from the
history list.  A movement command will terminate the search, make the
last line found the current line, and begin editing.

   Readline remembers the last incremental search string.  If two
`C-r's are typed without any intervening characters defining a new
search string, any remembered search string is used.

   Non-incremental searches read the entire search string before
starting to search for matching history lines.  The search string may be
typed by the user or be part of the contents of the current line.


File: gdb.info,  Node: Readline Init File,  Next: Bindable Readline Commands,  Prev: Readline Interaction,  Up: Command Line Editing

Readline Init File
==================

Although the Readline library comes with a set of Emacs-like
keybindings installed by default, it is possible to use a different set
of keybindings.  Any user can customize programs that use Readline by
putting commands in an "inputrc" file, conventionally in his home
directory.  The name of this file is taken from the value of the
environment variable `INPUTRC'.  If that variable is unset, the default
is `~/.inputrc'.

   When a program which uses the Readline library starts up, the init
file is read, and the key bindings are set.

   In addition, the `C-x C-r' command re-reads this init file, thus
incorporating any changes that you might have made to it.

* Menu:

* Readline Init File Syntax::	Syntax for the commands in the inputrc file.

* Conditional Init Constructs::	Conditional key bindings in the inputrc file.

* Sample Init File::		An example inputrc file.


File: gdb.info,  Node: Readline Init File Syntax,  Next: Conditional Init Constructs,  Up: Readline Init File

Readline Init File Syntax
-------------------------

There are only a few basic constructs allowed in the Readline init
file.  Blank lines are ignored.  Lines beginning with a `#' are
comments.  Lines beginning with a `$' indicate conditional constructs
(*note Conditional Init Constructs::).  Other lines denote variable
settings and key bindings.

Variable Settings
     You can modify the run-time behavior of Readline by altering the
     values of variables in Readline using the `set' command within the
     init file.  The syntax is simple:

          set VARIABLE VALUE

     Here, for example, is how to change from the default Emacs-like
     key binding to use `vi' line editing commands:

          set editing-mode vi

     Variable names and values, where appropriate, are recognized
     without regard to case.

     A great deal of run-time behavior is changeable with the following
     variables.

    `bell-style'
          Controls what happens when Readline wants to ring the
          terminal bell.  If set to `none', Readline never rings the
          bell.  If set to `visible', Readline uses a visible bell if
          one is available.  If set to `audible' (the default),
          Readline attempts to ring the terminal's bell.

    `comment-begin'
          The string to insert at the beginning of the line when the
          `insert-comment' command is executed.  The default value is
          `"#"'.

    `completion-ignore-case'
          If set to `on', Readline performs filename matching and
          completion in a case-insensitive fashion.  The default value
          is `off'.

    `completion-query-items'
          The number of possible completions that determines when the
          user is asked whether he wants to see the list of
          possibilities.  If the number of possible completions is
          greater than this value, Readline will ask the user whether
          or not he wishes to view them; otherwise, they are simply
          listed.  This variable must be set to an integer value
          greater than or equal to 0.  The default limit is `100'.

    `convert-meta'
          If set to `on', Readline will convert characters with the
          eighth bit set to an ASCII key sequence by stripping the
          eighth bit and prefixing an <ESC> character, converting them
          to a meta-prefixed key sequence.  The default value is `on'.

    `disable-completion'
          If set to `On', Readline will inhibit word completion.
          Completion  characters will be inserted into the line as if
          they had been mapped to `self-insert'.  The default is `off'.

    `editing-mode'
          The `editing-mode' variable controls which default set of key
          bindings is used.  By default, Readline starts up in Emacs
          editing mode, where the keystrokes are most similar to Emacs.
          This variable can be set to either `emacs' or `vi'.

    `enable-keypad'
          When set to `on', Readline will try to enable the application
          keypad when it is called.  Some systems need this to enable
          the arrow keys.  The default is `off'.

    `expand-tilde'
          If set to `on', tilde expansion is performed when Readline
          attempts word completion.  The default is `off'.

          If set to `on', the history code attempts to place point at
          the same location on each history line retrived with
          `previous-history' or `next-history'.

    `horizontal-scroll-mode'
          This variable can be set to either `on' or `off'.  Setting it
          to `on' means that the text of the lines being edited will
          scroll horizontally on a single screen line when they are
          longer than the width of the screen, instead of wrapping onto
          a new screen line.  By default, this variable is set to `off'.

    `input-meta'
          If set to `on', Readline will enable eight-bit input (it will
          not clear the eighth bit in the characters it reads),
          regardless of what the terminal claims it can support.  The
          default value is `off'.  The name `meta-flag' is a synonym
          for this variable.

    `isearch-terminators'
          The string of characters that should terminate an incremental
          search without subsequently executing the character as a
          command (*note Searching::).  If this variable has not been
          given a value, the characters <ESC> and `C-J' will terminate
          an incremental search.

    `keymap'
          Sets Readline's idea of the current keymap for key binding
          commands.  Acceptable `keymap' names are `emacs',
          `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
          `vi-command', and `vi-insert'.  `vi' is equivalent to
          `vi-command'; `emacs' is equivalent to `emacs-standard'.  The
          default value is `emacs'.  The value of the `editing-mode'
          variable also affects the default keymap.

    `mark-directories'
          If set to `on', completed directory names have a slash
          appended.  The default is `on'.

    `mark-modified-lines'
          This variable, when set to `on', causes Readline to display an
          asterisk (`*') at the start of history lines which have been
          modified.  This variable is `off' by default.

    `mark-symlinked-directories'
          If set to `on', completed names which are symbolic links to
          directories have a slash appended (subject to the value of
          `mark-directories').  The default is `off'.

    `match-hidden-files'
          This variable, when set to `on', causes Readline to match
          files whose names begin with a `.' (hidden files) when
          performing filename completion, unless the leading `.' is
          supplied by the user in the filename to be completed.  This
          variable is `on' by default.

    `output-meta'
          If set to `on', Readline will display characters with the
          eighth bit set directly rather than as a meta-prefixed escape
          sequence.  The default is `off'.

    `page-completions'
          If set to `on', Readline uses an internal `more'-like pager
          to display a screenful of possible completions at a time.
          This variable is `on' by default.

    `print-completions-horizontally'
          If set to `on', Readline will display completions with matches
          sorted horizontally in alphabetical order, rather than down
          the screen.  The default is `off'.

    `show-all-if-ambiguous'
          This alters the default behavior of the completion functions.
          If set to `on', words which have more than one possible
          completion cause the matches to be listed immediately instead
          of ringing the bell.  The default value is `off'.

    `visible-stats'
          If set to `on', a character denoting a file's type is
          appended to the filename when listing possible completions.
          The default is `off'.


Key Bindings
     The syntax for controlling key bindings in the init file is
     simple.  First you need to find the name of the command that you
     want to change.  The following sections contain tables of the
     command name, the default keybinding, if any, and a short
     description of what the command does.

     Once you know the name of the command, simply place on a line in
     the init file the name of the key you wish to bind the command to,
     a colon, and then the name of the command.  The name of the key
     can be expressed in different ways, depending on what you find most
     comfortable.

     In addition to command names, readline allows keys to be bound to
     a string that is inserted when the key is pressed (a MACRO).

    KEYNAME: FUNCTION-NAME or MACRO
          KEYNAME is the name of a key spelled out in English.  For
          example:
               Control-u: universal-argument
               Meta-Rubout: backward-kill-word
               Control-o: "> output"

          In the above example, `C-u' is bound to the function
          `universal-argument', `M-DEL' is bound to the function
          `backward-kill-word', and `C-o' is bound to run the macro
          expressed on the right hand side (that is, to insert the text
          `> output' into the line).

          A number of symbolic character names are recognized while
          processing this key binding syntax: DEL, ESC, ESCAPE, LFD,
          NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.

    "KEYSEQ": FUNCTION-NAME or MACRO
          KEYSEQ differs from KEYNAME above in that strings denoting an
          entire key sequence can be specified, by placing the key
          sequence in double quotes.  Some GNU Emacs style key escapes
          can be used, as in the following example, but the special
          character names are not recognized.

               "\C-u": universal-argument
               "\C-x\C-r": re-read-init-file
               "\e[11~": "Function Key 1"

          In the above example, `C-u' is again bound to the function
          `universal-argument' (just as it was in the first example),
          `C-x C-r' is bound to the function `re-read-init-file', and
          `<ESC> <[> <1> <1> <~>' is bound to insert the text `Function
          Key 1'.


     The following GNU Emacs style escape sequences are available when
     specifying key sequences:

    `\C-'
          control prefix

    `\M-'
          meta prefix

    `\e'
          an escape character

    `\\'
          backslash

    `\"'
          <">, a double quotation mark

    `\''
          <'>, a single quote or apostrophe

     In addition to the GNU Emacs style escape sequences, a second set
     of backslash escapes is available:

    `\a'
          alert (bell)

    `\b'
          backspace

    `\d'
          delete

    `\f'
          form feed

    `\n'
          newline

    `\r'
          carriage return

    `\t'
          horizontal tab

    `\v'
          vertical tab

    `\NNN'
          the eight-bit character whose value is the octal value NNN
          (one to three digits)

    `\xHH'
          the eight-bit character whose value is the hexadecimal value
          HH (one or two hex digits)

     When entering the text of a macro, single or double quotes must be
     used to indicate a macro definition.  Unquoted text is assumed to
     be a function name.  In the macro body, the backslash escapes
     described above are expanded.  Backslash will quote any other
     character in the macro text, including `"' and `''.  For example,
     the following binding will make `C-x \' insert a single `\' into
     the line:
          "\C-x\\": "\\"



File: gdb.info,  Node: Conditional Init Constructs,  Next: Sample Init File,  Prev: Readline Init File Syntax,  Up: Readline Init File

Conditional Init Constructs
---------------------------

Readline implements a facility similar in spirit to the conditional
compilation features of the C preprocessor which allows key bindings
and variable settings to be performed as the result of tests.  There
are four parser directives used.

`$if'
     The `$if' construct allows bindings to be made based on the
     editing mode, the terminal being used, or the application using
     Readline.  The text of the test extends to the end of the line; no
     characters are required to isolate it.

    `mode'
          The `mode=' form of the `$if' directive is used to test
          whether Readline is in `emacs' or `vi' mode.  This may be
          used in conjunction with the `set keymap' command, for
          instance, to set bindings in the `emacs-standard' and
          `emacs-ctlx' keymaps only if Readline is starting out in
          `emacs' mode.

    `term'
          The `term=' form may be used to include terminal-specific key
          bindings, perhaps to bind the key sequences output by the
          terminal's function keys.  The word on the right side of the
          `=' is tested against both the full name of the terminal and
          the portion of the terminal name before the first `-'.  This
          allows `sun' to match both `sun' and `sun-cmd', for instance.

    `application'
          The APPLICATION construct is used to include
          application-specific settings.  Each program using the
          Readline library sets the APPLICATION NAME, and you can test
          for a particular value.  This could be used to bind key
          sequences to functions useful for a specific program.  For
          instance, the following command adds a key sequence that
          quotes the current or previous word in Bash:
               $if Bash
               # Quote the current or previous word
               "\C-xq": "\eb\"\ef\""
               $endif

`$endif'
     This command, as seen in the previous example, terminates an `$if'
     command.

`$else'
     Commands in this branch of the `$if' directive are executed if the
     test fails.

`$include'
     This directive takes a single filename as an argument and reads
     commands and bindings from that file.  For example, the following
     directive reads from `/etc/inputrc':
          $include /etc/inputrc


File: gdb.info,  Node: Sample Init File,  Prev: Conditional Init Constructs,  Up: Readline Init File

Sample Init File
----------------

Here is an example of an INPUTRC file.  This illustrates key binding,
variable assignment, and conditional syntax.


     # This file controls the behaviour of line input editing for
     # programs that use the GNU Readline library.  Existing
     # programs include FTP, Bash, and GDB.
     #
     # You can re-read the inputrc file with C-x C-r.
     # Lines beginning with '#' are comments.
     #
     # First, include any systemwide bindings and variable
     # assignments from /etc/Inputrc
     $include /etc/Inputrc
     
     #
     # Set various bindings for emacs mode.
     
     set editing-mode emacs
     
     $if mode=emacs
     
     Meta-Control-h:	backward-kill-word	Text after the function name is ignored
     
     #
     # Arrow keys in keypad mode
     #
     #"\M-OD":        backward-char
     #"\M-OC":        forward-char
     #"\M-OA":        previous-history
     #"\M-OB":        next-history
     #
     # Arrow keys in ANSI mode
     #
     "\M-[D":        backward-char
     "\M-[C":        forward-char
     "\M-[A":        previous-history
     "\M-[B":        next-history
     #
     # Arrow keys in 8 bit keypad mode
     #
     #"\M-\C-OD":       backward-char
     #"\M-\C-OC":       forward-char
     #"\M-\C-OA":       previous-history
     #"\M-\C-OB":       next-history
     #
     # Arrow keys in 8 bit ANSI mode
     #
     #"\M-\C-[D":       backward-char
     #"\M-\C-[C":       forward-char
     #"\M-\C-[A":       previous-history
     #"\M-\C-[B":       next-history
     
     C-q: quoted-insert
     
     $endif
     
     # An old-style binding.  This happens to be the default.
     TAB: complete
     
     # Macros that are convenient for shell interaction
     $if Bash
     # edit the path
     "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
     # prepare to type a quoted word --
     # insert open and close double quotes
     # and move to just after the open quote
     "\C-x\"": "\"\"\C-b"
     # insert a backslash (testing backslash escapes
     # in sequences and macros)
     "\C-x\\": "\\"
     # Quote the current or previous word
     "\C-xq": "\eb\"\ef\""
     # Add a binding to refresh the line, which is unbound
     "\C-xr": redraw-current-line
     # Edit variable on current line.
     "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
     $endif
     
     # use a visible bell if one is available
     set bell-style visible
     
     # don't strip characters to 7 bits when reading
     set input-meta on
     
     # allow iso-latin1 characters to be inserted rather
     # than converted to prefix-meta sequences
     set convert-meta off
     
     # display characters with the eighth bit set directly
     # rather than as meta-prefixed characters
     set output-meta on
     
     # if there are more than 150 possible completions for
     # a word, ask the user if he wants to see all of them
     set completion-query-items 150
     
     # For FTP
     $if Ftp
     "\C-xg": "get \M-?"
     "\C-xt": "put \M-?"
     "\M-.": yank-last-arg
     $endif


File: gdb.info,  Node: Bindable Readline Commands,  Next: Readline vi Mode,  Prev: Readline Init File,  Up: Command Line Editing

Bindable Readline Commands
==========================

* Menu:

* Commands For Moving::		Moving about the line.
* Commands For History::	Getting at previous lines.
* Commands For Text::		Commands for changing text.
* Commands For Killing::	Commands for killing and yanking.
* Numeric Arguments::		Specifying numeric arguments, repeat counts.
* Commands For Completion::	Getting Readline to do the typing for you.
* Keyboard Macros::		Saving and re-executing typed characters
* Miscellaneous Commands::	Other miscellaneous commands.

   This section describes Readline commands that may be bound to key
sequences.  Command names without an accompanying key sequence are
unbound by default.

   In the following descriptions, "point" refers to the current cursor
position, and "mark" refers to a cursor position saved by the
`set-mark' command.  The text between the point and mark is referred to
as the "region".


File: gdb.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Bindable Readline Commands

Commands For Moving
-------------------

`beginning-of-line (C-a)'
     Move to the start of the current line.

`end-of-line (C-e)'
     Move to the end of the line.

`forward-char (C-f)'
     Move forward a character.

`backward-char (C-b)'
     Move back a character.

`forward-word (M-f)'
     Move forward to the end of the next word.  Words are composed of
     letters and digits.

`backward-word (M-b)'
     Move back to the start of the current or previous word.  Words are
     composed of letters and digits.

`clear-screen (C-l)'
     Clear the screen and redraw the current line, leaving the current
     line at the top of the screen.

`redraw-current-line ()'
     Refresh the current line.  By default, this is unbound.



File: gdb.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Bindable Readline Commands

Commands For Manipulating The History
-------------------------------------

`accept-line (Newline or Return)'
     Accept the line regardless of where the cursor is.  If this line is
     non-empty, it may be added to the history list for future recall
     with `add_history()'.  If this line is a modified history line,
     the history line is restored to its original state.

`previous-history (C-p)'
     Move `back' through the history list, fetching the previous
     command.

`next-history (C-n)'
     Move `forward' through the history list, fetching the next command.

`beginning-of-history (M-<)'
     Move to the first line in the history.

`end-of-history (M->)'
     Move to the end of the input history, i.e., the line currently
     being entered.

`reverse-search-history (C-r)'
     Search backward starting at the current line and moving `up'
     through the history as necessary.  This is an incremental search.

`forward-search-history (C-s)'
     Search forward starting at the current line and moving `down'
     through the the history as necessary.  This is an incremental
     search.

`non-incremental-reverse-search-history (M-p)'
     Search backward starting at the current line and moving `up'
     through the history as necessary using a non-incremental search
     for a string supplied by the user.

`non-incremental-forward-search-history (M-n)'
     Search forward starting at the current line and moving `down'
     through the the history as necessary using a non-incremental search
     for a string supplied by the user.

`history-search-forward ()'
     Search forward through the history for the string of characters
     between the start of the current line and the point.  This is a
     non-incremental search.  By default, this command is unbound.

`history-search-backward ()'
     Search backward through the history for the string of characters
     between the start of the current line and the point.  This is a
     non-incremental search.  By default, this command is unbound.

`yank-nth-arg (M-C-y)'
     Insert the first argument to the previous command (usually the
     second word on the previous line) at point.  With an argument N,
     insert the Nth word from the previous command (the words in the
     previous command begin with word 0).  A negative argument inserts
     the Nth word from the end of the previous command.

`yank-last-arg (M-. or M-_)'
     Insert last argument to the previous command (the last word of the
     previous history entry).  With an argument, behave exactly like
     `yank-nth-arg'.  Successive calls to `yank-last-arg' move back
     through the history list, inserting the last argument of each line
     in turn.



File: gdb.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Bindable Readline Commands

Commands For Changing Text
--------------------------

`delete-char (C-d)'
     Delete the character at point.  If point is at the beginning of
     the line, there are no characters in the line, and the last
     character typed was not bound to `delete-char', then return EOF.

`backward-delete-char (Rubout)'
     Delete the character behind the cursor.  A numeric argument means
     to kill the characters instead of deleting them.

`forward-backward-delete-char ()'
     Delete the character under the cursor, unless the cursor is at the
     end of the line, in which case the character behind the cursor is
     deleted.  By default, this is not bound to a key.

`quoted-insert (C-q or C-v)'
     Add the next character typed to the line verbatim.  This is how to
     insert key sequences like `C-q', for example.

`tab-insert (M-<TAB>)'
     Insert a tab character.

`self-insert (a, b, A, 1, !, ...)'
     Insert yourself.

`transpose-chars (C-t)'
     Drag the character before the cursor forward over the character at
     the cursor, moving the cursor forward as well.  If the insertion
     point is at the end of the line, then this transposes the last two
     characters of the line.  Negative arguments have no effect.

`transpose-words (M-t)'
     Drag the word before point past the word after point, moving point
     past that word as well.  If the insertion point is at the end of
     the line, this transposes the last two words on the line.

`upcase-word (M-u)'
     Uppercase the current (or following) word.  With a negative
     argument, uppercase the previous word, but do not move the cursor.

`downcase-word (M-l)'
     Lowercase the current (or following) word.  With a negative
     argument, lowercase the previous word, but do not move the cursor.

`capitalize-word (M-c)'
     Capitalize the current (or following) word.  With a negative
     argument, capitalize the previous word, but do not move the cursor.

`overwrite-mode ()'
     Toggle overwrite mode.  With an explicit positive numeric argument,
     switches to overwrite mode.  With an explicit non-positive numeric
     argument, switches to insert mode.  This command affects only
     `emacs' mode; `vi' mode does overwrite differently.  Each call to
     `readline()' starts in insert mode.

     In overwrite mode, characters bound to `self-insert' replace the
     text at point rather than pushing the text to the right.
     Characters bound to `backward-delete-char' replace the character
     before point with a space.

     By default, this command is unbound.



File: gdb.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Bindable Readline Commands

Killing And Yanking
-------------------

`kill-line (C-k)'
     Kill the text from point to the end of the line.

`backward-kill-line (C-x Rubout)'
     Kill backward to the beginning of the line.

`unix-line-discard (C-u)'
     Kill backward from the cursor to the beginning of the current line.

`kill-whole-line ()'
     Kill all characters on the current line, no matter where point is.
     By default, this is unbound.

`kill-word (M-d)'
     Kill from point to the end of the current word, or if between
     words, to the end of the next word.  Word boundaries are the same
     as `forward-word'.

`backward-kill-word (M-<DEL>)'
     Kill the word behind point.  Word boundaries are the same as
     `backward-word'.

`unix-word-rubout (C-w)'
     Kill the word behind point, using white space as a word boundary.
     The killed text is saved on the kill-ring.

`delete-horizontal-space ()'
     Delete all spaces and tabs around point.  By default, this is
     unbound.

`kill-region ()'
     Kill the text in the current region.  By default, this command is
     unbound.

`copy-region-as-kill ()'
     Copy the text in the region to the kill buffer, so it can be yanked
     right away.  By default, this command is unbound.

`copy-backward-word ()'
     Copy the word before point to the kill buffer.  The word
     boundaries are the same as `backward-word'.  By default, this
     command is unbound.

`copy-forward-word ()'
     Copy the word following point to the kill buffer.  The word
     boundaries are the same as `forward-word'.  By default, this
     command is unbound.

`yank (C-y)'
     Yank the top of the kill ring into the buffer at point.

`yank-pop (M-y)'
     Rotate the kill-ring, and yank the new top.  You can only do this
     if the prior command is `yank' or `yank-pop'.


File: gdb.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Bindable Readline Commands

Specifying Numeric Arguments
----------------------------

`digit-argument (M-0, M-1, ... M--)'
     Add this digit to the argument already accumulating, or start a new
     argument.  `M--' starts a negative argument.

`universal-argument ()'
     This is another way to specify an argument.  If this command is
     followed by one or more digits, optionally with a leading minus
     sign, those digits define the argument.  If the command is
     followed by digits, executing `universal-argument' again ends the
     numeric argument, but is otherwise ignored.  As a special case, if
     this command is immediately followed by a character that is
     neither a digit or minus sign, the argument count for the next
     command is multiplied by four.  The argument count is initially
     one, so executing this function the first time makes the argument
     count four, a second time makes the argument count sixteen, and so
     on.  By default, this is not bound to a key.


File: gdb.info,  Node: Commands For Completion,  Next: Keyboard Macros,  Prev: Numeric Arguments,  Up: Bindable Readline Commands

Letting Readline Type For You
-----------------------------

`complete (<TAB>)'
     Attempt to perform completion on the text before point.  The
     actual completion performed is application-specific.  The default
     is filename completion.

`possible-completions (M-?)'
     List the possible completions of the text before point.

`insert-completions (M-*)'
     Insert all completions of the text before point that would have
     been generated by `possible-completions'.

`menu-complete ()'
     Similar to `complete', but replaces the word to be completed with
     a single match from the list of possible completions.  Repeated
     execution of `menu-complete' steps through the list of possible
     completions, inserting each match in turn.  At the end of the list
     of completions, the bell is rung (subject to the setting of
     `bell-style') and the original text is restored.  An argument of N
     moves N positions forward in the list of matches; a negative
     argument may be used to move backward through the list.  This
     command is intended to be bound to <TAB>, but is unbound by
     default.

`delete-char-or-list ()'
     Deletes the character under the cursor if not at the beginning or
     end of the line (like `delete-char').  If at the end of the line,
     behaves identically to `possible-completions'.  This command is
     unbound by default.



File: gdb.info,  Node: Keyboard Macros,  Next: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Bindable Readline Commands

Keyboard Macros
---------------

`start-kbd-macro (C-x ()'
     Begin saving the characters typed into the current keyboard macro.

`end-kbd-macro (C-x ))'
     Stop saving the characters typed into the current keyboard macro
     and save the definition.

`call-last-kbd-macro (C-x e)'
     Re-execute the last keyboard macro defined, by making the
     characters in the macro appear as if typed at the keyboard.



File: gdb.info,  Node: Miscellaneous Commands,  Prev: Keyboard Macros,  Up: Bindable Readline Commands

Some Miscellaneous Commands
---------------------------

`re-read-init-file (C-x C-r)'
     Read in the contents of the INPUTRC file, and incorporate any
     bindings or variable assignments found there.

`abort (C-g)'
     Abort the current editing command and ring the terminal's bell
     (subject to the setting of `bell-style').

`do-uppercase-version (M-a, M-b, M-X, ...)'
     If the metafied character X is lowercase, run the command that is
     bound to the corresponding uppercase character.

`prefix-meta (<ESC>)'
     Metafy the next character typed.  This is for keyboards without a
     meta key.  Typing `<ESC> f' is equivalent to typing `M-f'.

`undo (C-_ or C-x C-u)'
     Incremental undo, separately remembered for each line.

`revert-line (M-r)'
     Undo all changes made to this line.  This is like executing the
     `undo' command enough times to get back to the beginning.

`tilde-expand (M-~)'
     Perform tilde expansion on the current word.

`set-mark (C-@)'
     Set the mark to the point.  If a numeric argument is supplied, the
     mark is set to that position.

`exchange-point-and-mark (C-x C-x)'
     Swap the point with the mark.  The current cursor position is set
     to the saved position, and the old cursor position is saved as the
     mark.

`character-search (C-])'
     A character is read and point is moved to the next occurrence of
     that character.  A negative count searches for previous
     occurrences.

`character-search-backward (M-C-])'
     A character is read and point is moved to the previous occurrence
     of that character.  A negative count searches for subsequent
     occurrences.

`insert-comment (M-#)'
     Without a numeric argument, the value of the `comment-begin'
     variable is inserted at the beginning of the current line.  If a
     numeric argument is supplied, this command acts as a toggle:  if
     the characters at the beginning of the line do not match the value
     of `comment-begin', the value is inserted, otherwise the
     characters in `comment-begin' are deleted from the beginning of
     the line.  In either case, the line is accepted as if a newline
     had been typed.

`dump-functions ()'
     Print all of the functions and their key bindings to the Readline
     output stream.  If a numeric argument is supplied, the output is
     formatted in such a way that it can be made part of an INPUTRC
     file.  This command is unbound by default.

`dump-variables ()'
     Print all of the settable variables and their values to the
     Readline output stream.  If a numeric argument is supplied, the
     output is formatted in such a way that it can be made part of an
     INPUTRC file.  This command is unbound by default.

`dump-macros ()'
     Print all of the Readline key sequences bound to macros and the
     strings they output.  If a numeric argument is supplied, the
     output is formatted in such a way that it can be made part of an
     INPUTRC file.  This command is unbound by default.

`emacs-editing-mode (C-e)'
     When in `vi' command mode, this causes a switch to `emacs' editing
     mode.

`vi-editing-mode (M-C-j)'
     When in `emacs' editing mode, this causes a switch to `vi' editing
     mode.



File: gdb.info,  Node: Readline vi Mode,  Prev: Bindable Readline Commands,  Up: Command Line Editing

Readline vi Mode
================

While the Readline library does not have a full set of `vi' editing
functions, it does contain enough to allow simple editing of the line.
The Readline `vi' mode behaves as specified in the POSIX 1003.2
standard.

   In order to switch interactively between `emacs' and `vi' editing
modes, use the command `M-C-j' (bound to emacs-editing-mode when in
`vi' mode and to vi-editing-mode in `emacs' mode).  The Readline
default is `emacs' mode.

   When you enter a line in `vi' mode, you are already placed in
`insertion' mode, as if you had typed an `i'.  Pressing <ESC> switches
you into `command' mode, where you can edit the text of the line with
the standard `vi' movement keys, move to previous history lines with
`k' and subsequent lines with `j', and so forth.


File: gdb.info,  Node: Using History Interactively,  Next: Installing GDB,  Prev: Command Line Editing,  Up: Top

Using History Interactively
***************************

This chapter describes how to use the GNU History Library interactively,
from a user's standpoint.  It should be considered a user's guide.

* Menu:

* History Interaction::		What it feels like using History as a user.


File: gdb.info,  Node: History Interaction,  Up: Using History Interactively

History Expansion
=================

The History library provides a history expansion feature that is similar
to the history expansion provided by `csh'.  This section describes the
syntax used to manipulate the history information.

   History expansions introduce words from the history list into the
input stream, making it easy to repeat commands, insert the arguments
to a previous command into the current input line, or fix errors in
previous commands quickly.

   History expansion takes place in two parts.  The first is to
determine which line from the history list should be used during
substitution.  The second is to select portions of that line for
inclusion into the current one.  The line selected from the history is
called the "event", and the portions of that line that are acted upon
are called "words".  Various "modifiers" are available to manipulate
the selected words.  The line is broken into words in the same fashion
that Bash does, so that several words surrounded by quotes are
considered one word.  History expansions are introduced by the
appearance of the history expansion character, which is `!' by default.

* Menu:

* Event Designators::	How to specify which history line to use.
* Word Designators::	Specifying which words are of interest.
* Modifiers::		Modifying the results of substitution.


File: gdb.info,  Node: Event Designators,  Next: Word Designators,  Up: History Interaction

Event Designators
-----------------

An event designator is a reference to a command line entry in the
history list.

`!'
     Start a history substitution, except when followed by a space, tab,
     the end of the line, `=' or `('.

`!N'
     Refer to command line N.

`!-N'
     Refer to the command N lines back.

`!!'
     Refer to the previous command.  This is a synonym for `!-1'.

`!STRING'
     Refer to the most recent command starting with STRING.

`!?STRING[?]'
     Refer to the most recent command containing STRING.  The trailing
     `?' may be omitted if the STRING is followed immediately by a
     newline.

`^STRING1^STRING2^'
     Quick Substitution.  Repeat the last command, replacing STRING1
     with STRING2.  Equivalent to `!!:s/STRING1/STRING2/'.

`!#'
     The entire command line typed so far.



File: gdb.info,  Node: Word Designators,  Next: Modifiers,  Prev: Event Designators,  Up: History Interaction

Word Designators
----------------

Word designators are used to select desired words from the event.  A
`:' separates the event specification from the word designator.  It may
be omitted if the word designator begins with a `^', `$', `*', `-', or
`%'.  Words are numbered from the beginning of the line, with the first
word being denoted by 0 (zero).  Words are inserted into the current
line separated by single spaces.

   For example,

`!!'
     designates the preceding command.  When you type this, the
     preceding command is repeated in toto.

`!!:$'
     designates the last argument of the preceding command.  This may be
     shortened to `!$'.

`!fi:2'
     designates the second argument of the most recent command starting
     with the letters `fi'.

   Here are the word designators:

`0 (zero)'
     The `0'th word.  For many applications, this is the command word.

`N'
     The Nth word.

`^'
     The first argument; that is, word 1.

`$'
     The last argument.

`%'
     The word matched by the most recent `?STRING?' search.

`X-Y'
     A range of words; `-Y' abbreviates `0-Y'.

`*'
     All of the words, except the `0'th.  This is a synonym for `1-$'.
     It is not an error to use `*' if there is just one word in the
     event; the empty string is returned in that case.

`X*'
     Abbreviates `X-$'

`X-'
     Abbreviates `X-$' like `X*', but omits the last word.


   If a word designator is supplied without an event specification, the
previous command is used as the event.


File: gdb.info,  Node: Modifiers,  Prev: Word Designators,  Up: History Interaction

Modifiers
---------

After the optional word designator, you can add a sequence of one or
more of the following modifiers, each preceded by a `:'.

`h'
     Remove a trailing pathname component, leaving only the head.

`t'
     Remove all leading  pathname  components, leaving the tail.

`r'
     Remove a trailing suffix of the form `.SUFFIX', leaving the
     basename.

`e'
     Remove all but the trailing suffix.

`p'
     Print the new command but do not execute it.

`s/OLD/NEW/'
     Substitute NEW for the first occurrence of OLD in the event line.
     Any delimiter may be used in place of `/'.  The delimiter may be
     quoted in OLD and NEW with a single backslash.  If `&' appears in
     NEW, it is replaced by OLD.  A single backslash will quote the
     `&'.  The final delimiter is optional if it is the last character
     on the input line.

`&'
     Repeat the previous substitution.

`g'
     Cause changes to be applied over the entire event line.  Used in
     conjunction with `s', as in `gs/OLD/NEW/', or with `&'.



File: gdb.info,  Node: Formatting Documentation,  Next: Command Line Editing,  Prev: GDB Bugs,  Up: Top

Formatting Documentation
************************

The GDB 4 release includes an already-formatted reference card, ready
for printing with PostScript or Ghostscript, in the `gdb' subdirectory
of the main source directory(1).  If you can use PostScript or
Ghostscript with your printer, you can print the reference card
immediately with `refcard.ps'.

   The release also includes the source for the reference card.  You
can format it, using TeX, by typing:

     make refcard.dvi

   The GDB reference card is designed to print in "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 DVI output program.

   All the documentation for GDB 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 `texi2roff') to typeset the printed version.

   GDB includes an already formatted copy of the on-line Info version
of this manual in the `gdb' subdirectory.  The main Info file is
`gdb-6.1.1/gdb/gdb.info', and it refers to subordinate files matching
`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 `info' subsystem in GNU Emacs or the standalone `info'
program, available as part of the GNU Texinfo distribution.

   If you want to format these Info files yourself, you need one of the
Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.

   If you have `makeinfo' installed, and are in the top level GDB
source directory (`gdb-6.1.1', in the case of version 6.1.1), you can
make the Info file by typing:

     cd gdb
     make gdb.info

   If you want to typeset and print copies of this manual, you need TeX,
a program to print its DVI output files, and `texinfo.tex', the Texinfo
definitions file.

   TeX is a typesetting program; it does not print files directly, but
produces output files called DVI files.  To print a typeset document,
you need a program to print DVI files.  If your system has TeX
installed, chances are it has such a program.  The precise command to
use depends on your system; `lpr -d' is common; another (for PostScript
devices) is `dvips'.  The DVI print command may require a file name
without any extension or a `.dvi' extension.

   TeX also requires a macro definitions file called `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.
`texinfo.tex' is distributed with GDB and is located in the
`gdb-VERSION-NUMBER/texinfo' directory.

   If you have TeX and a DVI printer program installed, you can typeset
and print this manual.  First switch to the the `gdb' subdirectory of
the main source directory (for example, to `gdb-6.1.1/gdb') and type:

     make gdb.dvi

   Then give `gdb.dvi' to your DVI printing program.

   ---------- Footnotes ----------

   (1) In `gdb-6.1.1/gdb/refcard.ps' of the version 6.1.1 release.


File: gdb.info,  Node: Installing GDB,  Next: Maintenance Commands,  Prev: Using History Interactively,  Up: Top

Installing GDB
**************

GDB comes with a `configure' script that automates the process of
preparing GDB for installation; you can then use `make' to build the
`gdb' program.

   The GDB distribution includes all the source code you need for GDB
in a single directory, whose name is usually composed by appending the
version number to `gdb'.

   For example, the GDB version 6.1.1 distribution is in the
`gdb-6.1.1' directory.  That directory contains:

`gdb-6.1.1/configure (and supporting files)'
     script for configuring GDB and all its supporting libraries

`gdb-6.1.1/gdb'
     the source specific to GDB itself

`gdb-6.1.1/bfd'
     source for the Binary File Descriptor library

`gdb-6.1.1/include'
     GNU include files

`gdb-6.1.1/libiberty'
     source for the `-liberty' free software library

`gdb-6.1.1/opcodes'
     source for the library of opcode tables and disassemblers

`gdb-6.1.1/readline'
     source for the GNU command-line interface

`gdb-6.1.1/glob'
     source for the GNU filename pattern-matching subroutine

`gdb-6.1.1/mmalloc'
     source for the GNU memory-mapped malloc package

   The simplest way to configure and build GDB is to run `configure'
from the `gdb-VERSION-NUMBER' source directory, which in this example
is the `gdb-6.1.1' directory.

   First switch to the `gdb-VERSION-NUMBER' source directory if you are
not already in it; then run `configure'.  Pass the identifier for the
platform on which GDB will run as an argument.

   For example:

     cd gdb-6.1.1
     ./configure HOST
     make

where HOST is an identifier such as `sun4' or `decstation', that
identifies the platform where GDB will run.  (You can often leave off
HOST; `configure' tries to guess the correct value by examining your
system.)

   Running `configure HOST' and then running `make' builds the `bfd',
`readline', `mmalloc', and `libiberty' libraries, then `gdb' itself.
The configured source files, and the binaries, are left in the
corresponding source directories.

   `configure' is a Bourne-shell (`/bin/sh') script; if your system
does not recognize this automatically when you run a different shell,
you may need to run `sh' on it explicitly:

     sh configure HOST

   If you run `configure' from a directory that contains source
directories for multiple libraries or programs, such as the `gdb-6.1.1'
source directory for version 6.1.1, `configure' creates configuration
files for every directory level underneath (unless you tell it not to,
with the `--norecursion' option).

   You should run the `configure' script from the top directory in the
source tree, the `gdb-VERSION-NUMBER' directory.  If you run
`configure' from one of the subdirectories, you will configure only
that subdirectory.  That is usually not what you want.  In particular,
if you run the first `configure' from the `gdb' subdirectory of the
`gdb-VERSION-NUMBER' directory, you will omit the configuration of
`bfd', `readline', and other sibling directories of the `gdb'
subdirectory.  This leads to build errors about missing include files
such as `bfd/bfd.h'.

   You can install `gdb' anywhere; it has no hardwired paths.  However,
you should make sure that the shell on your path (named by the `SHELL'
environment variable) is publicly readable.  Remember that GDB uses the
shell to start your program--some systems refuse to let GDB debug child
processes whose programs are not readable.

* Menu:

* Separate Objdir::             Compiling GDB in another directory
* Config Names::                Specifying names for hosts and targets
* Configure Options::           Summary of options for configure


File: gdb.info,  Node: Separate Objdir,  Next: Config Names,  Up: Installing GDB

Compiling GDB in another directory
==================================

If you want to run GDB versions for several host or target machines,
you need a different `gdb' compiled for each combination of host and
target.  `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 `make' program handles the `VPATH'
feature (GNU `make' does), running `make' in each of these directories
builds the `gdb' program specified there.

   To build `gdb' in a separate directory, run `configure' with the
`--srcdir' option to specify where to find the source.  (You also need
to specify a path to find `configure' itself from your working
directory.  If the path to `configure' would be the same as the
argument to `--srcdir', you can leave out the `--srcdir' option; it is
assumed.)

   For example, with version 6.1.1, you can build GDB in a separate
directory for a Sun 4 like this:

     cd gdb-6.1.1
     mkdir ../gdb-sun4
     cd ../gdb-sun4
     ../gdb-6.1.1/configure sun4
     make

   When `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 `libiberty.a' in the
directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.

   Make sure that your path to the `configure' script has just one
instance of `gdb' in it.  If your path to `configure' looks like
`../gdb-6.1.1/gdb/configure', you are configuring only one subdirectory
of GDB, not the whole package.  This leads to build errors about
missing include files such as `bfd/bfd.h'.

   One popular reason to build several GDB configurations in separate
directories is to configure GDB for cross-compiling (where GDB runs on
one machine--the "host"--while debugging programs that run on another
machine--the "target").  You specify a cross-debugging target by giving
the `--target=TARGET' option to `configure'.

   When you run `make' to build a program or library, you must run it
in a configured directory--whatever directory you were in when you
called `configure' (or one of its subdirectories).

   The `Makefile' that `configure' generates in each source directory
also runs recursively.  If you type `make' in a source directory such
as `gdb-6.1.1' (or in a separate configured directory configured with
`--srcdir=DIRNAME/gdb-6.1.1'), 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 `make' on them in parallel (for example, if
they are NFS-mounted on each of the hosts); they will not interfere
with each other.


File: gdb.info,  Node: Config Names,  Next: Configure Options,  Prev: Separate Objdir,  Up: Installing GDB

Specifying names for hosts and targets
======================================

The specifications used for hosts and targets in the `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:

     ARCHITECTURE-VENDOR-OS

   For example, you can use the alias `sun4' as a HOST argument, or as
the value for TARGET in a `--target=TARGET' option.  The equivalent
full name is `sparc-sun-sunos4'.

   The `configure' script accompanying GDB does not provide any query
facility to list all supported host and target names or aliases.
`configure' calls the Bourne shell script `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:

     % 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

`config.sub' is also distributed in the GDB source directory
(`gdb-6.1.1', for version 6.1.1).


File: gdb.info,  Node: Configure Options,  Prev: Config Names,  Up: Installing GDB

`configure' options
===================

Here is a summary of the `configure' options and arguments that are
most often useful for building GDB.  `configure' also has several other
options not listed here.  *note (configure.info)What Configure Does::,
for a full explanation of `configure'.

     configure [--help]
               [--prefix=DIR]
               [--exec-prefix=DIR]
               [--srcdir=DIRNAME]
               [--norecursion] [--rm]
               [--target=TARGET]
               HOST

You may introduce options with a single `-' rather than `--' if you
prefer; but you may abbreviate option names if you use `--'.

`--help'
     Display a quick summary of how to invoke `configure'.

`--prefix=DIR'
     Configure the source to install programs and files under directory
     `DIR'.

`--exec-prefix=DIR'
     Configure the source to install programs under directory `DIR'.

`--srcdir=DIRNAME'
     *Warning: using this option requires GNU `make', or another `make'
     that implements the `VPATH' feature.*
     Use this option to make configurations in directories separate
     from the GDB source directories.  Among other things, you can use
     this to build (or maintain) several configurations simultaneously,
     in separate directories.  `configure' writes configuration
     specific files in the current directory, but arranges for them to
     use the source in the directory DIRNAME.  `configure' creates
     directories under the working directory in parallel to the source
     directories below DIRNAME.

`--norecursion'
     Configure only the directory level where `configure' is executed;
     do not propagate configuration to subdirectories.

`--target=TARGET'
     Configure GDB for cross-debugging programs running on the specified
     TARGET.  Without this option, GDB is configured to debug programs
     that run on the same machine (HOST) as GDB itself.

     There is no convenient way to generate a list of all available
     targets.

`HOST ...'
     Configure GDB to run on the specified HOST.

     There is no convenient way to generate a list of all available
     hosts.

   There are many other options available as well, but they are
generally needed for special purposes only.


File: gdb.info,  Node: Maintenance Commands,  Next: Remote Protocol,  Prev: Installing GDB,  Up: Top

Maintenance Commands
********************

In addition to commands intended for GDB users, GDB includes a number
of commands intended for GDB developers.  These commands are provided
here for reference.

`maint info breakpoints'
     Using the same format as `info breakpoints', display both the
     breakpoints you've set explicitly, and those GDB is using for
     internal purposes.  Internal breakpoints are shown with negative
     breakpoint numbers.  The type column identifies what kind of
     breakpoint is shown:

    `breakpoint'
          Normal, explicitly set breakpoint.

    `watchpoint'
          Normal, explicitly set watchpoint.

    `longjmp'
          Internal breakpoint, used to handle correctly stepping through
          `longjmp' calls.

    `longjmp resume'
          Internal breakpoint at the target of a `longjmp'.

    `until'
          Temporary internal breakpoint used by the GDB `until' command.

    `finish'
          Temporary internal breakpoint used by the GDB `finish'
          command.

    `shlib events'
          Shared library events.


`maint internal-error'
`maint internal-warning'
     Cause GDB to call the internal function `internal_error' or
     `internal_warning' and hence behave as though an internal error or
     internal warning has been detected.  In addition to reporting the
     internal problem, these functions give the user the opportunity to
     either quit GDB or create a core file of the current GDB session.

          (gdb) maint internal-error testing, 1, 2
          .../maint.c:121: internal-error: testing, 1, 2
          A problem internal to GDB has been detected.  Further
          debugging may prove unreliable.
          Quit this debugging session? (y or n) n
          Create a core file? (y or n) n
          (gdb)

     Takes an optional parameter that is used as the text of the error
     or warning message.

`maint print dummy-frames'
     Prints the contents of GDB's internal dummy-frame stack.

          (gdb) b add
          ...
          (gdb) print add(2,3)
          Breakpoint 2, add (a=2, b=3) at ...
          58	  return (a + b);
          The program being debugged stopped while in a function called from GDB.
          ...
          (gdb) maint print dummy-frames
          0x1a57c80: pc=0x01014068 fp=0x0200bddc sp=0x0200bdd6
           top=0x0200bdd4 id={stack=0x200bddc,code=0x101405c}
           call_lo=0x01014000 call_hi=0x01014001
          (gdb)

     Takes an optional file parameter.

`maint print registers'
`maint print raw-registers'
`maint print cooked-registers'
`maint print register-groups'
     Print GDB's internal register data structures.

     The command `maint print raw-registers' includes the contents of
     the raw register cache; the command `maint print cooked-registers'
     includes the (cooked) value of all registers; and the command
     `maint print register-groups' includes the groups that each
     register is a member of.  *Note Registers: (gdbint)Registers.

     Takes an optional file parameter.

`maint print reggroups'
     Print GDB's internal register group data structures.

     Takes an optional file parameter.

          (gdb) maint print reggroups
           Group      Type
           general    user
           float      user
           all        user
           vector     user
           system     user
           save       internal
           restore    internal

`maint set profile'
`maint show profile'
     Control profiling of GDB.

     Profiling will be disabled until you use the `maint set profile'
     command to enable it.  When you enable profiling, the system will
     begin collecting timing and execution count data; when you disable
     profiling or exit GDB, the results will be written to a log file.
     Remember that if you use profiling, GDB will overwrite the
     profiling log file (often called `gmon.out').  If you have a
     record of important profiling data in a `gmon.out' file, be sure
     to move it to a safe location.

     Configuring with `--enable-profiling' arranges for GDB to be
     compiled with the `-pg' compiler option.



File: gdb.info,  Node: Remote Protocol,  Next: Agent Expressions,  Prev: Maintenance Commands,  Up: Top

GDB Remote Serial Protocol
**************************

* Menu:

* Overview::
* Packets::
* Stop Reply Packets::
* General Query Packets::
* Register Packet Format::
* Examples::
* File-I/O remote protocol extension::


File: gdb.info,  Node: Overview,  Next: Packets,  Up: Remote Protocol

Overview
========

There may be occasions when you need to know something about the
protocol--for example, if there is only one serial port to your target
machine, you might want your program to do something special if it
recognizes a packet meant for GDB.

   In the examples below, `->' and `<-' are used to indicate
transmitted and received data respectfully.

   All GDB commands and responses (other than acknowledgments) are sent
as a PACKET.  A PACKET is introduced with the character `$', the actual
PACKET-DATA, and the terminating character `#' followed by a two-digit
CHECKSUM:

     `$'PACKET-DATA`#'CHECKSUM

The two-digit CHECKSUM is computed as the modulo 256 sum of all
characters between the leading `$' and the trailing `#' (an eight bit
unsigned checksum).

   Implementors should note that prior to GDB 5.0 the protocol
specification also included an optional two-digit SEQUENCE-ID:

     `$'SEQUENCE-ID`:'PACKET-DATA`#'CHECKSUM

That SEQUENCE-ID was appended to the acknowledgment.  GDB has never
output SEQUENCE-IDs.  Stubs that handle packets added since GDB 5.0
must not accept SEQUENCE-ID.

   When either the host or the target machine receives a packet, the
first response expected is an acknowledgment: either `+' (to indicate
the package was received correctly) or `-' (to request retransmission):

     -> `$'PACKET-DATA`#'CHECKSUM
     <- `+'

The host (GDB) sends COMMANDs, and the target (the debugging stub
incorporated in your program) sends a RESPONSE.  In the case of step
and continue COMMANDs, the response is only sent when the operation has
completed (the target has again stopped).

   PACKET-DATA consists of a sequence of characters with the exception
of `#' and `$' (see `X' packet for additional exceptions).

   Fields within the packet should be separated using `,' `;' or `:'.
Except where otherwise noted all numbers are represented in HEX with
leading zeros suppressed.

   Implementors should note that prior to GDB 5.0, the character `:'
could not appear as the third character in a packet (as it would
potentially conflict with the SEQUENCE-ID).

   Response DATA can be run-length encoded to save space.  A `*' means
that the next character is an ASCII encoding giving a repeat count
which stands for that many repetitions of the character preceding the
`*'.  The encoding is `n+29', yielding a printable character where `n
>=3' (which is where rle starts to win).  The printable characters `$',
`#', `+' and `-' or with a numeric value greater than 126 should not be
used.

   So:
     "`0* '"

means the same as "0000".

   The error response returned for some packets includes a two character
error number.  That number is not well defined.

   For any COMMAND not supported by the stub, an empty response
(`$#00') should be returned.  That way it is possible to extend the
protocol.  A newer GDB can tell if a packet is supported based on that
response.

   A stub is required to support the `g', `G', `m', `M', `c', and `s'
COMMANDs.  All other COMMANDs are optional.


File: gdb.info,  Node: Packets,  Next: Stop Reply Packets,  Prev: Overview,  Up: Remote Protocol

Packets
=======

The following table provides a complete list of all currently defined
COMMANDs and their corresponding response DATA.

`!' -- extended mode
     Enable extended mode.  In extended mode, the remote server is made
     persistent.  The `R' packet is used to restart the program being
     debugged.

     Reply:
    `OK'
          The remote target both supports and has enabled extended mode.

`?' -- last signal
     Indicate the reason the target halted.  The reply is the same as
     for step and continue.

     Reply: *Note Stop Reply Packets::, for the reply specifications.

`a' -- reserved
     Reserved for future use.

`A'ARGLEN`,'ARGNUM`,'ARG`,...' --  set program arguments *(reserved)*
     Initialized `argv[]' array passed into program. ARGLEN specifies
     the number of bytes in the hex encoded byte stream ARG.  See
     `gdbserver' for more details.

     Reply:
    `OK'

    `ENN'

`b'BAUD -- set baud *(deprecated)*
     Change the serial line speed to BAUD.

     JTC: _When does the transport layer state change?  When it's
     received, or after the ACK is transmitted.  In either case, there
     are problems if the command or the acknowledgment packet is
     dropped._

     Stan: _If people really wanted to add something like this, and get
     it working for the first time, they ought to modify ser-unix.c to
     send some kind of out-of-band message to a specially-setup stub
     and have the switch happen "in between" packets, so that from
     remote protocol's point of view, nothing actually happened._

`B'ADDR,MODE -- set breakpoint *(deprecated)*
     Set (MODE is `S') or clear (MODE is `C') a breakpoint at ADDR.

     This packet has been replaced by the `Z' and `z' packets (*note
     insert breakpoint or watchpoint packet::).

`c'ADDR -- continue
     ADDR is address to resume.  If ADDR is omitted, resume at current
     address.

     Reply: *Note Stop Reply Packets::, for the reply specifications.

`C'SIG`;'ADDR -- continue with signal
     Continue with signal SIG (hex signal number).  If `;'ADDR is
     omitted, resume at same address.

     Reply: *Note Stop Reply Packets::, for the reply specifications.

`d' -- toggle debug *(deprecated)*
     Toggle debug flag.

`D' -- detach
     Detach GDB from the remote system.  Sent to the remote target
     before GDB disconnects via the `detach' command.

     Reply:
    `_no response_'
          GDB does not check for any response after sending this packet.

`e' -- reserved
     Reserved for future use.

`E' -- reserved
     Reserved for future use.

`f' -- reserved
     Reserved for future use.

`F'RC`,'EE`,'CF`;'XX -- Reply to target's F packet.
     This packet is send by GDB as reply to a `F' request packet sent
     by the target.  This is part of the File-I/O protocol extension.
     *Note File-I/O remote protocol extension::, for the specification.

`g' -- read registers
     Read general registers.

     Reply:
    `XX...'
          Each byte of register data is described by two hex digits.
          The bytes with the register are transmitted in target byte
          order.  The size of each register and their position within
          the `g' PACKET are determined by the GDB internal macros
          DEPRECATED_REGISTER_RAW_SIZE and REGISTER_NAME macros.  The
          specification of several standard `g' packets is specified
          below.

    `ENN'
          for an error.

`G'XX... -- write regs
     *Note read registers packet::, for a description of the XX...
     data.

     Reply:
    `OK'
          for success

    `ENN'
          for an error

`h' -- reserved
     Reserved for future use.

`H'CT... -- set thread
     Set thread for subsequent operations (`m', `M', `g', `G', et.al.).
     C depends on the operation to be performed: it should be `c' for
     step and continue operations, `g' for other operations.  The
     thread designator T... may be -1, meaning all the threads, a
     thread number, or zero which means pick any thread.

     Reply:
    `OK'
          for success

    `ENN'
          for an error

`i'ADDR`,'NNN -- cycle step *(draft)*
     Step the remote target by a single clock cycle.  If `,'NNN is
     present, cycle step NNN cycles.  If ADDR is present, cycle step
     starting at that address.

`I' -- signal then cycle step *(reserved)*
     *Note step with signal packet::.  *Note cycle step packet::.

`j' -- reserved
     Reserved for future use.

`J' -- reserved
     Reserved for future use.

`k' -- kill request
     FIXME: _There is no description of how to operate when a specific
     thread context has been selected (i.e. does 'k' kill only that
     thread?)_.

`K' -- reserved
     Reserved for future use.

`l' -- reserved
     Reserved for future use.

`L' -- reserved
     Reserved for future use.

`m'ADDR`,'LENGTH -- read memory
     Read LENGTH bytes of memory starting at address ADDR.  Neither GDB
     nor the stub assume that sized memory transfers are assumed using
     word aligned accesses. FIXME: _A word aligned memory transfer
     mechanism is needed._

     Reply:
    `XX...'
          XX... is mem contents. Can be fewer bytes than requested if
          able to read only part of the data.  Neither GDB nor the stub
          assume that sized memory transfers are assumed using word
          aligned accesses. FIXME: _A word aligned memory transfer
          mechanism is needed._

    `ENN'
          NN is errno

`M'ADDR,LENGTH`:'XX... -- write mem
     Write LENGTH bytes of memory starting at address ADDR.  XX... is
     the data.

     Reply:
    `OK'
          for success

    `ENN'
          for an error (this includes the case where only part of the
          data was written).

`n' -- reserved
     Reserved for future use.

`N' -- reserved
     Reserved for future use.

`o' -- reserved
     Reserved for future use.

`O' -- reserved
     Reserved for future use.

`p'N... -- read reg *(reserved)*
     *Note write register packet::.

     Reply:
    `R....'
          The hex encoded value of the register in target byte order.

`P'N...`='R... -- write register
     Write register N... with value R..., which contains two hex digits
     for each byte in the register (target byte order).

     Reply:
    `OK'
          for success

    `ENN'
          for an error

`q'QUERY -- general query
     Request info about QUERY.  In general GDB queries have a leading
     upper case letter.  Custom vendor queries should use a company
     prefix (in lower case) ex: `qfsf.var'.  QUERY may optionally be
     followed by a `,' or `;' separated list.  Stubs must ensure that
     they match the full QUERY name.

     Reply:
    `XX...'
          Hex encoded data from query.  The reply can not be empty.

    `ENN'
          error reply

    `'
          Indicating an unrecognized QUERY.

`Q'VAR`='VAL -- general set
     Set value of VAR to VAL.

     *Note general query packet::, for a discussion of naming
     conventions.

`r' -- reset *(deprecated)*
     Reset the entire system.

`R'XX -- remote restart
     Restart the program being debugged.  XX, while needed, is ignored.
     This packet is only available in extended mode.

     Reply:
    `_no reply_'
          The `R' packet has no reply.

`s'ADDR -- step
     ADDR is address to resume.  If ADDR is omitted, resume at same
     address.

     Reply: *Note Stop Reply Packets::, for the reply specifications.

`S'SIG`;'ADDR -- step with signal
     Like `C' but step not continue.

     Reply: *Note Stop Reply Packets::, for the reply specifications.

`t'ADDR`:'PP`,'MM -- search
     Search backwards starting at address ADDR for a match with pattern
     PP and mask MM.  PP and MM are 4 bytes.  ADDR must be at least 3
     digits.

`T'XX -- thread alive
     Find out if the thread XX is alive.

     Reply:
    `OK'
          thread is still alive

    `ENN'
          thread is dead

`u' -- reserved
     Reserved for future use.

`U' -- reserved
     Reserved for future use.

`v' -- verbose packet prefix
     Packets starting with `v' are identified by a multi-letter name,
     up to the first `;' or `?' (or the end of the packet).

`vCont'[;ACTION[`:'TID]]... -- extended resume
     Resume the inferior.  Different actions may be specified for each
     thread.  If an action is specified with no TID, then it is applied
     to any threads that don't have a specific action specified; if no
     default action is specified then other threads should remain
     stopped.  Specifying multiple default actions is an error;
     specifying no actions is also an error.  Thread IDs are specified
     in hexadecimal.  Currently supported actions are:

    `c'
          Continue.

    `CSIG'
          Continue with signal SIG.  SIG should be two hex digits.

    `s'
          Step.

    `SSIG'
          Step with signal SIG.  SIG should be two hex digits.

     The optional ADDR argument normally associated with these packets
     is not supported in `vCont'.

     Reply: *Note Stop Reply Packets::, for the reply specifications.

`vCont?' -- extended resume query
     Query support for the `vCont' packet.

     Reply:
    ``vCont'[;ACTION]...'
          The `vCont' packet is supported.  Each ACTION is a supported
          command in the `vCont' packet.

    `'
          The `vCont' packet is not supported.

`V' -- reserved
     Reserved for future use.

`w' -- reserved
     Reserved for future use.

`W' -- reserved
     Reserved for future use.

`x' -- reserved
     Reserved for future use.

`X'ADDR`,'LENGTH:XX... -- write mem (binary)
     ADDR is address, LENGTH is number of bytes, XX...  is binary data.
     The characters `$', `#', and `0x7d' are escaped using `0x7d'.

     Reply:
    `OK'
          for success

    `ENN'
          for an error

`y' -- reserved
     Reserved for future use.

`Y' reserved
     Reserved for future use.

`z'TYPE`,'ADDR`,'LENGTH -- remove breakpoint or watchpoint *(draft)*
`Z'TYPE`,'ADDR`,'LENGTH -- insert breakpoint or watchpoint *(draft)*
     Insert (`Z') or remove (`z') a TYPE breakpoint or watchpoint
     starting at address ADDRESS and covering the next LENGTH bytes.

     Each breakpoint and watchpoint packet TYPE is documented
     separately.

     _Implementation notes: A remote target shall return an empty string
     for an unrecognized breakpoint or watchpoint packet TYPE.  A
     remote target shall support either both or neither of a given
     `Z'TYPE... and `z'TYPE... packet pair.  To avoid potential
     problems with duplicate packets, the operations should be
     implemented in an idempotent way._

`z'`0'`,'ADDR`,'LENGTH -- remove memory breakpoint *(draft)*

`Z'`0'`,'ADDR`,'LENGTH -- insert memory breakpoint *(draft)*
     Insert (`Z0') or remove (`z0') a memory breakpoint at address
     `addr' of size `length'.

     A memory breakpoint is implemented by replacing the instruction at
     ADDR with a software breakpoint or trap instruction.  The `length'
     is used by targets that indicates the size of the breakpoint (in
     bytes) that should be inserted (e.g., the ARM and MIPS can insert
     either a 2 or 4 byte breakpoint).

     _Implementation note: It is possible for a target to copy or move
     code that contains memory breakpoints (e.g., when implementing
     overlays).  The behavior of this packet, in the presence of such a
     target, is not defined._

     Reply:
    `OK'
          success

    `'
          not supported

    `ENN'
          for an error

`z'`1'`,'ADDR`,'LENGTH -- remove hardware breakpoint *(draft)*

`Z'`1'`,'ADDR`,'LENGTH -- insert hardware breakpoint *(draft)*
     Insert (`Z1') or remove (`z1') a hardware breakpoint at address
     `addr' of size `length'.

     A hardware breakpoint is implemented using a mechanism that is not
     dependant on being able to modify the target's memory.

     _Implementation note: A hardware breakpoint is not affected by code
     movement._

     Reply:
    `OK'
          success

    `'
          not supported

    `ENN'
          for an error

`z'`2'`,'ADDR`,'LENGTH -- remove write watchpoint *(draft)*

`Z'`2'`,'ADDR`,'LENGTH -- insert write watchpoint *(draft)*
     Insert (`Z2') or remove (`z2') a write watchpoint.

     Reply:
    `OK'
          success

    `'
          not supported

    `ENN'
          for an error

`z'`3'`,'ADDR`,'LENGTH -- remove read watchpoint *(draft)*

`Z'`3'`,'ADDR`,'LENGTH -- insert read watchpoint *(draft)*
     Insert (`Z3') or remove (`z3') a read watchpoint.

     Reply:
    `OK'
          success

    `'
          not supported

    `ENN'
          for an error

`z'`4'`,'ADDR`,'LENGTH -- remove access watchpoint *(draft)*

`Z'`4'`,'ADDR`,'LENGTH -- insert access watchpoint *(draft)*
     Insert (`Z4') or remove (`z4') an access watchpoint.

     Reply:
    `OK'
          success

    `'
          not supported

    `ENN'
          for an error



File: gdb.info,  Node: Stop Reply Packets,  Next: General Query Packets,  Prev: Packets,  Up: Remote Protocol

Stop Reply Packets
==================

The `C', `c', `S', `s' and `?' packets can receive any of the below as
a reply.  In the case of the `C', `c', `S' and `s' packets, that reply
is only returned when the target halts.  In the below the exact meaning
of `signal number' is poorly defined.  In general one of the UNIX
signal numbering conventions is used.

`SAA'
     AA is the signal number

``T'AAN...`:'R...`;'N...`:'R...`;'N...`:'R...`;''
     AA = two hex digit signal number; N... = register number (hex),
     R...  = target byte ordered register contents, size defined by
     `DEPRECATED_REGISTER_RAW_SIZE'; N... = `thread', R... = thread
     process ID, this is a hex integer; N... = (`watch' | `rwatch' |
     `awatch', R... = data address, this is a hex integer; N... = other
     string not starting with valid hex digit.  GDB should ignore this
     N..., R... pair and go on to the next.  This way we can extend the
     protocol.

`WAA'
     The process exited, and AA is the exit status.  This is only
     applicable to certain targets.

`XAA'
     The process terminated with signal AA.

`OXX...'
     XX... is hex encoding of ASCII data.  This can happen at any time
     while the program is running and the debugger should continue to
     wait for `W', `T', etc.

`FCALL-ID`,'PARAMETER...'
     CALL-ID is the identifier which says which host system call should
     be called.  This is just the name of the function.  Translation
     into the correct system call is only applicable as it's defined in
     GDB.  *Note File-I/O remote protocol extension::, for a list of
     implemented system calls.

     PARAMETER... is a list of parameters as defined for this very
     system call.

     The target replies with this packet when it expects GDB to call a
     host system call on behalf of the target.  GDB replies with an
     appropriate `F' packet and keeps up waiting for the next reply
     packet from the target.  The latest `C', `c', `S' or `s' action is
     expected to be continued.  *Note File-I/O remote protocol
     extension::, for more details.



File: gdb.info,  Node: General Query Packets,  Next: Register Packet Format,  Prev: Stop Reply Packets,  Up: Remote Protocol

General Query Packets
=====================

The following set and query packets have already been defined.

`q'`C' -- current thread
     Return the current thread id.

     Reply:
    ``QC'PID'
          Where PID is a HEX encoded 16 bit process id.

    `*'
          Any other reply implies the old pid.

`q'`fThreadInfo' - all thread ids
     `q'`sThreadInfo'

     Obtain a list of active thread ids from the target (OS).  Since
     there may be too many active threads to fit into one reply packet,
     this query works iteratively: it may require more than one
     query/reply sequence to obtain the entire list of threads.  The
     first query of the sequence will be the `qf'`ThreadInfo' query;
     subsequent queries in the sequence will be the `qs'`ThreadInfo'
     query.

     NOTE: replaces the `qL' query (see below).

     Reply:
    ``m'ID'
          A single thread id

    ``m'ID,ID...'
          a comma-separated list of thread ids

    ``l''
          (lower case 'el') denotes end of list.

     In response to each query, the target will reply with a list of
     one or more thread ids, in big-endian hex, separated by commas.
     GDB will respond to each reply with a request for more thread ids
     (using the `qs' form of the query), until the target responds with
     `l' (lower-case el, for `'last'').

`q'`ThreadExtraInfo'`,'ID -- extra thread info
     Where ID is a thread-id in big-endian hex.  Obtain a printable
     string description of a thread's attributes from the target OS.
     This string may contain anything that the target OS thinks is
     interesting for GDB to tell the user about the thread.  The string
     is displayed in GDB's `info threads' display.  Some examples of
     possible thread extra info strings are "Runnable", or "Blocked on
     Mutex".

     Reply:
    `XX...'
          Where XX... is a hex encoding of ASCII data, comprising the
          printable string containing the extra information about the
          thread's attributes.

`q'`L'STARTFLAGTHREADCOUNTNEXTTHREAD -- query LIST or THREADLIST *(deprecated)*
     Obtain thread information from RTOS.  Where: STARTFLAG (one hex
     digit) is one to indicate the first query and zero to indicate a
     subsequent query; THREADCOUNT (two hex digits) is the maximum
     number of threads the response packet can contain; and NEXTTHREAD
     (eight hex digits), for subsequent queries (STARTFLAG is zero), is
     returned in the response as ARGTHREAD.

     NOTE: this query is replaced by the `q'`fThreadInfo' query (see
     above).

     Reply:
    ``q'`M'COUNTDONEARGTHREADTHREAD...'
          Where: COUNT (two hex digits) is the number of threads being
          returned; DONE (one hex digit) is zero to indicate more
          threads and one indicates no further threads; ARGTHREADID
          (eight hex digits) is NEXTTHREAD from the request packet;
          THREAD...  is a sequence of thread IDs from the target.
          THREADID (eight hex digits).  See
          `remote.c:parse_threadlist_response()'.

`q'`CRC:'ADDR`,'LENGTH -- compute CRC of memory block
     Reply:
    ``E'NN'
          An error (such as memory fault)

    ``C'CRC32'
          A 32 bit cyclic redundancy check of the specified memory
          region.

`q'`Offsets' -- query sect offs
     Get section offsets that the target used when re-locating the
     downloaded image.  _Note: while a `Bss' offset is included in the
     response, GDB ignores this and instead applies the `Data' offset
     to the `Bss' section._

     Reply:
    ``Text='XXX`;Data='YYY`;Bss='ZZZ'

`q'`P'MODETHREADID -- thread info request
     Returns information on THREADID.  Where: MODE is a hex encoded 32
     bit mode; THREADID is a hex encoded 64 bit thread ID.

     Reply:
    `*'

     See `remote.c:remote_unpack_thread_info_response()'.

`q'`Rcmd,'COMMAND -- remote command
     COMMAND (hex encoded) is passed to the local interpreter for
     execution.  Invalid commands should be reported using the output
     string.  Before the final result packet, the target may also
     respond with a number of intermediate `O'OUTPUT console output
     packets.  _Implementors should note that providing access to a
     stubs's interpreter may have security implications_.

     Reply:
    `OK'
          A command response with no output.

    `OUTPUT'
          A command response with the hex encoded output string OUTPUT.

    ``E'NN'
          Indicate a badly formed request.

    ``''
          When `q'`Rcmd' is not recognized.

`qSymbol::' -- symbol lookup
     Notify the target that GDB is prepared to serve symbol lookup
     requests.  Accept requests from the target for the values of
     symbols.

     Reply:
    ``OK''
          The target does not need to look up any (more) symbols.

    ``qSymbol:'SYM_NAME'
          The target requests the value of symbol SYM_NAME (hex
          encoded).  GDB may provide the value by using the
          `qSymbol:'SYM_VALUE:SYM_NAME message, described below.

`qSymbol:'SYM_VALUE:SYM_NAME -- symbol value
     Set the value of SYM_NAME to SYM_VALUE.

     SYM_NAME (hex encoded) is the name of a symbol whose value the
     target has previously requested.

     SYM_VALUE (hex) is the value for symbol SYM_NAME.  If GDB cannot
     supply a value for SYM_NAME, then this field will be empty.

     Reply:
    ``OK''
          The target does not need to look up any (more) symbols.

    ``qSymbol:'SYM_NAME'
          The target requests the value of a new symbol SYM_NAME (hex
          encoded).  GDB will continue to supply the values of symbols
          (if available), until the target ceases to request them.

`qPart':OBJECT:`read':ANNEX:OFFSET,LENGTH -- read special data
     Read uninterpreted bytes from the target's special data area
     identified by the keyword `object'.  Request LENGTH bytes starting
     at OFFSET bytes into the data.  The content and encoding of ANNEX
     is specific to the object; it can supply additional details about
     what data to access.

     Here are the specific requests of this form defined so far.  All
     ``qPart':OBJECT:`read':...' requests use the same reply formats,
     listed below.

    `qPart':`auxv':`read'::OFFSET,LENGTH
          Access the target's "auxiliary vector".  *Note Auxiliary
          Vector::.  Note ANNEX must be empty.

     Reply:
    `OK'
          The OFFSET in the request is at the end of the data.  There
          is no more data to be read.

    XX...
          Hex encoded data bytes read.  This may be fewer bytes than
          the LENGTH in the request.

    `E00'
          The request was malformed, or ANNEX was invalid.

    `E'NN
          The offset was invalid, or there was an error encountered
          reading the data.  NN is a hex-encoded `errno' value.

    `""' (empty)
          An empty reply indicates the OBJECT or ANNEX string was not
          recognized by the stub.

`qPart':OBJECT:`write':ANNEX:OFFSET:DATA...
     Write uninterpreted bytes into the target's special data area
     identified by the keyword `object', starting at OFFSET bytes into
     the data.  DATA... is the hex-encoded data to be written.  The
     content and encoding of ANNEX is specific to the object; it can
     supply additional details about what data to access.

     No requests of this form are presently in use.  This specification
     serves as a placeholder to document the common format that new
     specific request specifications ought to use.

     Reply:
    NN
          NN (hex encoded) is the number of bytes written.  This may be
          fewer bytes than supplied in the request.

    `E00'
          The request was malformed, or ANNEX was invalid.

    `E'NN
          The offset was invalid, or there was an error encountered
          writing the data.  NN is a hex-encoded `errno' value.

    `""' (empty)
          An empty reply indicates the OBJECT or ANNEX string was not
          recognized by the stub, or that the object does not support
          writing.

`qPart':OBJECT:OPERATION:...
     Requests of this form may be added in the future.  When a stub does
     not recognize the OBJECT keyword, or its support for OBJECT does
     not recognize the OPERATION keyword, the stub must respond with an
     empty packet.


File: gdb.info,  Node: Register Packet Format,  Next: Examples,  Prev: General Query Packets,  Up: Remote Protocol

Register Packet Format
======================

The following `g'/`G' packets have previously been defined.  In the
below, some thirty-two bit registers are transferred as sixty-four
bits.  Those registers should be zero/sign extended (which?)  to fill
the space allocated.  Register bytes are transfered in target byte
order.  The two nibbles within a register byte are transfered
most-significant - least-significant.

MIPS32
     All registers are transfered as thirty-two bit quantities in the
     order: 32 general-purpose; sr; lo; hi; bad; cause; pc; 32
     floating-point registers; fsr; fir; fp.

MIPS64
     All registers are transfered as sixty-four bit quantities
     (including thirty-two bit registers such as `sr').  The ordering
     is the same as `MIPS32'.



File: gdb.info,  Node: Examples,  Next: File-I/O remote protocol extension,  Prev: Register Packet Format,  Up: Remote Protocol

Examples
========

Example sequence of a target being re-started.  Notice how the restart
does not get any direct output:

     -> `R00'
     <- `+'
     _target restarts_
     -> `?'
     <- `+'
     <- `T001:1234123412341234'
     -> `+'

   Example sequence of a target being stepped by a single instruction:

     -> `G1445...'
     <- `+'
     -> `s'
     <- `+'
     _time passes_
     <- `T001:1234123412341234'
     -> `+'
     -> `g'
     <- `+'
     <- `1455...'
     -> `+'


File: gdb.info,  Node: File-I/O remote protocol extension,  Prev: Examples,  Up: Remote Protocol

File-I/O remote protocol extension
==================================

* Menu:

* File-I/O Overview::
* Protocol basics::
* The F request packet::
* The F reply packet::
* Memory transfer::
* The Ctrl-C message::
* Console I/O::
* The isatty call::
* The system call::
* List of supported calls::
* Protocol specific representation of datatypes::
* Constants::
* File-I/O Examples::


File: gdb.info,  Node: File-I/O Overview,  Next: Protocol basics,  Up: File-I/O remote protocol extension

File-I/O Overview
-----------------

The File I/O remote protocol extension (short: File-I/O) allows the
target to use the hosts file system and console I/O when calling various
system calls.  System calls on the target system are translated into a
remote protocol packet to the host system which then performs the needed
actions and returns with an adequate response packet to the target
system.  This simulates file system operations even on targets that
lack file systems.

   The protocol is defined host- and target-system independent.  It uses
it's own independent representation of datatypes and values.  Both, GDB
and the target's GDB stub are responsible for translating the system
dependent values into the unified protocol values when data is
transmitted.

   The communication is synchronous.  A system call is possible only
when GDB is waiting for the `C', `c', `S' or `s' packets.  While GDB
handles the request for a system call, the target is stopped to allow
deterministic access to the target's memory.  Therefore File-I/O is not
interuptible by target signals.  It is possible to interrupt File-I/O
by a user interrupt (Ctrl-C), though.

   The target's request to perform a host system call does not finish
the latest `C', `c', `S' or `s' action.  That means, after finishing
the system call, the target returns to continuing the previous activity
(continue, step).  No additional continue or step request from GDB is
required.

     (gdb) continue
       <- target requests 'system call X'
       target is stopped, GDB executes system call
       -> GDB returns result
       ... target continues, GDB returns to wait for the target
       <- target hits breakpoint and sends a Txx packet

   The protocol is only used for files on the host file system and for
I/O on the console.  Character or block special devices, pipes, named
pipes or sockets or any other communication method on the host system
are not supported by this protocol.


File: gdb.info,  Node: Protocol basics,  Next: The F request packet,  Prev: File-I/O Overview,  Up: File-I/O remote protocol extension

Protocol basics
---------------

The File-I/O protocol uses the `F' packet, as request as well as as
reply packet.  Since a File-I/O system call can only occur when GDB is
waiting for the continuing or stepping target, the File-I/O request is
a reply that GDB has to expect as a result of a former `C', `c', `S' or
`s' packet.  This `F' packet contains all information needed to allow
GDB to call the appropriate host system call:

   * A unique identifier for the requested system call.

   * All parameters to the system call.  Pointers are given as addresses
     in the target memory address space.  Pointers to strings are given
     as pointer/length pair.  Numerical values are given as they are.
     Numerical control values are given in a protocol specific
     representation.


   At that point GDB has to perform the following actions.

   * If parameter pointer values are given, which point to data needed
     as input to a system call, GDB requests this data from the target
     with a standard `m' packet request.  This additional communication
     has to be expected by the target implementation and is handled as
     any other `m' packet.

   * GDB translates all value from protocol representation to host
     representation as needed.  Datatypes are coerced into the host
     types.

   * GDB calls the system call

   * It then coerces datatypes back to protocol representation.

   * If pointer parameters in the request packet point to buffer space
     in which a system call is expected to copy data to, the data is
     transmitted to the target using a `M' or `X' packet.  This packet
     has to be expected by the target implementation and is handled as
     any other `M' or `X' packet.


   Eventually GDB replies with another `F' packet which contains all
necessary information for the target to continue.  This at least
contains

   * Return value.

   * `errno', if has been changed by the system call.

   * "Ctrl-C" flag.


   After having done the needed type and value coercion, the target
continues the latest continue or step action.


File: gdb.info,  Node: The F request packet,  Next: The F reply packet,  Prev: Protocol basics,  Up: File-I/O remote protocol extension

The `F' request packet
----------------------

The `F' request packet has the following format:

          `F'CALL-ID`,'PARAMETER...

     CALL-ID is the identifier to indicate the host system call to be
     called.  This is just the name of the function.

     PARAMETER... are the parameters to the system call.


   Parameters are hexadecimal integer values, either the real values in
case of scalar datatypes, as pointers to target buffer space in case of
compound datatypes and unspecified memory areas or as pointer/length
pairs in case of string parameters.  These are appended to the call-id,
each separated from its predecessor by a comma.  All values are
transmitted in ASCII string representation, pointer/length pairs
separated by a slash.


File: gdb.info,  Node: The F reply packet,  Next: Memory transfer,  Prev: The F request packet,  Up: File-I/O remote protocol extension

The `F' reply packet
--------------------

The `F' reply packet has the following format:

          `F'RETCODE`,'ERRNO`,'CTRL-C FLAG`;'CALL SPECIFIC ATTACHMENT

     RETCODE is the return code of the system call as hexadecimal value.

     ERRNO is the errno set by the call, in protocol specific
     representation.  This parameter can be omitted if the call was
     successful.

     CTRL-C FLAG is only send if the user requested a break.  In this
     case, ERRNO must be send as well, even if the call was successful.
     The CTRL-C FLAG itself consists of the character 'C':

          F0,0,C

     or, if the call was interupted before the host call has been
     performed:

          F-1,4,C

     assuming 4 is the protocol specific representation of `EINTR'.



File: gdb.info,  Node: Memory transfer,  Next: The Ctrl-C message,  Prev: The F reply packet,  Up: File-I/O remote protocol extension

Memory transfer
---------------

Structured data which is transferred using a memory read or write as
e.g.  a `struct stat' is expected to be in a protocol specific format
with all scalar multibyte datatypes being big endian.  This should be
done by the target before the `F' packet is sent resp. by GDB before it
transfers memory to the target.  Transferred pointers to structured
data should point to the already coerced data at any time.


File: gdb.info,  Node: The Ctrl-C message,  Next: Console I/O,  Prev: Memory transfer,  Up: File-I/O remote protocol extension

The Ctrl-C message
------------------

A special case is, if the CTRL-C FLAG is set in the GDB reply packet.
In this case the target should behave, as if it had gotten a break
message.  The meaning for the target is "system call interupted by
`SIGINT'".  Consequentially, the target should actually stop (as with a
break message) and return to GDB with a `T02' packet.  In this case,
it's important for the target to know, in which state the system call
was interrupted.  Since this action is by design not an atomic
operation, we have to differ between two cases:

   * The system call hasn't been performed on the host yet.

   * The system call on the host has been finished.


   These two states can be distinguished by the target by the value of
the returned `errno'.  If it's the protocol representation of `EINTR',
the system call hasn't been performed.  This is equivalent to the
`EINTR' handling on POSIX systems.  In any other case, the target may
presume that the system call has been finished -- successful or not --
and should behave as if the break message arrived right after the
system call.

   GDB must behave reliable.  If the system call has not been called
yet, GDB may send the `F' reply immediately, setting `EINTR' as `errno'
in the packet.  If the system call on the host has been finished before
the user requests a break, the full action must be finshed by GDB.
This requires sending `M' or `X' packets as they fit.  The `F' packet
may only be send when either nothing has happened or the full action
has been completed.


File: gdb.info,  Node: Console I/O,  Next: The isatty call,  Prev: The Ctrl-C message,  Up: File-I/O remote protocol extension

Console I/O
-----------

By default and if not explicitely closed by the target system, the file
descriptors 0, 1 and 2 are connected to the GDB console.  Output on the
GDB console is handled as any other file output operation (`write(1,
...)' or `write(2, ...)').  Console input is handled by GDB so that
after the target read request from file descriptor 0 all following
typing is buffered until either one of the following conditions is met:

   * The user presses `Ctrl-C'.  The behaviour is as explained above,
     the `read' system call is treated as finished.

   * The user presses `Enter'.  This is treated as end of input with a
     trailing line feed.

   * The user presses `Ctrl-D'.  This is treated as end of input.  No
     trailing character, especially no Ctrl-D is appended to the input.


   If the user has typed more characters as fit in the buffer given to
the read call, the trailing characters are buffered in GDB until either
another `read(0, ...)' is requested by the target or debugging is
stopped on users request.


File: gdb.info,  Node: The isatty call,  Next: The system call,  Prev: Console I/O,  Up: File-I/O remote protocol extension

The isatty(3) call
------------------

A special case in this protocol is the library call `isatty' which is
implemented as it's own call inside of this protocol.  It returns 1 to
the target if the file descriptor given as parameter is attached to the
GDB console, 0 otherwise.  Implementing through system calls would
require implementing `ioctl' and would be more complex than needed.


File: gdb.info,  Node: The system call,  Next: List of supported calls,  Prev: The isatty call,  Up: File-I/O remote protocol extension

The system(3) call
------------------

The other special case in this protocol is the `system' call which is
implemented as it's own call, too.  GDB is taking over the full task of
calling the necessary host calls to perform the `system' call.  The
return value of `system' is simplified before it's returned to the
target.  Basically, the only signal transmitted back is `EINTR' in case
the user pressed `Ctrl-C'.  Otherwise the return value consists
entirely of the exit status of the called command.

   Due to security concerns, the `system' call is refused to be called
by GDB by default.  The user has to allow this call explicitly by
entering

``set remote system-call-allowed 1''

   Disabling the `system' call is done by

``set remote system-call-allowed 0''

   The current setting is shown by typing

``show remote system-call-allowed''


File: gdb.info,  Node: List of supported calls,  Next: Protocol specific representation of datatypes,  Prev: The system call,  Up: File-I/O remote protocol extension

List of supported calls
-----------------------

* Menu:

* open::
* close::
* read::
* write::
* lseek::
* rename::
* unlink::
* stat/fstat::
* gettimeofday::
* isatty::
* system::


File: gdb.info,  Node: open,  Next: close,  Up: List of supported calls

open
....

Synopsis:
     int open(const char *pathname, int flags);
     int open(const char *pathname, int flags, mode_t mode);
     
Request:
     Fopen,pathptr/len,flags,mode

`flags' is the bitwise or of the following values:

`O_CREAT'
     If the file does not exist it will be created.  The host rules
     apply as far as file ownership and time stamps are concerned.

`O_EXCL'
     When used with O_CREAT, if the file already exists it is an error
     and open() fails.

`O_TRUNC'
     If the file already exists and the open mode allows writing
     (O_RDWR or O_WRONLY is given) it will be truncated to length 0.

`O_APPEND'
     The file is opened in append mode.

`O_RDONLY'
     The file is opened for reading only.

`O_WRONLY'
     The file is opened for writing only.

`O_RDWR'
     The file is opened for reading and writing.

     Each other bit is silently ignored.


`mode' is the bitwise or of the following values:

`S_IRUSR'
     User has read permission.

`S_IWUSR'
     User has write permission.

`S_IRGRP'
     Group has read permission.

`S_IWGRP'
     Group has write permission.

`S_IROTH'
     Others have read permission.

`S_IWOTH'
     Others have write permission.

     Each other bit is silently ignored.


Return value:
     open returns the new file descriptor or -1 if an error
     occured.
     
Errors:


`EEXIST'
     pathname already exists and O_CREAT and O_EXCL were used.

`EISDIR'
     pathname refers to a directory.

`EACCES'
     The requested access is not allowed.

`ENAMETOOLONG'
     pathname was too long.

`ENOENT'
     A directory component in pathname does not exist.

`ENODEV'
     pathname refers to a device, pipe, named pipe or socket.

`EROFS'
     pathname refers to a file on a read-only filesystem and write
     access was requested.

`EFAULT'
     pathname is an invalid pointer value.

`ENOSPC'
     No space on device to create the file.

`EMFILE'
     The process already has the maximum number of files open.

`ENFILE'
     The limit on the total number of files open on the system has been
     reached.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: close,  Next: read,  Prev: open,  Up: List of supported calls

close
.....

Synopsis:
     int close(int fd);
     
Request:
     Fclose,fd
     
Return value:
     close returns zero on success, or -1 if an error occurred.
     
Errors:


`EBADF'
     fd isn't a valid open file descriptor.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: read,  Next: write,  Prev: close,  Up: List of supported calls

read
....

Synopsis:
     int read(int fd, void *buf, unsigned int count);
     
Request:
     Fread,fd,bufptr,count
     
Return value:
     On success, the number of bytes read is returned.
     Zero indicates end of file.  If count is zero, read
     returns zero as well.  On error, -1 is returned.
     
Errors:


`EBADF'
     fd is not a valid file descriptor or is not open for reading.

`EFAULT'
     buf is an invalid pointer value.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: write,  Next: lseek,  Prev: read,  Up: List of supported calls

write
.....

Synopsis:
     int write(int fd, const void *buf, unsigned int count);
     
Request:
     Fwrite,fd,bufptr,count
     
Return value:
     On success, the number of bytes written are returned.
     Zero indicates nothing was written.  On error, -1
     is returned.
     
Errors:


`EBADF'
     fd is not a valid file descriptor or is not open for writing.

`EFAULT'
     buf is an invalid pointer value.

`EFBIG'
     An attempt was made to write a file that exceeds the host specific
     maximum file size allowed.

`ENOSPC'
     No space on device to write the data.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: lseek,  Next: rename,  Prev: write,  Up: List of supported calls

lseek
.....

Synopsis:
     long lseek (int fd, long offset, int flag);
     
Request:
     Flseek,fd,offset,flag

   `flag' is one of:

`SEEK_SET'
     The offset is set to offset bytes.

`SEEK_CUR'
     The offset is set to its current location plus offset bytes.

`SEEK_END'
     The offset is set to the size of the file plus offset bytes.

Return value:
     On success, the resulting unsigned offset in bytes from
     the beginning of the file is returned.  Otherwise, a
     value of -1 is returned.
     
Errors:


`EBADF'
     fd is not a valid open file descriptor.

`ESPIPE'
     fd is associated with the GDB console.

`EINVAL'
     flag is not a proper value.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: rename,  Next: unlink,  Prev: lseek,  Up: List of supported calls

rename
......

Synopsis:
     int rename(const char *oldpath, const char *newpath);
     
Request:
     Frename,oldpathptr/len,newpathptr/len
     
Return value:
     On success, zero is returned.  On error, -1 is returned.
     
Errors:


`EISDIR'
     newpath is an existing directory, but oldpath is not a directory.

`EEXIST'
     newpath is a non-empty directory.

`EBUSY'
     oldpath or newpath is a directory that is in use by some process.

`EINVAL'
     An attempt was made to make a directory a subdirectory of itself.

`ENOTDIR'
     A  component used as a directory in oldpath or new path is not a
     directory.  Or oldpath is a directory and newpath exists but is
     not a directory.

`EFAULT'
     oldpathptr or newpathptr are invalid pointer values.

`EACCES'
     No access to the file or the path of the file.

`ENAMETOOLONG'
     oldpath or newpath was too long.

`ENOENT'
     A directory component in oldpath or newpath does not exist.

`EROFS'
     The file is on a read-only filesystem.

`ENOSPC'
     The device containing the file has no room for the new directory
     entry.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: unlink,  Next: stat/fstat,  Prev: rename,  Up: List of supported calls

unlink
......

Synopsis:
     int unlink(const char *pathname);
     
Request:
     Funlink,pathnameptr/len
     
Return value:
     On success, zero is returned.  On error, -1 is returned.
     
Errors:


`EACCES'
     No access to the file or the path of the file.

`EPERM'
     The system does not allow unlinking of directories.

`EBUSY'
     The file pathname cannot be unlinked because it's being used by
     another process.

`EFAULT'
     pathnameptr is an invalid pointer value.

`ENAMETOOLONG'
     pathname was too long.

`ENOENT'
     A directory component in pathname does not exist.

`ENOTDIR'
     A component of the path is not a directory.

`EROFS'
     The file is on a read-only filesystem.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: stat/fstat,  Next: gettimeofday,  Prev: unlink,  Up: List of supported calls

stat/fstat
..........

Synopsis:
     int stat(const char *pathname, struct stat *buf);
     int fstat(int fd, struct stat *buf);
     
Request:
     Fstat,pathnameptr/len,bufptr
     Ffstat,fd,bufptr
     
Return value:
     On success, zero is returned.  On error, -1 is returned.
     
Errors:


`EBADF'
     fd is not a valid open file.

`ENOENT'
     A directory component in pathname does not exist or the path is an
     empty string.

`ENOTDIR'
     A component of the path is not a directory.

`EFAULT'
     pathnameptr is an invalid pointer value.

`EACCES'
     No access to the file or the path of the file.

`ENAMETOOLONG'
     pathname was too long.

`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: gettimeofday,  Next: isatty,  Prev: stat/fstat,  Up: List of supported calls

gettimeofday
............

Synopsis:
     int gettimeofday(struct timeval *tv, void *tz);
     
Request:
     Fgettimeofday,tvptr,tzptr
     
Return value:
     On success, 0 is returned, -1 otherwise.
     
Errors:


`EINVAL'
     tz is a non-NULL pointer.

`EFAULT'
     tvptr and/or tzptr is an invalid pointer value.


File: gdb.info,  Node: isatty,  Next: system,  Prev: gettimeofday,  Up: List of supported calls

isatty
......

Synopsis:
     int isatty(int fd);
     
Request:
     Fisatty,fd
     
Return value:
     Returns 1 if fd refers to the GDB console, 0 otherwise.
     
Errors:


`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: system,  Prev: isatty,  Up: List of supported calls

system
......

Synopsis:
     int system(const char *command);
     
Request:
     Fsystem,commandptr/len
     
Return value:
     The value returned is -1 on error and the return status
     of the command otherwise.  Only the exit status of the
     command is returned, which is extracted from the hosts
     system return value by calling WEXITSTATUS(retval).
     In case /bin/sh could not be executed, 127 is returned.
     
Errors:


`EINTR'
     The call was interrupted by the user.


File: gdb.info,  Node: Protocol specific representation of datatypes,  Next: Constants,  Prev: List of supported calls,  Up: File-I/O remote protocol extension

Protocol specific representation of datatypes
---------------------------------------------

* Menu:

* Integral datatypes::
* Pointer values::
* struct stat::
* struct timeval::


File: gdb.info,  Node: Integral datatypes,  Next: Pointer values,  Up: Protocol specific representation of datatypes

Integral datatypes
..................

The integral datatypes used in the system calls are

     int, unsigned int, long, unsigned long, mode_t and time_t

   `Int', `unsigned int', `mode_t' and `time_t' are implemented as 32
bit values in this protocol.

   `Long' and `unsigned long' are implemented as 64 bit types.

   *Note Limits::, for corresponding MIN and MAX values (similar to
those in `limits.h') to allow range checking on host and target.

   `time_t' datatypes are defined as seconds since the Epoch.

   All integral datatypes transferred as part of a memory read or write
of a structured datatype e.g. a `struct stat' have to be given in big
endian byte order.


File: gdb.info,  Node: Pointer values,  Next: struct stat,  Prev: Integral datatypes,  Up: Protocol specific representation of datatypes

Pointer values
..............

Pointers to target data are transmitted as they are.  An exception is
made for pointers to buffers for which the length isn't transmitted as
part of the function call, namely strings.  Strings are transmitted as
a pointer/length pair, both as hex values, e.g.

     `1aaf/12'

which is a pointer to data of length 18 bytes at position 0x1aaf.  The
length is defined as the full string length in bytes, including the
trailing null byte.  Example:

     ``hello, world'' at address 0x123456

is transmitted as

     `123456/d'


File: gdb.info,  Node: struct stat,  Next: struct timeval,  Prev: Pointer values,  Up: Protocol specific representation of datatypes

struct stat
...........

The buffer of type struct stat used by the target and GDB is defined as
follows:

     struct stat {
         unsigned int  st_dev;      /* device */
         unsigned int  st_ino;      /* inode */
         mode_t        st_mode;     /* protection */
         unsigned int  st_nlink;    /* number of hard links */
         unsigned int  st_uid;      /* user ID of owner */
         unsigned int  st_gid;      /* group ID of owner */
         unsigned int  st_rdev;     /* device type (if inode device) */
         unsigned long st_size;     /* total size, in bytes */
         unsigned long st_blksize;  /* blocksize for filesystem I/O */
         unsigned long st_blocks;   /* number of blocks allocated */
         time_t        st_atime;    /* time of last access */
         time_t        st_mtime;    /* time of last modification */
         time_t        st_ctime;    /* time of last change */
     };

   The integral datatypes are conforming to the definitions given in the
approriate section (see *Note Integral datatypes::, for details) so this
structure is of size 64 bytes.

   The values of several fields have a restricted meaning and/or range
of values.

     st_dev:     0       file
                 1       console
     
     st_ino:     No valid meaning for the target.  Transmitted unchanged.
     
     st_mode:    Valid mode bits are described in Appendix C.  Any other
                 bits have currently no meaning for the target.
     
     st_uid:     No valid meaning for the target.  Transmitted unchanged.
     
     st_gid:     No valid meaning for the target.  Transmitted unchanged.
     
     st_rdev:    No valid meaning for the target.  Transmitted unchanged.
     
     st_atime, st_mtime, st_ctime:
                 These values have a host and file system dependent
                 accuracy.  Especially on Windows hosts the file systems
                 don't support exact timing values.

   The target gets a struct stat of the above representation and is
responsible to coerce it to the target representation before continuing.

   Note that due to size differences between the host and target
representation of stat members, these members could eventually get
truncated on the target.


File: gdb.info,  Node: struct timeval,  Prev: struct stat,  Up: Protocol specific representation of datatypes

struct timeval
..............

The buffer of type struct timeval used by the target and GDB is defined
as follows:

     struct timeval {
         time_t tv_sec;  /* second */
         long   tv_usec; /* microsecond */
     };

   The integral datatypes are conforming to the definitions given in the
approriate section (see *Note Integral datatypes::, for details) so this
structure is of size 8 bytes.


File: gdb.info,  Node: Constants,  Next: File-I/O Examples,  Prev: Protocol specific representation of datatypes,  Up: File-I/O remote protocol extension

Constants
---------

The following values are used for the constants inside of the protocol.
GDB and target are resposible to translate these values before and
after the call as needed.

* Menu:

* Open flags::
* mode_t values::
* Errno values::
* Lseek flags::
* Limits::


File: gdb.info,  Node: Open flags,  Next: mode_t values,  Up: Constants

Open flags
..........

All values are given in hexadecimal representation.

       O_RDONLY        0x0
       O_WRONLY        0x1
       O_RDWR          0x2
       O_APPEND        0x8
       O_CREAT       0x200
       O_TRUNC       0x400
       O_EXCL        0x800


File: gdb.info,  Node: mode_t values,  Next: Errno values,  Prev: Open flags,  Up: Constants

mode_t values
.............

All values are given in octal representation.

       S_IFREG       0100000
       S_IFDIR        040000
       S_IRUSR          0400
       S_IWUSR          0200
       S_IXUSR          0100
       S_IRGRP           040
       S_IWGRP           020
       S_IXGRP           010
       S_IROTH            04
       S_IWOTH            02
       S_IXOTH            01


File: gdb.info,  Node: Errno values,  Next: Lseek flags,  Prev: mode_t values,  Up: Constants

Errno values
............

All values are given in decimal representation.

       EPERM           1
       ENOENT          2
       EINTR           4
       EBADF           9
       EACCES         13
       EFAULT         14
       EBUSY          16
       EEXIST         17
       ENODEV         19
       ENOTDIR        20
       EISDIR         21
       EINVAL         22
       ENFILE         23
       EMFILE         24
       EFBIG          27
       ENOSPC         28
       ESPIPE         29
       EROFS          30
       ENAMETOOLONG   91
       EUNKNOWN       9999

   EUNKNOWN is used as a fallback error value if a host system returns
any error value not in the list of supported error numbers.


File: gdb.info,  Node: Lseek flags,  Next: Limits,  Prev: Errno values,  Up: Constants

Lseek flags
...........

       SEEK_SET      0
       SEEK_CUR      1
       SEEK_END      2


File: gdb.info,  Node: Limits,  Prev: Lseek flags,  Up: Constants

Limits
......

All values are given in decimal representation.

       INT_MIN       -2147483648
       INT_MAX        2147483647
       UINT_MAX       4294967295
       LONG_MIN      -9223372036854775808
       LONG_MAX       9223372036854775807
       ULONG_MAX      18446744073709551615


File: gdb.info,  Node: File-I/O Examples,  Prev: Constants,  Up: File-I/O remote protocol extension

File-I/O Examples
-----------------

Example sequence of a write call, file descriptor 3, buffer is at target
address 0x1234, 6 bytes should be written:

     <- `Fwrite,3,1234,6'
     _request memory read from target_
     -> `m1234,6'
     <- XXXXXX
     _return "6 bytes written"_
     -> `F6'

   Example sequence of a read call, file descriptor 3, buffer is at
target address 0x1234, 6 bytes should be read:

     <- `Fread,3,1234,6'
     _request memory write to target_
     -> `X1234,6:XXXXXX'
     _return "6 bytes read"_
     -> `F6'

   Example sequence of a read call, call fails on the host due to
invalid file descriptor (EBADF):

     <- `Fread,3,1234,6'
     -> `F-1,9'

   Example sequence of a read call, user presses Ctrl-C before syscall
on host is called:

     <- `Fread,3,1234,6'
     -> `F-1,4,C'
     <- `T02'

   Example sequence of a read call, user presses Ctrl-C after syscall on
host is called:

     <- `Fread,3,1234,6'
     -> `X1234,6:XXXXXX'
     <- `T02'


File: gdb.info,  Node: Agent Expressions,  Next: Copying,  Prev: Remote Protocol,  Up: Top

The GDB Agent Expression Mechanism
**********************************

In some applications, it is not feasable for the debugger to interrupt
the program's execution long enough for the developer to learn anything
helpful about its behavior.  If the program's correctness depends on its
real-time behavior, delays introduced by a debugger might cause the
program to fail, even when the code itself is correct.  It is useful to
be able to observe the program's behavior without interrupting it.

   Using GDB's `trace' and `collect' commands, the user can specify
locations in the program, and arbitrary expressions to evaluate when
those locations are reached.  Later, using the `tfind' command, she can
examine the values those expressions had when the program hit the trace
points.  The expressions may also denote objects in memory --
structures or arrays, for example -- whose values GDB should record;
while visiting a particular tracepoint, the user may inspect those
objects as if they were in memory at that moment.  However, because GDB
records these values without interacting with the user, it can do so
quickly and unobtrusively, hopefully not disturbing the program's
behavior.

   When GDB is debugging a remote target, the GDB "agent" code running
on the target computes the values of the expressions itself.  To avoid
having a full symbolic expression evaluator on the agent, GDB translates
expressions in the source language into a simpler bytecode language, and
then sends the bytecode to the agent; the agent then executes the
bytecode, and records the values for GDB to retrieve later.

   The bytecode language is simple; there are forty-odd opcodes, the
bulk of which are the usual vocabulary of C operands (addition,
subtraction, shifts, and so on) and various sizes of literals and
memory reference operations.  The bytecode interpreter operates
strictly on machine-level values -- various sizes of integers and
floating point numbers -- and requires no information about types or
symbols; thus, the interpreter's internal data structures are simple,
and each bytecode requires only a few native machine instructions to
implement it.  The interpreter is small, and strict limits on the
memory and time required to evaluate an expression are easy to
determine, making it suitable for use by the debugging agent in
real-time applications.

* Menu:

* General Bytecode Design::     Overview of the interpreter.
* Bytecode Descriptions::       What each one does.
* Using Agent Expressions::     How agent expressions fit into the big picture.
* Varying Target Capabilities:: How to discover what the target can do.
* Tracing on Symmetrix::        Special info for implementation on EMC's
                                boxes.
* Rationale::                   Why we did it this way.


File: gdb.info,  Node: General Bytecode Design,  Next: Bytecode Descriptions,  Up: Agent Expressions

General Bytecode Design
=======================

The agent represents bytecode expressions as an array of bytes.  Each
instruction is one byte long (thus the term "bytecode").  Some
instructions are followed by operand bytes; for example, the `goto'
instruction is followed by a destination for the jump.

   The bytecode interpreter is a stack-based machine; most instructions
pop their operands off the stack, perform some operation, and push the
result back on the stack for the next instruction to consume.  Each
element of the stack may contain either a integer or a floating point
value; these values are as many bits wide as the largest integer that
can be directly manipulated in the source language.  Stack elements
carry no record of their type; bytecode could push a value as an
integer, then pop it as a floating point value.  However, GDB will not
generate code which does this.  In C, one might define the type of a
stack element as follows:
     union agent_val {
       LONGEST l;
       DOUBLEST d;
     };

where `LONGEST' and `DOUBLEST' are `typedef' names for the largest
integer and floating point types on the machine.

   By the time the bytecode interpreter reaches the end of the
expression, the value of the expression should be the only value left
on the stack.  For tracing applications, `trace' bytecodes in the
expression will have recorded the necessary data, and the value on the
stack may be discarded.  For other applications, like conditional
breakpoints, the value may be useful.

   Separate from the stack, the interpreter has two registers:
`pc'
     The address of the next bytecode to execute.

`start'
     The address of the start of the bytecode expression, necessary for
     interpreting the `goto' and `if_goto' instructions.


Neither of these registers is directly visible to the bytecode language
itself, but they are useful for defining the meanings of the bytecode
operations.

   There are no instructions to perform side effects on the running
program, or call the program's functions; we assume that these
expressions are only used for unobtrusive debugging, not for patching
the running code.

   Most bytecode instructions do not distinguish between the various
sizes of values, and operate on full-width values; the upper bits of the
values are simply ignored, since they do not usually make a difference
to the value computed.  The exceptions to this rule are:
memory reference instructions (`ref'N)
     There are distinct instructions to fetch different word sizes from
     memory.  Once on the stack, however, the values are treated as
     full-size integers.  They may need to be sign-extended; the `ext'
     instruction exists for this purpose.

the sign-extension instruction (`ext' N)
     These clearly need to know which portion of their operand is to be
     extended to occupy the full length of the word.


   If the interpreter is unable to evaluate an expression completely for
some reason (a memory location is inaccessible, or a divisor is zero,
for example), we say that interpretation "terminates with an error".
This means that the problem is reported back to the interpreter's caller
in some helpful way.  In general, code using agent expressions should
assume that they may attempt to divide by zero, fetch arbitrary memory
locations, and misbehave in other ways.

   Even complicated C expressions compile to a few bytecode
instructions; for example, the expression `x + y * z' would typically
produce code like the following, assuming that `x' and `y' live in
registers, and `z' is a global variable holding a 32-bit `int':
     reg 1
     reg 2
     const32 address of z
     ref32
     ext 32
     mul
     add
     end

   In detail, these mean:
`reg 1'
     Push the value of register 1 (presumably holding `x') onto the
     stack.

`reg 2'
     Push the value of register 2 (holding `y').

`const32 address of z'
     Push the address of `z' onto the stack.

`ref32'
     Fetch a 32-bit word from the address at the top of the stack;
     replace the address on the stack with the value.  Thus, we replace
     the address of `z' with `z''s value.

`ext 32'
     Sign-extend the value on the top of the stack from 32 bits to full
     length.  This is necessary because `z' is a signed integer.

`mul'
     Pop the top two numbers on the stack, multiply them, and push their
     product.  Now the top of the stack contains the value of the
     expression `y * z'.

`add'
     Pop the top two numbers, add them, and push the sum.  Now the top
     of the stack contains the value of `x + y * z'.

`end'
     Stop executing; the value left on the stack top is the value to be
     recorded.



File: gdb.info,  Node: Bytecode Descriptions,  Next: Using Agent Expressions,  Prev: General Bytecode Design,  Up: Agent Expressions

Bytecode Descriptions
=====================

Each bytecode description has the following form:

`add' (0x02): A B => A+B
     Pop the top two stack items, A and B, as integers; push their sum,
     as an integer.


   In this example, `add' is the name of the bytecode, and `(0x02)' is
the one-byte value used to encode the bytecode, in hexidecimal.  The
phrase "A B => A+B" shows the stack before and after the bytecode
executes.  Beforehand, the stack must contain at least two values, A
and B; since the top of the stack is to the right, B is on the top of
the stack, and A is underneath it.  After execution, the bytecode will
have popped A and B from the stack, and replaced them with a single
value, A+B.  There may be other values on the stack below those shown,
but the bytecode affects only those shown.

   Here is another example:

`const8' (0x22) N: => N
     Push the 8-bit integer constant N on the stack, without sign
     extension.


   In this example, the bytecode `const8' takes an operand N directly
from the bytecode stream; the operand follows the `const8' bytecode
itself.  We write any such operands immediately after the name of the
bytecode, before the colon, and describe the exact encoding of the
operand in the bytecode stream in the body of the bytecode description.

   For the `const8' bytecode, there are no stack items given before the
=>; this simply means that the bytecode consumes no values from the
stack.  If a bytecode consumes no values, or produces no values, the
list on either side of the => may be empty.

   If a value is written as A, B, or N, then the bytecode treats it as
an integer.  If a value is written is ADDR, then the bytecode treats it
as an address.

   We do not fully describe the floating point operations here; although
this design can be extended in a clean way to handle floating point
values, they are not of immediate interest to the customer, so we avoid
describing them, to save time.

`float' (0x01): =>
     Prefix for floating-point bytecodes.  Not implemented yet.

`add' (0x02): A B => A+B
     Pop two integers from the stack, and push their sum, as an integer.

`sub' (0x03): A B => A-B
     Pop two integers from the stack, subtract the top value from the
     next-to-top value, and push the difference.

`mul' (0x04): A B => A*B
     Pop two integers from the stack, multiply them, and push the
     product on the stack.  Note that, when one multiplies two N-bit
     numbers yielding another N-bit number, it is irrelevant whether the
     numbers are signed or not; the results are the same.

`div_signed' (0x05): A B => A/B
     Pop two signed integers from the stack; divide the next-to-top
     value by the top value, and push the quotient.  If the divisor is
     zero, terminate with an error.

`div_unsigned' (0x06): A B => A/B
     Pop two unsigned integers from the stack; divide the next-to-top
     value by the top value, and push the quotient.  If the divisor is
     zero, terminate with an error.

`rem_signed' (0x07): A B => A MODULO B
     Pop two signed integers from the stack; divide the next-to-top
     value by the top value, and push the remainder.  If the divisor is
     zero, terminate with an error.

`rem_unsigned' (0x08): A B => A MODULO B
     Pop two unsigned integers from the stack; divide the next-to-top
     value by the top value, and push the remainder.  If the divisor is
     zero, terminate with an error.

`lsh' (0x09): A B => A<<B
     Pop two integers from the stack; let A be the next-to-top value,
     and B be the top value.  Shift A left by B bits, and push the
     result.

`rsh_signed' (0x0a): A B => `(signed)'A>>B
     Pop two integers from the stack; let A be the next-to-top value,
     and B be the top value.  Shift A right by B bits, inserting copies
     of the top bit at the high end, and push the result.

`rsh_unsigned' (0x0b): A B => A>>B
     Pop two integers from the stack; let A be the next-to-top value,
     and B be the top value.  Shift A right by B bits, inserting zero
     bits at the high end, and push the result.

`log_not' (0x0e): A => !A
     Pop an integer from the stack; if it is zero, push the value one;
     otherwise, push the value zero.

`bit_and' (0x0f): A B => A&B
     Pop two integers from the stack, and push their bitwise `and'.

`bit_or' (0x10): A B => A|B
     Pop two integers from the stack, and push their bitwise `or'.

`bit_xor' (0x11): A B => A^B
     Pop two integers from the stack, and push their bitwise
     exclusive-`or'.

`bit_not' (0x12): A => ~A
     Pop an integer from the stack, and push its bitwise complement.

`equal' (0x13): A B => A=B
     Pop two integers from the stack; if they are equal, push the value
     one; otherwise, push the value zero.

`less_signed' (0x14): A B => A<B
     Pop two signed integers from the stack; if the next-to-top value
     is less than the top value, push the value one; otherwise, push
     the value zero.

`less_unsigned' (0x15): A B => A<B
     Pop two unsigned integers from the stack; if the next-to-top value
     is less than the top value, push the value one; otherwise, push
     the value zero.

`ext' (0x16) N: A => A, sign-extended from N bits
     Pop an unsigned value from the stack; treating it as an N-bit
     twos-complement value, extend it to full length.  This means that
     all bits to the left of bit N-1 (where the least significant bit
     is bit 0) are set to the value of bit N-1.  Note that N may be
     larger than or equal to the width of the stack elements of the
     bytecode engine; in this case, the bytecode should have no effect.

     The number of source bits to preserve, N, is encoded as a single
     byte unsigned integer following the `ext' bytecode.

`zero_ext' (0x2a) N: A => A, zero-extended from N bits
     Pop an unsigned value from the stack; zero all but the bottom N
     bits.  This means that all bits to the left of bit N-1 (where the
     least significant bit is bit 0) are set to the value of bit N-1.

     The number of source bits to preserve, N, is encoded as a single
     byte unsigned integer following the `zero_ext' bytecode.

`ref8' (0x17): ADDR => A
`ref16' (0x18): ADDR => A
`ref32' (0x19): ADDR => A
`ref64' (0x1a): ADDR => A
     Pop an address ADDR from the stack.  For bytecode `ref'N, fetch an
     N-bit value from ADDR, using the natural target endianness.  Push
     the fetched value as an unsigned integer.

     Note that ADDR may not be aligned in any particular way; the
     `refN' bytecodes should operate correctly for any address.

     If attempting to access memory at ADDR would cause a processor
     exception of some sort, terminate with an error.

`ref_float' (0x1b): ADDR => D
`ref_double' (0x1c): ADDR => D
`ref_long_double' (0x1d): ADDR => D
`l_to_d' (0x1e): A => D
`d_to_l' (0x1f): D => A
     Not implemented yet.

`dup' (0x28): A => A A
     Push another copy of the stack's top element.

`swap' (0x2b): A B => B A
     Exchange the top two items on the stack.

`pop' (0x29): A =>
     Discard the top value on the stack.

`if_goto' (0x20) OFFSET: A =>
     Pop an integer off the stack; if it is non-zero, branch to the
     given offset in the bytecode string.  Otherwise, continue to the
     next instruction in the bytecode stream.  In other words, if A is
     non-zero, set the `pc' register to `start' + OFFSET.  Thus, an
     offset of zero denotes the beginning of the expression.

     The OFFSET is stored as a sixteen-bit unsigned value, stored
     immediately following the `if_goto' bytecode.  It is always stored
     most significant byte first, regardless of the target's normal
     endianness.  The offset is not guaranteed to fall at any particular
     alignment within the bytecode stream; thus, on machines where
     fetching a 16-bit on an unaligned address raises an exception, you
     should fetch the offset one byte at a time.

`goto' (0x21) OFFSET: =>
     Branch unconditionally to OFFSET; in other words, set the `pc'
     register to `start' + OFFSET.

     The offset is stored in the same way as for the `if_goto' bytecode.

`const8' (0x22) N: => N
`const16' (0x23) N: => N
`const32' (0x24) N: => N
`const64' (0x25) N: => N
     Push the integer constant N on the stack, without sign extension.
     To produce a small negative value, push a small twos-complement
     value, and then sign-extend it using the `ext' bytecode.

     The constant N is stored in the appropriate number of bytes
     following the `const'B bytecode.  The constant N is always stored
     most significant byte first, regardless of the target's normal
     endianness.  The constant is not guaranteed to fall at any
     particular alignment within the bytecode stream; thus, on machines
     where fetching a 16-bit on an unaligned address raises an
     exception, you should fetch N one byte at a time.

`reg' (0x26) N: => A
     Push the value of register number N, without sign extension.  The
     registers are numbered following GDB's conventions.

     The register number N is encoded as a 16-bit unsigned integer
     immediately following the `reg' bytecode.  It is always stored most
     significant byte first, regardless of the target's normal
     endianness.  The register number is not guaranteed to fall at any
     particular alignment within the bytecode stream; thus, on machines
     where fetching a 16-bit on an unaligned address raises an
     exception, you should fetch the register number one byte at a time.

`trace' (0x0c): ADDR SIZE =>
     Record the contents of the SIZE bytes at ADDR in a trace buffer,
     for later retrieval by GDB.

`trace_quick' (0x0d) SIZE: ADDR => ADDR
     Record the contents of the SIZE bytes at ADDR in a trace buffer,
     for later retrieval by GDB.  SIZE is a single byte unsigned
     integer following the `trace' opcode.

     This bytecode is equivalent to the sequence `dup const8 SIZE
     trace', but we provide it anyway to save space in bytecode strings.

`trace16' (0x30) SIZE: ADDR => ADDR
     Identical to trace_quick, except that SIZE is a 16-bit big-endian
     unsigned integer, not a single byte.  This should probably have
     been named `trace_quick16', for consistency.

`end' (0x27): =>
     Stop executing bytecode; the result should be the top element of
     the stack.  If the purpose of the expression was to compute an
     lvalue or a range of memory, then the next-to-top of the stack is
     the lvalue's address, and the top of the stack is the lvalue's
     size, in bytes.



File: gdb.info,  Node: Using Agent Expressions,  Next: Varying Target Capabilities,  Prev: Bytecode Descriptions,  Up: Agent Expressions

Using Agent Expressions
=======================

Here is a sketch of a full non-stop debugging cycle, showing how agent
expressions fit into the process.

   * The user selects trace points in the program's code at which GDB
     should collect data.

   * The user specifies expressions to evaluate at each trace point.
     These expressions may denote objects in memory, in which case
     those objects' contents are recorded as the program runs, or
     computed values, in which case the values themselves are recorded.

   * GDB transmits the tracepoints and their associated expressions to
     the GDB agent, running on the debugging target.

   * The agent arranges to be notified when a trace point is hit.  Note
     that, on some systems, the target operating system is completely
     responsible for collecting the data; see *Note Tracing on
     Symmetrix::.

   * When execution on the target reaches a trace point, the agent
     evaluates the expressions associated with that trace point, and
     records the resulting values and memory ranges.

   * Later, when the user selects a given trace event and inspects the
     objects and expression values recorded, GDB talks to the agent to
     retrieve recorded data as necessary to meet the user's requests.
     If the user asks to see an object whose contents have not been
     recorded, GDB reports an error.



File: gdb.info,  Node: Varying Target Capabilities,  Next: Tracing on Symmetrix,  Prev: Using Agent Expressions,  Up: Agent Expressions

Varying Target Capabilities
===========================

Some targets don't support floating-point, and some would rather not
have to deal with `long long' operations.  Also, different targets will
have different stack sizes, and different bytecode buffer lengths.

   Thus, GDB needs a way to ask the target about itself.  We haven't
worked out the details yet, but in general, GDB should be able to send
the target a packet asking it to describe itself.  The reply should be a
packet whose length is explicit, so we can add new information to the
packet in future revisions of the agent, without confusing old versions
of GDB, and it should contain a version number.  It should contain at
least the following information:

   * whether floating point is supported

   * whether `long long' is supported

   * maximum acceptable size of bytecode stack

   * maximum acceptable length of bytecode expressions

   * which registers are actually available for collection

   * whether the target supports disabled tracepoints



File: gdb.info,  Node: Tracing on Symmetrix,  Next: Rationale,  Prev: Varying Target Capabilities,  Up: Agent Expressions

Tracing on Symmetrix
====================

This section documents the API used by the GDB agent to collect data on
Symmetrix systems.

   Cygnus originally implemented these tracing features to help EMC
Corporation debug their Symmetrix high-availability disk drives.  The
Symmetrix application code already includes substantial tracing
facilities; the GDB agent for the Symmetrix system uses those facilities
for its own data collection, via the API described here.

 - Function: DTC_RESPONSE adbg_find_memory_in_frame (FRAME_DEF *FRAME,
          char *ADDRESS, char **BUFFER, unsigned int *SIZE)
     Search the trace frame FRAME for memory saved from ADDRESS.  If
     the memory is available, provide the address of the buffer holding
     it; otherwise, provide the address of the next saved area.

        * If the memory at ADDRESS was saved in FRAME, set `*BUFFER' to
          point to the buffer in which that memory was saved, set
          `*SIZE' to the number of bytes from ADDRESS that are saved at
          `*BUFFER', and return `OK_TARGET_RESPONSE'.  (Clearly, in
          this case, the function will always set `*SIZE' to a value
          greater than zero.)

        * If FRAME does not record any memory at ADDRESS, set `*SIZE'
          to the distance from ADDRESS to the start of the saved region
          with the lowest address higher than ADDRESS.  If there is no
          memory saved from any higher address, set `*SIZE' to zero.
          Return `NOT_FOUND_TARGET_RESPONSE'.

     These two possibilities allow the caller to either retrieve the
     data, or walk the address space to the next saved area.

   This function allows the GDB agent to map the regions of memory
saved in a particular frame, and retrieve their contents efficiently.

   This function also provides a clean interface between the GDB agent
and the Symmetrix tracing structures, making it easier to adapt the GDB
agent to future versions of the Symmetrix system, and vice versa.  This
function searches all data saved in FRAME, whether the data is there at
the request of a bytecode expression, or because it falls in one of the
format's memory ranges, or because it was saved from the top of the
stack.  EMC can arbitrarily change and enhance the tracing mechanism,
but as long as this function works properly, all collected memory is
visible to GDB.

   The function itself is straightforward to implement.  A single pass
over the trace frame's stack area, memory ranges, and expression blocks
can yield the address of the buffer (if the requested address was
saved), and also note the address of the next higher range of memory,
to be returned when the search fails.

   As an example, suppose the trace frame `f' has saved sixteen bytes
from address `0x8000' in a buffer at `0x1000', and thirty-two bytes
from address `0xc000' in a buffer at `0x1010'.  Here are some sample
calls, and the effect each would have:

`adbg_find_memory_in_frame (f, (char*) 0x8000, &buffer, &size)'
     This would set `buffer' to `0x1000', set `size' to sixteen, and
     return `OK_TARGET_RESPONSE', since `f' saves sixteen bytes from
     `0x8000' at `0x1000'.

`adbg_find_memory_in_frame (f, (char *) 0x8004, &buffer, &size)'
     This would set `buffer' to `0x1004', set `size' to twelve, and
     return `OK_TARGET_RESPONSE', since `f' saves the twelve bytes from
     `0x8004' starting four bytes into the buffer at `0x1000'.  This
     shows that request addresses may fall in the middle of saved
     areas; the function should return the address and size of the
     remainder of the buffer.

`adbg_find_memory_in_frame (f, (char *) 0x8100, &buffer, &size)'
     This would set `size' to `0x3f00' and return
     `NOT_FOUND_TARGET_RESPONSE', since there is no memory saved in `f'
     from the address `0x8100', and the next memory available is at
     `0x8100 + 0x3f00', or `0xc000'.  This shows that request addresses
     may fall outside of all saved memory ranges; the function should
     indicate the next saved area, if any.

`adbg_find_memory_in_frame (f, (char *) 0x7000, &buffer, &size)'
     This would set `size' to `0x1000' and return
     `NOT_FOUND_TARGET_RESPONSE', since the next saved memory is at
     `0x7000 + 0x1000', or `0x8000'.

`adbg_find_memory_in_frame (f, (char *) 0xf000, &buffer, &size)'
     This would set `size' to zero, and return
     `NOT_FOUND_TARGET_RESPONSE'.  This shows how the function tells the
     caller that no further memory ranges have been saved.


   As another example, here is a function which will print out the
addresses of all memory saved in the trace frame `frame' on the
Symmetrix INLINES console:
     void
     print_frame_addresses (FRAME_DEF *frame)
     {
       char *addr;
       char *buffer;
       unsigned long size;
     
       addr = 0;
       for (;;)
         {
           /* Either find out how much memory we have here, or discover
              where the next saved region is.  */
           if (adbg_find_memory_in_frame (frame, addr, &buffer, &size)
               == OK_TARGET_RESPONSE)
             printp ("saved %x to %x\n", addr, addr + size);
           if (size == 0)
             break;
           addr += size;
         }
     }

   Note that there is not necessarily any connection between the order
in which the data is saved in the trace frame, and the order in which
`adbg_find_memory_in_frame' will return those memory ranges.  The code
above will always print the saved memory regions in order of increasing
address, while the underlying frame structure might store the data in a
random order.

   [[This section should cover the rest of the Symmetrix functions the
stub relies upon, too.]]


File: gdb.info,  Node: Rationale,  Prev: Tracing on Symmetrix,  Up: Agent Expressions

Rationale
=========

Some of the design decisions apparent above are arguable.

What about stack overflow/underflow?
     GDB should be able to query the target to discover its stack size.
     Given that information, GDB can determine at translation time
     whether a given expression will overflow the stack.  But this spec
     isn't about what kinds of error-checking GDB ought to do.

Why are you doing everything in LONGEST?
     Speed isn't important, but agent code size is; using LONGEST
     brings in a bunch of support code to do things like division, etc.
     So this is a serious concern.

     First, note that you don't need different bytecodes for different
     operand sizes.  You can generate code without _knowing_ how big the
     stack elements actually are on the target.  If the target only
     supports 32-bit ints, and you don't send any 64-bit bytecodes,
     everything just works.  The observation here is that the MIPS and
     the Alpha have only fixed-size registers, and you can still get
     C's semantics even though most instructions only operate on
     full-sized words.  You just need to make sure everything is
     properly sign-extended at the right times.  So there is no need
     for 32- and 64-bit variants of the bytecodes.  Just implement
     everything using the largest size you support.

     GDB should certainly check to see what sizes the target supports,
     so the user can get an error earlier, rather than later.  But this
     information is not necessary for correctness.

Why don't you have `>' or `<=' operators?
     I want to keep the interpreter small, and we don't need them.  We
     can combine the `less_' opcodes with `log_not', and swap the order
     of the operands, yielding all four asymmetrical comparison
     operators.  For example, `(x <= y)' is `! (x > y)', which is `! (y
     < x)'.

Why do you have `log_not'?
Why do you have `ext'?
Why do you have `zero_ext'?
     These are all easily synthesized from other instructions, but I
     expect them to be used frequently, and they're simple, so I
     include them to keep bytecode strings short.

     `log_not' is equivalent to `const8 0 equal'; it's used in half the
     relational operators.

     `ext N' is equivalent to `const8 S-N lsh const8 S-N rsh_signed',
     where S is the size of the stack elements; it follows `refM' and
     REG bytecodes when the value should be signed.  See the next
     bulleted item.

     `zero_ext N' is equivalent to `constM MASK log_and'; it's used
     whenever we push the value of a register, because we can't assume
     the upper bits of the register aren't garbage.

Why not have sign-extending variants of the `ref' operators?
     Because that would double the number of `ref' operators, and we
     need the `ext' bytecode anyway for accessing bitfields.

Why not have constant-address variants of the `ref' operators?
     Because that would double the number of `ref' operators again, and
     `const32 ADDRESS ref32' is only one byte longer.

Why do the `refN' operators have to support unaligned fetches?
     GDB will generate bytecode that fetches multi-byte values at
     unaligned addresses whenever the executable's debugging
     information tells it to.  Furthermore, GDB does not know the value
     the pointer will have when GDB generates the bytecode, so it
     cannot determine whether a particular fetch will be aligned or not.

     In particular, structure bitfields may be several bytes long, but
     follow no alignment rules; members of packed structures are not
     necessarily aligned either.

     In general, there are many cases where unaligned references occur
     in correct C code, either at the programmer's explicit request, or
     at the compiler's discretion.  Thus, it is simpler to make the GDB
     agent bytecodes work correctly in all circumstances than to make
     GDB guess in each case whether the compiler did the usual thing.

Why are there no side-effecting operators?
     Because our current client doesn't want them?  That's a cheap
     answer.  I think the real answer is that I'm afraid of
     implementing function calls.  We should re-visit this issue after
     the present contract is delivered.

Why aren't the `goto' ops PC-relative?
     The interpreter has the base address around anyway for PC bounds
     checking, and it seemed simpler.

Why is there only one offset size for the `goto' ops?
     Offsets are currently sixteen bits.  I'm not happy with this
     situation either:

     Suppose we have multiple branch ops with different offset sizes.
     As I generate code left-to-right, all my jumps are forward jumps
     (there are no loops in expressions), so I never know the target
     when I emit the jump opcode.  Thus, I have to either always assume
     the largest offset size, or do jump relaxation on the code after I
     generate it, which seems like a big waste of time.

     I can imagine a reasonable expression being longer than 256 bytes.
     I can't imagine one being longer than 64k.  Thus, we need 16-bit
     offsets.  This kind of reasoning is so bogus, but relaxation is
     pathetic.

     The other approach would be to generate code right-to-left.  Then
     I'd always know my offset size.  That might be fun.

Where is the function call bytecode?
     When we add side-effects, we should add this.

Why does the `reg' bytecode take a 16-bit register number?
     Intel's IA-64 architecture has 128 general-purpose registers, and
     128 floating-point registers, and I'm sure it has some random
     control registers.

Why do we need `trace' and `trace_quick'?
     Because GDB needs to record all the memory contents and registers
     an expression touches.  If the user wants to evaluate an expression
     `x->y->z', the agent must record the values of `x' and `x->y' as
     well as the value of `x->y->z'.

Don't the `trace' bytecodes make the interpreter less general?
     They do mean that the interpreter contains special-purpose code,
     but that doesn't mean the interpreter can only be used for that
     purpose.  If an expression doesn't use the `trace' bytecodes, they
     don't get in its way.

Why doesn't `trace_quick' consume its arguments the way everything else does?
     In general, you do want your operators to consume their arguments;
     it's consistent, and generally reduces the amount of stack
     rearrangement necessary.  However, `trace_quick' is a kludge to
     save space; it only exists so we needn't write `dup const8 SIZE
     trace' before every memory reference.  Therefore, it's okay for it
     not to consume its arguments; it's meant for a specific context in
     which we know exactly what it should do with the stack.  If we're
     going to have a kludge, it should be an effective kludge.

Why does `trace16' exist?
     That opcode was added by the customer that contracted Cygnus for
     the data tracing work.  I personally think it is unnecessary;
     objects that large will be quite rare, so it is okay to use `dup
     const16 SIZE trace' in those cases.

     Whatever we decide to do with `trace16', we should at least leave
     opcode 0x30 reserved, to remain compatible with the customer who
     added it.



File: gdb.info,  Node: Copying,  Next: GNU Free Documentation License,  Prev: Agent Expressions,  Up: Top

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.

    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) YEAR  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) YEAR 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.


File: gdb.info,  Node: GNU Free Documentation License,  Next: Index,  Prev: Copying,  Up: Top

GNU Free Documentation License
******************************

                      Version 1.2, November 2002
     Copyright (C) 2000,2001,2002 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.

  0. PREAMBLE

     The purpose of this License is to make a manual, textbook, or other
     functional and useful 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.

  1. APPLICABILITY AND DEFINITIONS

     This License applies to any manual or other work, in any medium,
     that contains a notice placed by the copyright holder saying it
     can be distributed under the terms of this License.  Such a notice
     grants a world-wide, royalty-free license, unlimited in duration,
     to use that work under the conditions stated herein.  The
     "Document", below, refers to any such manual or work.  Any member
     of the public is a licensee, and is addressed as "you".  You
     accept the license if you copy, modify or distribute the work in a
     way requiring permission under copyright law.

     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.  (Thus, 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.  If a section does not fit the above definition of
     Secondary then it is not allowed to be designated as Invariant.
     The Document may contain zero Invariant Sections.  If the Document
     does not identify any Invariant Sections then there are none.

     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
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
     be at most 25 words.

     A "Transparent" copy of the Document means a machine-readable copy,
     represented in a format whose specification is available to the
     general public, that is suitable for revising the document
     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, or absence of
     markup, has been arranged to thwart or discourage subsequent
     modification by readers is not Transparent.  An image format is
     not Transparent if used for any substantial amount of text.  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, PostScript or PDF designed for
     human modification.  Examples of transparent image formats include
     PNG, XCF and JPG.  Opaque formats include 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, PostScript or PDF
     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.

     A section "Entitled XYZ" means a named subunit of the Document
     whose title either is precisely XYZ or contains XYZ in parentheses
     following text that translates XYZ in another language.  (Here XYZ
     stands for a specific section name mentioned below, such as
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
     To "Preserve the Title" of such a section when you modify the
     Document means that it remains a section "Entitled XYZ" according
     to this definition.

     The Document may include Warranty Disclaimers next to the notice
     which states that this License applies to the Document.  These
     Warranty Disclaimers are considered to be included by reference in
     this License, but only as regards disclaiming warranties: any other
     implication that these Warranty Disclaimers may have is void and
     has no effect on the meaning of this License.

  2. 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.

  3. COPYING IN QUANTITY

     If you publish printed copies (or copies in media that commonly
     have printed covers) 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 computer-network location from
     which the general network-using public has access to download
     using public-standard network protocols a complete Transparent
     copy of the Document, free of added material.  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.

  4. 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 fewer than five), unless they release you
          from this requirement.

       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", Preserve 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. For any section Entitled "Acknowledgements" or "Dedications",
          Preserve the Title of the section, 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 to be Entitled
          "Endorsements" or to conflict in title with any Invariant
          Section.

       O. Preserve any Warranty Disclaimers.

     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.

  5. 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, and that you preserve all
     their Warranty Disclaimers.

     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."

  6. 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.

  7. 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, is called an "aggregate" if the
     copyright resulting from the compilation is not used to limit the
     legal rights of the compilation's users beyond what the individual
     works permit.  When the Document is included in an aggregate, this
     License does not apply to the other works in the aggregate which
     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 half
     of the entire aggregate, the Document's Cover Texts may be placed
     on covers that bracket the Document within the aggregate, or the
     electronic equivalent of covers if the Document is in electronic
     form.  Otherwise they must appear on printed covers that bracket
     the whole aggregate.

  8. 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, and all the license notices in the
     Document, and any Warranty Disclaimers, provided that you also
     include the original English version of this License and the
     original versions of those notices and disclaimers.  In case of a
     disagreement between the translation and the original version of
     this License or a notice or disclaimer, the original version will
     prevail.

     If a section in the Document is Entitled "Acknowledgements",
     "Dedications", or "History", the requirement (section 4) to
     Preserve its Title (section 1) will typically require changing the
     actual title.

  9. 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.

 10. 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.

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:

       Copyright (C)  YEAR  YOUR NAME.
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.2
       or any later version published by the Free Software Foundation;
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
       Texts.  A copy of the license is included in the section entitled ``GNU
       Free Documentation License''.

   If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this:

         with the Invariant Sections being LIST THEIR TITLES, with
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
         being LIST.

   If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.

   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.


File: gdb.info,  Node: Index,  Prev: GNU Free Documentation License,  Up: Top

Index
*****

* Menu:

* ! packet:                              Packets.
* "No symbol "foo" in current context":  Variables.
* # (a comment):                         Command Syntax.
* # in Modula-2:                         GDB/M2.
* $:                                     Value History.
* $$:                                    Value History.
* $_ and info breakpoints:               Set Breaks.
* $_ and info line:                      Machine Code.
* $_, $__, and value history:            Memory.
* $_, convenience variable:              Convenience Vars.
* $__, convenience variable:             Convenience Vars.
* $_exitcode, convenience variable:      Convenience Vars.
* $bpnum, convenience variable:          Set Breaks.
* $cdir, convenience variable:           Source Path.
* $cwdr, convenience variable:           Source Path.
* $tpnum:                                Create and Delete Tracepoints.
* $trace_file:                           Tracepoint Variables.
* $trace_frame:                          Tracepoint Variables.
* $trace_func:                           Tracepoint Variables.
* $trace_line:                           Tracepoint Variables.
* $tracepoint:                           Tracepoint Variables.
* --annotate:                            Mode Options.
* --args:                                Mode Options.
* --async:                               Mode Options.
* --batch:                               Mode Options.
* --baud:                                Mode Options.
* --cd:                                  Mode Options.
* --command:                             File Options.
* --core:                                File Options.
* --directory:                           File Options.
* --epoch:                               Mode Options.
* --exec:                                File Options.
* --fullname:                            Mode Options.
* --interpreter:                         Mode Options.
* --mapped:                              File Options.
* --noasync:                             Mode Options.
* --nowindows:                           Mode Options.
* --nx:                                  Mode Options.
* --pid:                                 File Options.
* --quiet:                               Mode Options.
* --readnow:                             File Options.
* --se:                                  File Options.
* --silent:                              Mode Options.
* --statistics:                          Mode Options.
* --symbols:                             File Options.
* --tty:                                 Mode Options.
* --tui:                                 Mode Options.
* --version:                             Mode Options.
* --windows:                             Mode Options.
* --write:                               Mode Options.
* -b:                                    Mode Options.
* -break-after:                          GDB/MI Breakpoint Table Commands.
* -break-condition:                      GDB/MI Breakpoint Table Commands.
* -break-delete:                         GDB/MI Breakpoint Table Commands.
* -break-disable:                        GDB/MI Breakpoint Table Commands.
* -break-enable:                         GDB/MI Breakpoint Table Commands.
* -break-info:                           GDB/MI Breakpoint Table Commands.
* -break-insert:                         GDB/MI Breakpoint Table Commands.
* -break-list:                           GDB/MI Breakpoint Table Commands.
* -break-watch:                          GDB/MI Breakpoint Table Commands.
* -c:                                    File Options.
* -d:                                    File Options.
* -data-disassemble:                     GDB/MI Data Manipulation.
* -data-evaluate-expression:             GDB/MI Data Manipulation.
* -data-list-changed-registers:          GDB/MI Data Manipulation.
* -data-list-register-names:             GDB/MI Data Manipulation.
* -data-list-register-values:            GDB/MI Data Manipulation.
* -data-read-memory:                     GDB/MI Data Manipulation.
* -display-delete:                       GDB/MI Data Manipulation.
* -display-disable:                      GDB/MI Data Manipulation.
* -display-enable:                       GDB/MI Data Manipulation.
* -display-insert:                       GDB/MI Data Manipulation.
* -display-list:                         GDB/MI Data Manipulation.
* -e:                                    File Options.
* -environment-cd:                       GDB/MI Data Manipulation.
* -environment-directory:                GDB/MI Data Manipulation.
* -environment-path:                     GDB/MI Data Manipulation.
* -environment-pwd:                      GDB/MI Data Manipulation.
* -exec-abort:                           GDB/MI Program Control.
* -exec-arguments:                       GDB/MI Program Control.
* -exec-continue:                        GDB/MI Program Control.
* -exec-finish:                          GDB/MI Program Control.
* -exec-interrupt:                       GDB/MI Program Control.
* -exec-next:                            GDB/MI Program Control.
* -exec-next-instruction:                GDB/MI Program Control.
* -exec-return:                          GDB/MI Program Control.
* -exec-run:                             GDB/MI Program Control.
* -exec-show-arguments:                  GDB/MI Program Control.
* -exec-step:                            GDB/MI Program Control.
* -exec-step-instruction:                GDB/MI Program Control.
* -exec-until:                           GDB/MI Program Control.
* -f:                                    Mode Options.
* -file-exec-and-symbols:                GDB/MI Program Control.
* -file-exec-file:                       GDB/MI Program Control.
* -file-list-exec-sections:              GDB/MI Program Control.
* -file-list-exec-source-file:           GDB/MI Program Control.
* -file-list-exec-source-files:          GDB/MI Program Control.
* -file-list-shared-libraries:           GDB/MI Program Control.
* -file-list-symbol-files:               GDB/MI Program Control.
* -file-symbol-file:                     GDB/MI Program Control.
* -gdb-exit:                             GDB/MI Miscellaneous Commands.
* -gdb-set:                              GDB/MI Miscellaneous Commands.
* -gdb-show:                             GDB/MI Miscellaneous Commands.
* -gdb-version:                          GDB/MI Miscellaneous Commands.
* -interpreter-exec:                     GDB/MI Miscellaneous Commands.
* -m:                                    File Options.
* -n:                                    Mode Options.
* -nw:                                   Mode Options.
* -p:                                    File Options.
* -q:                                    Mode Options.
* -r:                                    File Options.
* -s:                                    File Options.
* -stack-info-depth:                     GDB/MI Stack Manipulation.
* -stack-info-frame:                     GDB/MI Stack Manipulation.
* -stack-list-arguments:                 GDB/MI Stack Manipulation.
* -stack-list-frames:                    GDB/MI Stack Manipulation.
* -stack-list-locals:                    GDB/MI Stack Manipulation.
* -stack-select-frame:                   GDB/MI Stack Manipulation.
* -symbol-info-address:                  GDB/MI Symbol Query.
* -symbol-info-file:                     GDB/MI Symbol Query.
* -symbol-info-function:                 GDB/MI Symbol Query.
* -symbol-info-line:                     GDB/MI Symbol Query.
* -symbol-info-symbol:                   GDB/MI Symbol Query.
* -symbol-list-functions:                GDB/MI Symbol Query.
* -symbol-list-lines:                    GDB/MI Symbol Query.
* -symbol-list-types:                    GDB/MI Symbol Query.
* -symbol-list-variables:                GDB/MI Symbol Query.
* -symbol-locate:                        GDB/MI Symbol Query.
* -symbol-type:                          GDB/MI Symbol Query.
* -t:                                    Mode Options.
* -target-attach:                        GDB/MI Target Manipulation.
* -target-compare-sections:              GDB/MI Target Manipulation.
* -target-detach:                        GDB/MI Target Manipulation.
* -target-disconnect:                    GDB/MI Target Manipulation.
* -target-download:                      GDB/MI Target Manipulation.
* -target-exec-status:                   GDB/MI Target Manipulation.
* -target-list-available-targets:        GDB/MI Target Manipulation.
* -target-list-current-targets:          GDB/MI Target Manipulation.
* -target-list-parameters:               GDB/MI Target Manipulation.
* -target-select:                        GDB/MI Target Manipulation.
* -thread-info:                          GDB/MI Thread Commands.
* -thread-list-all-threads:              GDB/MI Thread Commands.
* -thread-list-ids:                      GDB/MI Thread Commands.
* -thread-select:                        GDB/MI Thread Commands.
* -var-assign:                           GDB/MI Variable Objects.
* -var-create:                           GDB/MI Variable Objects.
* -var-delete:                           GDB/MI Variable Objects.
* -var-evaluate-expression:              GDB/MI Variable Objects.
* -var-info-expression:                  GDB/MI Variable Objects.
* -var-info-num-children:                GDB/MI Variable Objects.
* -var-info-type:                        GDB/MI Variable Objects.
* -var-list-children:                    GDB/MI Variable Objects.
* -var-set-format:                       GDB/MI Variable Objects.
* -var-show-attributes:                  GDB/MI Variable Objects.
* -var-show-format:                      GDB/MI Variable Objects.
* -var-update:                           GDB/MI Variable Objects.
* -w:                                    Mode Options.
* -x:                                    File Options.
* ., Modula-2 scope operator:            M2 Scope.
* .debug subdirectories:                 Separate Debug Files.
* .esgdbinit:                            Command Files.
* .gdbinit:                              Command Files.
* .gnu_debuglink sections:               Separate Debug Files.
* .o files, reading symbols from:        Files.
* .os68gdbinit:                          Command Files.
* .vxgdbinit:                            Command Files.
* /proc:                                 SVR4 Process Information.
* ? packet:                              Packets.
* @, referencing memory as an array:     Arrays.
* ^done:                                 GDB/MI Result Records.
* ^error:                                GDB/MI Result Records.
* ^running:                              GDB/MI Result Records.
* _NSPrintForDebugger, and printing Objective-C objects: The Print Command with Objective-C.
* A packet:                              Packets.
* abbreviation:                          Command Syntax.
* abort (C-g):                           Miscellaneous Commands.
* accept-line (Newline or Return):       Commands For History.
* acknowledgment, for GDB remote:        Overview.
* actions:                               Tracepoint Actions.
* active targets:                        Active Targets.
* adbg_find_memory_in_frame:             Tracing on Symmetrix.
* add-shared-symbol-file:                Files.
* add-symbol-file:                       Files.
* address of a symbol:                   Symbols.
* advance LOCATION:                      Continuing and Stepping.
* Alpha stack:                           MIPS.
* AMD 29K register stack:                A29K.
* annotations:                           Annotations Overview.
* annotations for errors, warnings and interrupts: Errors.
* annotations for invalidation messages: Invalidation.
* annotations for prompts:               Prompting.
* annotations for running programs:      Annotations for Running.
* annotations for source display:        Source Annotations.
* append:                                Dump/Restore Files.
* append data to a file:                 Dump/Restore Files.
* apropos:                               Help.
* arguments (to your program):           Arguments.
* artificial array:                      Arrays.
* ASCII character set:                   Character Sets.
* assembly instructions:                 Machine Code.
* assignment:                            Assignment.
* async output in GDB/MI:                GDB/MI Output Syntax.
* AT&T disassembly flavor:               Machine Code.
* attach:                                Attach.
* attach to a program by name:           Server.
* automatic display:                     Auto Display.
* automatic overlay debugging:           Automatic Overlay Debugging.
* automatic thread selection:            Threads.
* auxiliary vector:                      Auxiliary Vector.
* awatch:                                Set Watchpoints.
* b (break):                             Set Breaks.
* B packet:                              Packets.
* b packet:                              Packets.
* backtrace:                             Backtrace.
* backtrace limit:                       Backtrace.
* backtraces:                            Backtrace.
* backward-char (C-b):                   Commands For Moving.
* backward-delete-char (Rubout):         Commands For Text.
* backward-kill-line (C-x Rubout):       Commands For Killing.
* backward-kill-word (M-<DEL>):          Commands For Killing.
* backward-word (M-b):                   Commands For Moving.
* beginning-of-history (M-<):            Commands For History.
* beginning-of-line (C-a):               Commands For Moving.
* bell-style:                            Readline Init File Syntax.
* break:                                 Set Breaks.
* break ... thread THREADNO:             Thread Stops.
* break in overloaded functions:         Debugging C plus plus.
* break, and Objective-C:                Method Names in Commands.
* breakpoint:                            Annotations for Running.
* breakpoint address adjusted:           Breakpoint related warnings.
* breakpoint commands:                   Break Commands.
* breakpoint commands for GDB/MI:        GDB/MI Breakpoint Table Commands.
* breakpoint conditions:                 Conditions.
* breakpoint numbers:                    Breakpoints.
* breakpoint on events:                  Breakpoints.
* breakpoint on memory address:          Breakpoints.
* breakpoint on variable modification:   Breakpoints.
* breakpoint ranges:                     Breakpoints.
* breakpoint subroutine, remote:         Stub Contents.
* breakpoints:                           Breakpoints.
* breakpoints and threads:               Thread Stops.
* breakpoints in overlays:               Overlay Commands.
* breakpoints-invalid:                   Invalidation.
* bt (backtrace):                        Backtrace.
* bug criteria:                          Bug Criteria.
* bug reports:                           Bug Reporting.
* bugs in GDB:                           GDB Bugs.
* c (continue):                          Continuing and Stepping.
* c (SingleKey TUI key):                 TUI Single Key Mode.
* C and C++:                             C.
* C and C++ checks:                      C Checks.
* C and C++ constants:                   C Constants.
* C and C++ defaults:                    C Defaults.
* C and C++ operators:                   C Operators.
* C packet:                              Packets.
* c packet:                              Packets.
* C++:                                   C.
* C++ compilers:                         C plus plus expressions.
* C++ exception handling:                Debugging C plus plus.
* C++ scope resolution:                  Variables.
* C++ symbol decoding style:             Print Settings.
* C++ symbol display:                    Debugging C plus plus.
* C-L:                                   TUI Keys.
* C-o (operate-and-get-next):            Command Syntax.
* C-x 1:                                 TUI Keys.
* C-x 2:                                 TUI Keys.
* C-x A:                                 TUI Keys.
* C-x a:                                 TUI Keys.
* C-x C-a:                               TUI Keys.
* C-x o:                                 TUI Keys.
* C-x s:                                 TUI Keys.
* call:                                  Calling.
* call overloaded functions:             C plus plus expressions.
* call stack:                            Stack.
* call-last-kbd-macro (C-x e):           Keyboard Macros.
* calling functions:                     Calling.
* calling make:                          Shell Commands.
* capitalize-word (M-c):                 Commands For Text.
* casts, to view memory:                 Expressions.
* catch:                                 Set Catchpoints.
* catch catch:                           Set Catchpoints.
* catch exceptions, list active handlers: Frame Info.
* catch exec:                            Set Catchpoints.
* catch fork:                            Set Catchpoints.
* catch load:                            Set Catchpoints.
* catch throw:                           Set Catchpoints.
* catch unload:                          Set Catchpoints.
* catch vfork:                           Set Catchpoints.
* catchpoints:                           Breakpoints.
* catchpoints, setting:                  Set Catchpoints.
* cd:                                    Working Directory.
* cdir:                                  Source Path.
* character sets:                        Character Sets.
* character-search (C-]):                Miscellaneous Commands.
* character-search-backward (M-C-]):     Miscellaneous Commands.
* charset:                               Character Sets.
* checks, range:                         Type Checking.
* checks, type:                          Checks.
* checksum, for GDB remote:              Overview.
* choosing target byte order:            Byte Order.
* clear:                                 Delete Breaks.
* clear, and Objective-C:                Method Names in Commands.
* clear-screen (C-l):                    Commands For Moving.
* clearing breakpoints, watchpoints, catchpoints: Delete Breaks.
* close, file-i/o system call:           close.
* collect (tracepoints):                 Tracepoint Actions.
* collected data discarded:              Starting and Stopping Trace Experiment.
* colon, doubled as scope operator:      M2 Scope.
* colon-colon, context for variables/functions: Variables.
* colon-colon, in Modula-2:              M2 Scope.
* command editing:                       Readline Bare Essentials.
* command files:                         Command Files.
* command hooks:                         Hooks.
* command interpreters:                  Interpreters.
* command line editing:                  Editing.
* commands <1>:                          Prompting.
* commands:                              Break Commands.
* commands for C++:                      Debugging C plus plus.
* commands to STDBUG (ST2000):           ST2000.
* comment:                               Command Syntax.
* comment-begin:                         Readline Init File Syntax.
* compatibility, GDB/MI and CLI:         GDB/MI Compatibility with CLI.
* compilation directory:                 Source Path.
* compiling, on Sparclet:                Sparclet.
* complete:                              Help.
* complete (<TAB>):                      Commands For Completion.
* completion:                            Completion.
* completion of quoted strings:          Completion.
* completion-query-items:                Readline Init File Syntax.
* condition:                             Conditions.
* conditional breakpoints:               Conditions.
* configuring GDB:                       Installing GDB.
* configuring GDB, and source tree subdirectories: Installing GDB.
* confirmation:                          Messages/Warnings.
* connect (to STDBUG):                   ST2000.
* console i/o as part of file-i/o:       Console I/O.
* console interpreter:                   Interpreters.
* console output in GDB/MI:              GDB/MI Output Syntax.
* constants, in file-i/o protocol:       Constants.
* continue:                              Continuing and Stepping.
* continuing:                            Continuing and Stepping.
* continuing threads:                    Thread Stops.
* control C, and remote debugging:       Bootstrapping.
* controlling terminal:                  Input/Output.
* convenience variables:                 Convenience Vars.
* convenience variables for tracepoints: Tracepoint Variables.
* convert-meta:                          Readline Init File Syntax.
* copy-backward-word ():                 Commands For Killing.
* copy-forward-word ():                  Commands For Killing.
* copy-region-as-kill ():                Commands For Killing.
* core:                                  Files.
* core dump file:                        Files.
* core-file:                             Files.
* crash of debugger:                     Bug Criteria.
* ctrl-c message, in file-i/o protocol:  The Ctrl-C message.
* current directory:                     Source Path.
* current stack frame:                   Frames.
* current thread:                        Threads.
* cwd:                                   Source Path.
* Cygwin-specific commands:              Cygwin Native.
* d (delete):                            Delete Breaks.
* d (SingleKey TUI key):                 TUI Single Key Mode.
* D packet:                              Packets.
* d packet:                              Packets.
* data manipulation, in GDB/MI:          GDB/MI Data Manipulation.
* debug formats and C++:                 C plus plus expressions.
* debug links:                           Separate Debug Files.
* debugger crash:                        Bug Criteria.
* debugging C++ programs:                C plus plus expressions.
* debugging information directory, global: Separate Debug Files.
* debugging information in separate files: Separate Debug Files.
* debugging optimized code:              Compilation.
* debugging stub, example:               remote stub.
* debugging target:                      Targets.
* define:                                Define.
* defining macros interactively:         Macros.
* definition, showing a macro's:         Macros.
* delete:                                Delete Breaks.
* delete breakpoints:                    Delete Breaks.
* delete display:                        Auto Display.
* delete mem:                            Memory Region Attributes.
* delete tracepoint:                     Create and Delete Tracepoints.
* delete-char (C-d):                     Commands For Text.
* delete-char-or-list ():                Commands For Completion.
* delete-horizontal-space ():            Commands For Killing.
* deleting breakpoints, watchpoints, catchpoints: Delete Breaks.
* demangling:                            Print Settings.
* descriptor tables display:             DJGPP Native.
* detach:                                Attach.
* detach (remote):                       Connecting.
* device:                                Renesas Boards.
* digit-argument (M-0, M-1, ... M--):    Numeric Arguments.
* dir:                                   Source Path.
* direct memory access (DMA) on MS-DOS:  DJGPP Native.
* directories for source files:          Source Path.
* directory:                             Source Path.
* directory, compilation:                Source Path.
* directory, current:                    Source Path.
* dis (disable):                         Disabling.
* disable:                               Disabling.
* disable breakpoints:                   Disabling.
* disable display:                       Auto Display.
* disable mem:                           Memory Region Attributes.
* disable tracepoint:                    Enable and Disable Tracepoints.
* disable-completion:                    Readline Init File Syntax.
* disassemble:                           Machine Code.
* disconnect:                            Connecting.
* display:                               Auto Display.
* display of expressions:                Auto Display.
* DJGPP debugging:                       DJGPP Native.
* dll-symbols:                           Cygwin Native.
* DLLs with no debugging symbols:        Non-debug DLL symbols.
* do (down):                             Selection.
* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
* document:                              Define.
* documentation:                         Formatting Documentation.
* Down:                                  TUI Keys.
* down:                                  Selection.
* down-silently:                         Selection.
* downcase-word (M-l):                   Commands For Text.
* download to H8/300 or H8/500:          H8/300.
* download to Renesas SH:                H8/300.
* download to Sparclet:                  Sparclet Download.
* download to VxWorks:                   VxWorks Download.
* dump:                                  Dump/Restore Files.
* dump all data collected at tracepoint: tdump.
* dump data to a file:                   Dump/Restore Files.
* dump-functions ():                     Miscellaneous Commands.
* dump-macros ():                        Miscellaneous Commands.
* dump-variables ():                     Miscellaneous Commands.
* dump/restore files:                    Dump/Restore Files.
* dynamic linking:                       Files.
* e (edit):                              Edit.
* EBCDIC character set:                  Character Sets.
* echo:                                  Output.
* edit:                                  Edit.
* editing:                               Editing.
* editing command lines:                 Readline Bare Essentials.
* editing source files:                  Edit.
* editing-mode:                          Readline Init File Syntax.
* else:                                  Define.
* Emacs:                                 Emacs.
* enable:                                Disabling.
* enable breakpoints:                    Disabling.
* enable display:                        Auto Display.
* enable mem:                            Memory Region Attributes.
* enable tracepoint:                     Enable and Disable Tracepoints.
* enable-keypad:                         Readline Init File Syntax.
* end:                                   Break Commands.
* end-kbd-macro (C-x )):                 Keyboard Macros.
* end-of-history (M->):                  Commands For History.
* end-of-line (C-e):                     Commands For Moving.
* entering numbers:                      Numbers.
* environment (of your program):         Environment.
* errno values, in file-i/o protocol:    Errno values.
* error:                                 Errors.
* error on valid input:                  Bug Criteria.
* error-begin:                           Errors.
* event designators:                     Event Designators.
* event handling:                        Set Catchpoints.
* examining data:                        Data.
* examining memory:                      Memory.
* exception handlers:                    Set Catchpoints.
* exception handlers, how to list:       Frame Info.
* exceptionHandler:                      Bootstrapping.
* exchange-point-and-mark (C-x C-x):     Miscellaneous Commands.
* exec-file:                             Files.
* executable file:                       Files.
* exited:                                Annotations for Running.
* exiting GDB:                           Quitting GDB.
* expand-tilde:                          Readline Init File Syntax.
* expanding preprocessor macros:         Macros.
* expressions:                           Expressions.
* expressions in C or C++:               C.
* expressions in C++:                    C plus plus expressions.
* expressions in Modula-2:               Modula-2.
* f (frame):                             Selection.
* f (SingleKey TUI key):                 TUI Single Key Mode.
* F packet:                              Packets.
* F reply packet:                        The F reply packet.
* F request packet:                      The F request packet.
* fatal signal:                          Bug Criteria.
* fatal signals:                         Signals.
* FDL, GNU Free Documentation License:   GNU Free Documentation License.
* fg (resume foreground execution):      Continuing and Stepping.
* file:                                  Files.
* file-i/o examples:                     File-I/O Examples.
* file-i/o overview:                     File-I/O Overview.
* File-I/O remote protocol extension:    File-I/O remote protocol extension.
* file-i/o reply packet:                 The F reply packet.
* file-i/o request packet:               The F request packet.
* find trace snapshot:                   tfind.
* finish:                                Continuing and Stepping.
* flinching:                             Messages/Warnings.
* float promotion:                       ABI.
* floating point:                        Floating Point Hardware.
* floating point registers:              Registers.
* floating point, MIPS remote:           MIPS Embedded.
* flush_i_cache:                         Bootstrapping.
* focus:                                 TUI Commands.
* focus of debugging:                    Threads.
* foo:                                   Symbol Errors.
* fork, debugging programs which call:   Processes.
* format options:                        Print Settings.
* formatted output:                      Output Formats.
* Fortran:                               Summary.
* forward-backward-delete-char ():       Commands For Text.
* forward-char (C-f):                    Commands For Moving.
* forward-search:                        Search.
* forward-search-history (C-s):          Commands For History.
* forward-word (M-f):                    Commands For Moving.
* frame number:                          Frames.
* frame pointer:                         Frames.
* frame, command:                        Frames.
* frame, definition:                     Frames.
* frame, selecting:                      Selection.
* frameless execution:                   Frames.
* frames-invalid:                        Invalidation.
* free memory information (MS-DOS):      DJGPP Native.
* fstat, file-i/o system call:           stat/fstat.
* Fujitsu:                               remote stub.
* full symbol tables, listing GDB's internal: Symbols.
* functions without line info, and stepping: Continuing and Stepping.
* G packet:                              Packets.
* g packet:                              Packets.
* g++, GNU C++ compiler:                 C.
* garbled pointers:                      DJGPP Native.
* GCC and C++:                           C plus plus expressions.
* GDB bugs, reporting:                   Bug Reporting.
* GDB reference card:                    Formatting Documentation.
* gdb.ini:                               Command Files.
* GDB/MI, breakpoint commands:           GDB/MI Breakpoint Table Commands.
* GDB/MI, compatibility with CLI:        GDB/MI Compatibility with CLI.
* GDB/MI, data manipulation:             GDB/MI Data Manipulation.
* GDB/MI, input syntax:                  GDB/MI Input Syntax.
* GDB/MI, its purpose:                   GDB/MI.
* GDB/MI, out-of-band records:           GDB/MI Out-of-band Records.
* GDB/MI, output syntax:                 GDB/MI Output Syntax.
* GDB/MI, result records:                GDB/MI Result Records.
* GDB/MI, simple examples:               GDB/MI Simple Examples.
* GDB/MI, stream records:                GDB/MI Stream Records.
* GDBHISTFILE:                           History.
* gdbserve.nlm:                          NetWare.
* gdbserver:                             Server.
* GDT:                                   DJGPP Native.
* getDebugChar:                          Bootstrapping.
* gettimeofday, file-i/o system call:    gettimeofday.
* global debugging information directory: Separate Debug Files.
* GNU C++:                               C.
* GNU Emacs:                             Emacs.
* gnu_debuglink_crc32:                   Separate Debug Files.
* h (help):                              Help.
* H packet:                              Packets.
* H8/300 or H8/500 download:             H8/300.
* handle:                                Signals.
* handle_exception:                      Stub Contents.
* handling signals:                      Signals.
* hardware watchpoints:                  Set Watchpoints.
* hbreak:                                Set Breaks.
* help:                                  Help.
* help target:                           Target Commands.
* help user-defined:                     Define.
* heuristic-fence-post (Alpha, MIPS):    MIPS.
* history events:                        Event Designators.
* history expansion <1>:                 History Interaction.
* history expansion:                     History.
* history file:                          History.
* history number:                        Value History.
* history save:                          History.
* history size:                          History.
* history substitution:                  History.
* history-preserve-point:                Readline Init File Syntax.
* history-search-backward ():            Commands For History.
* history-search-forward ():             Commands For History.
* hook:                                  Hooks.
* hook-:                                 Hooks.
* hookpost:                              Hooks.
* hookpost-:                             Hooks.
* hooks, for commands:                   Hooks.
* hooks, post-command:                   Hooks.
* hooks, pre-command:                    Hooks.
* horizontal-scroll-mode:                Readline Init File Syntax.
* host character set:                    Character Sets.
* htrace disable:                        OpenRISC 1000.
* htrace enable:                         OpenRISC 1000.
* htrace info:                           OpenRISC 1000.
* htrace mode continuous:                OpenRISC 1000.
* htrace mode suspend:                   OpenRISC 1000.
* htrace print:                          OpenRISC 1000.
* htrace qualifier:                      OpenRISC 1000.
* htrace record:                         OpenRISC 1000.
* htrace rewind:                         OpenRISC 1000.
* htrace stop:                           OpenRISC 1000.
* htrace trigger:                        OpenRISC 1000.
* hwatch:                                OpenRISC 1000.
* i (info):                              Help.
* I packet:                              Packets.
* i packet:                              Packets.
* i/o:                                   Input/Output.
* i386:                                  remote stub.
* i386-stub.c:                           remote stub.
* IBM1047 character set:                 Character Sets.
* IDT:                                   DJGPP Native.
* if:                                    Define.
* ignore:                                Conditions.
* ignore count (of breakpoint):          Conditions.
* INCLUDE_RDB:                           VxWorks.
* info:                                  Help.
* info address:                          Symbols.
* info all-registers:                    Registers.
* info args:                             Frame Info.
* info auxv:                             Auxiliary Vector.
* info breakpoints:                      Set Breaks.
* info catch:                            Frame Info.
* info cisco:                            KOD.
* info classes:                          Symbols.
* info display:                          Auto Display.
* info dll:                              Cygwin Native.
* info dos:                              DJGPP Native.
* info extensions:                       Show.
* info f (info frame):                   Frame Info.
* info files:                            Files.
* info float:                            Floating Point Hardware.
* info frame:                            Frame Info.
* info frame, show the source language:  Show.
* info functions:                        Symbols.
* info line:                             Machine Code.
* info line, and Objective-C:            Method Names in Commands.
* info locals:                           Frame Info.
* info macro:                            Macros.
* info mem:                              Memory Region Attributes.
* info or1k spr:                         OpenRISC 1000.
* info proc:                             SVR4 Process Information.
* info proc mappings:                    SVR4 Process Information.
* info program:                          Stopping.
* info registers:                        Registers.
* info s (info stack):                   Backtrace.
* info scope:                            Symbols.
* info selectors:                        Symbols.
* info set:                              Help.
* info share:                            Files.
* info sharedlibrary:                    Files.
* info signals:                          Signals.
* info source:                           Symbols.
* info source, show the source language: Show.
* info sources:                          Symbols.
* info stack:                            Backtrace.
* info symbol:                           Symbols.
* info target:                           Files.
* info terminal:                         Input/Output.
* info threads:                          Threads.
* info tracepoints:                      Listing Tracepoints.
* info types:                            Symbols.
* info variables:                        Symbols.
* info vector:                           Vector Unit.
* info w32:                              Cygwin Native.
* info watchpoints:                      Set Watchpoints.
* info win:                              TUI Commands.
* information about tracepoints:         Listing Tracepoints.
* inheritance:                           Debugging C plus plus.
* init file:                             Command Files.
* init file name:                        Command Files.
* initial frame:                         Frames.
* initialization file, readline:         Readline Init File.
* innermost frame:                       Frames.
* input syntax for GDB/MI:               GDB/MI Input Syntax.
* input-meta:                            Readline Init File Syntax.
* insert-comment (M-#):                  Miscellaneous Commands.
* insert-completions (M-*):              Commands For Completion.
* inspect:                               Data.
* installation:                          Installing GDB.
* instructions, assembly:                Machine Code.
* integral datatypes, in file-i/o protocol: Integral datatypes.
* Intel:                                 remote stub.
* Intel disassembly flavor:              Machine Code.
* interaction, readline:                 Readline Interaction.
* internal commands:                     Maintenance Commands.
* internal GDB breakpoints:              Set Breaks.
* interpreter-exec:                      Interpreters.
* interrupt:                             Quitting GDB.
* interrupting remote programs:          Connecting.
* interrupting remote targets:           Bootstrapping.
* invalid input:                         Bug Criteria.
* invoke another interpreter:            Interpreters.
* isatty call, file-i/o protocol:        The isatty call.
* isatty, file-i/o system call:          isatty.
* isearch-terminators:                   Readline Init File Syntax.
* ISO 8859-1 character set:              Character Sets.
* ISO Latin 1 character set:             Character Sets.
* jump:                                  Jumping.
* jump, and Objective-C:                 Method Names in Commands.
* k packet:                              Packets.
* kernel object display:                 KOD.
* keymap:                                Readline Init File Syntax.
* kill:                                  Kill Process.
* kill ring:                             Readline Killing Commands.
* kill-line (C-k):                       Commands For Killing.
* kill-region ():                        Commands For Killing.
* kill-whole-line ():                    Commands For Killing.
* kill-word (M-d):                       Commands For Killing.
* killing text:                          Readline Killing Commands.
* KOD:                                   KOD.
* l (list):                              List.
* languages:                             Languages.
* last tracepoint number:                Create and Delete Tracepoints.
* latest breakpoint:                     Set Breaks.
* layout asm:                            TUI Commands.
* layout next:                           TUI Commands.
* layout prev:                           TUI Commands.
* layout regs:                           TUI Commands.
* layout split:                          TUI Commands.
* layout src:                            TUI Commands.
* LDT:                                   DJGPP Native.
* leaving GDB:                           Quitting GDB.
* Left:                                  TUI Keys.
* limits, in file-i/o protocol:          Limits.
* linespec:                              List.
* list:                                  List.
* list of supported file-i/o calls:      List of supported calls.
* list output in GDB/MI:                 GDB/MI Output Syntax.
* list, and Objective-C:                 Method Names in Commands.
* listing GDB's internal symbol tables:  Symbols.
* listing machine instructions:          Machine Code.
* listing mapped overlays:               Overlay Commands.
* load address, overlay's:               How Overlays Work.
* load FILENAME:                         Target Commands.
* local variables:                       Symbols.
* locate address:                        Output Formats.
* log output in GDB/MI:                  GDB/MI Output Syntax.
* logging GDB output:                    Logging output.
* lseek flags, in file-i/o protocol:     Lseek flags.
* lseek, file-i/o system call:           lseek.
* M packet:                              Packets.
* m packet:                              Packets.
* m680x0:                                remote stub.
* m68k-stub.c:                           remote stub.
* machine instructions:                  Machine Code.
* macro define:                          Macros.
* macro definition, showing:             Macros.
* macro expand:                          Macros.
* macro expand-once:                     Macros.
* macro expansion, showing the results of preprocessor: Macros.
* macro undef:                           Macros.
* macros, example of debugging with:     Macros.
* macros, user-defined:                  Macros.
* maint info breakpoints:                Maintenance Commands.
* maint info psymtabs:                   Symbols.
* maint info sections:                   Files.
* maint info symtabs:                    Symbols.
* maint internal-error:                  Maintenance Commands.
* maint internal-warning:                Maintenance Commands.
* maint print cooked-registers:          Maintenance Commands.
* maint print dummy-frames:              Maintenance Commands.
* maint print psymbols:                  Symbols.
* maint print raw-registers:             Maintenance Commands.
* maint print reggroups:                 Maintenance Commands.
* maint print register-groups:           Maintenance Commands.
* maint print registers:                 Maintenance Commands.
* maint print symbols:                   Symbols.
* maint set profile:                     Maintenance Commands.
* maint show profile:                    Maintenance Commands.
* maintenance commands:                  Maintenance Commands.
* make:                                  Shell Commands.
* manual overlay debugging:              Overlay Commands.
* map an overlay:                        Overlay Commands.
* mapped:                                Files.
* mapped address:                        How Overlays Work.
* mapped overlays:                       How Overlays Work.
* mark-modified-lines:                   Readline Init File Syntax.
* mark-symlinked-directories:            Readline Init File Syntax.
* match-hidden-files:                    Readline Init File Syntax.
* mem:                                   Memory Region Attributes.
* member functions:                      C plus plus expressions.
* memory models, H8/500:                 H8/500.
* memory region attributes:              Memory Region Attributes.
* memory tracing:                        Breakpoints.
* memory transfer, in file-i/o protocol: Memory transfer.
* memory, viewing as typed object:       Expressions.
* memory-mapped symbol file:             Files.
* memset:                                Bootstrapping.
* menu-complete ():                      Commands For Completion.
* meta-flag:                             Readline Init File Syntax.
* mi interpreter:                        Interpreters.
* mi1 interpreter:                       Interpreters.
* mi2 interpreter:                       Interpreters.
* minimal language:                      Unsupported languages.
* Minimal symbols and DLLs:              Non-debug DLL symbols.
* MIPS boards:                           MIPS Embedded.
* MIPS remote floating point:            MIPS Embedded.
* MIPS remotedebug protocol:             MIPS Embedded.
* MIPS stack:                            MIPS.
* mode_t values, in file-i/o protocol:   mode_t values.
* Modula-2:                              Summary.
* Modula-2 built-ins:                    Built-In Func/Proc.
* Modula-2 checks:                       M2 Checks.
* Modula-2 constants:                    Built-In Func/Proc.
* Modula-2 defaults:                     M2 Defaults.
* Modula-2 operators:                    M2 Operators.
* Modula-2, deviations from:             Deviations.
* Modula-2, GDB support:                 Modula-2.
* Motorola 680x0:                        remote stub.
* MS Windows debugging:                  Cygwin Native.
* MS-DOS system info:                    DJGPP Native.
* MS-DOS-specific commands:              DJGPP Native.
* multiple processes:                    Processes.
* multiple targets:                      Active Targets.
* multiple threads:                      Threads.
* n (next):                              Continuing and Stepping.
* n (SingleKey TUI key):                 TUI Single Key Mode.
* names of symbols:                      Symbols.
* namespace in C++:                      C plus plus expressions.
* native Cygwin debugging:               Cygwin Native.
* native DJGPP debugging:                DJGPP Native.
* negative breakpoint numbers:           Set Breaks.
* New SYSTAG message:                    Threads.
* New SYSTAG message, on HP-UX:          Threads.
* next:                                  Continuing and Stepping.
* next-history (C-n):                    Commands For History.
* nexti:                                 Continuing and Stepping.
* ni (nexti):                            Continuing and Stepping.
* non-incremental-forward-search-history (M-n): Commands For History.
* non-incremental-reverse-search-history (M-p): Commands For History.
* notation, readline:                    Readline Bare Essentials.
* notational conventions, for GDB/MI:    GDB/MI.
* notify output in GDB/MI:               GDB/MI Output Syntax.
* number representation:                 Numbers.
* numbers for breakpoints:               Breakpoints.
* object files, relocatable, reading symbols from: Files.
* Objective-C:                           Objective-C.
* online documentation:                  Help.
* open flags, in file-i/o protocol:      Open flags.
* open, file-i/o system call:            open.
* OpenRISC 1000:                         OpenRISC 1000.
* OpenRISC 1000 htrace:                  OpenRISC 1000.
* operations allowed on pending breakpoints: Set Breaks.
* optimized code, debugging:             Compilation.
* or1k boards:                           OpenRISC 1000.
* or1ksim:                               OpenRISC 1000.
* OS ABI:                                ABI.
* out-of-band records in GDB/MI:         GDB/MI Out-of-band Records.
* outermost frame:                       Frames.
* output:                                Output.
* output formats:                        Output Formats.
* output syntax of GDB/MI:               GDB/MI Output Syntax.
* output-meta:                           Readline Init File Syntax.
* overlay area:                          How Overlays Work.
* overlay auto:                          Overlay Commands.
* overlay example program:               Overlay Sample Program.
* overlay load-target:                   Overlay Commands.
* overlay manual:                        Overlay Commands.
* overlay map-overlay:                   Overlay Commands.
* overlay off:                           Overlay Commands.
* overlay unmap-overlay:                 Overlay Commands.
* overlays:                              Overlays.
* overlays, setting breakpoints in:      Overlay Commands.
* overload-choice:                       Prompting.
* overloaded functions, calling:         C plus plus expressions.
* overloaded functions, overload resolution: Debugging C plus plus.
* overloading:                           Breakpoint Menus.
* overloading in C++:                    Debugging C plus plus.
* overwrite-mode ():                     Commands For Text.
* P packet:                              Packets.
* p packet:                              Packets.
* packets, reporting on stdout:          Debugging Output.
* page tables display (MS-DOS):          DJGPP Native.
* page-completions:                      Readline Init File Syntax.
* partial symbol dump:                   Symbols.
* partial symbol tables, listing GDB's internal: Symbols.
* Pascal:                                Summary.
* passcount:                             Tracepoint Passcounts.
* patching binaries:                     Patching.
* path:                                  Environment.
* pauses in output:                      Screen Size.
* pending breakpoints:                   Set Breaks.
* PgDn:                                  TUI Keys.
* PgUp:                                  TUI Keys.
* physical address from linear address:  DJGPP Native.
* pipes:                                 Starting.
* po (print-object):                     The Print Command with Objective-C.
* pointer values, in file-i/o protocol:  Pointer values.
* pointer, finding referent:             Print Settings.
* possible-completions (M-?):            Commands For Completion.
* post-commands:                         Prompting.
* post-overload-choice:                  Prompting.
* post-prompt:                           Prompting.
* post-prompt-for-continue:              Prompting.
* post-query:                            Prompting.
* pre-commands:                          Prompting.
* pre-overload-choice:                   Prompting.
* pre-prompt:                            Prompting.
* pre-prompt-for-continue:               Prompting.
* pre-query:                             Prompting.
* prefix-meta (<ESC>):                   Miscellaneous Commands.
* premature return from system calls:    Thread Stops.
* preprocessor macro expansion, showing the results of: Macros.
* previous-history (C-p):                Commands For History.
* print:                                 Data.
* print an Objective-C object description: The Print Command with Objective-C.
* print settings:                        Print Settings.
* print-object:                          The Print Command with Objective-C.
* printf:                                Output.
* printing data:                         Data.
* process image:                         SVR4 Process Information.
* processes, multiple:                   Processes.
* profiling GDB:                         Maintenance Commands.
* prompt <1>:                            Prompting.
* prompt:                                Prompt.
* prompt-for-continue:                   Prompting.
* protocol basics, file-i/o:             Protocol basics.
* protocol specific representation of datatypes, in file-i/o protocol: Protocol specific representation of datatypes.
* protocol, GDB remote serial:           Overview.
* ptype:                                 Symbols.
* putDebugChar:                          Bootstrapping.
* pwd:                                   Working Directory.
* q (quit):                              Quitting GDB.
* q (SingleKey TUI key):                 TUI Single Key Mode.
* Q packet:                              Packets.
* q packet:                              Packets.
* query:                                 Prompting.
* quit:                                  Errors.
* quit [EXPRESSION]:                     Quitting GDB.
* quoted-insert (C-q or C-v):            Commands For Text.
* quotes in commands:                    Completion.
* quoting names:                         Symbols.
* r (run):                               Starting.
* r (SingleKey TUI key):                 TUI Single Key Mode.
* R packet:                              Packets.
* r packet:                              Packets.
* raise exceptions:                      Set Catchpoints.
* range checking:                        Type Checking.
* ranges of breakpoints:                 Breakpoints.
* rbreak:                                Set Breaks.
* re-read-init-file (C-x C-r):           Miscellaneous Commands.
* read, file-i/o system call:            read.
* reading symbols from relocatable object files: Files.
* reading symbols immediately:           Files.
* readline:                              Editing.
* readnow:                               Files.
* recent tracepoint number:              Create and Delete Tracepoints.
* redirection:                           Input/Output.
* redraw-current-line ():                Commands For Moving.
* reference card:                        Formatting Documentation.
* reference declarations:                C plus plus expressions.
* refresh:                               TUI Commands.
* register stack, AMD29K:                A29K.
* registers:                             Registers.
* regular expression:                    Set Breaks.
* reloading symbols:                     Symbols.
* reloading the overlay table:           Overlay Commands.
* relocatable object files, reading symbols from: Files.
* remote connection without stubs:       Server.
* remote debugging:                      Remote.
* remote programs, interrupting:         Connecting.
* remote protocol, field separator:      Overview.
* remote serial debugging summary:       Debug Session.
* remote serial debugging, overview:     remote stub.
* remote serial protocol:                Overview.
* remote serial stub:                    Stub Contents.
* remote serial stub list:               remote stub.
* remote serial stub, initialization:    Stub Contents.
* remote serial stub, main routine:      Stub Contents.
* remote stub, example:                  remote stub.
* remote stub, support routines:         Bootstrapping.
* remotedebug, MIPS protocol:            MIPS Embedded.
* remotetimeout:                         Sparclet.
* remove actions from a tracepoint:      Tracepoint Actions.
* rename, file-i/o system call:          rename.
* Renesas:                               remote stub.
* Renesas SH download:                   H8/300.
* repeating command sequences:           Command Syntax.
* repeating commands:                    Command Syntax.
* reporting bugs in GDB:                 GDB Bugs.
* response time, MIPS debugging:         MIPS.
* restore:                               Dump/Restore Files.
* restore data from a file:              Dump/Restore Files.
* result records in GDB/MI:              GDB/MI Result Records.
* resuming execution:                    Continuing and Stepping.
* RET (repeat last command):             Command Syntax.
* retransmit-timeout, MIPS protocol:     MIPS Embedded.
* return:                                Returning.
* returning from a function:             Returning.
* reverse-search:                        Search.
* reverse-search-history (C-r):          Commands For History.
* revert-line (M-r):                     Miscellaneous Commands.
* Right:                                 TUI Keys.
* run:                                   Starting.
* running:                               Starting.
* running and debugging Sparclet programs: Sparclet Execution.
* running VxWorks tasks:                 VxWorks Attach.
* running, on Sparclet:                  Sparclet.
* rwatch:                                Set Watchpoints.
* s (SingleKey TUI key):                 TUI Single Key Mode.
* s (step):                              Continuing and Stepping.
* S packet:                              Packets.
* s packet:                              Packets.
* save tracepoints for future sessions:  save-tracepoints.
* save-tracepoints:                      save-tracepoints.
* saving symbol table:                   Files.
* scope:                                 M2 Scope.
* search:                                Search.
* searching:                             Search.
* section:                               Files.
* segment descriptor tables:             DJGPP Native.
* select trace snapshot:                 tfind.
* select-frame:                          Frames.
* selected frame:                        Stack.
* selecting frame silently:              Frames.
* self-insert (a, b, A, 1, !, ...):      Commands For Text.
* separate debugging information files:  Separate Debug Files.
* sequence-id, for GDB remote:           Overview.
* serial connections, debugging:         Debugging Output.
* serial device, Renesas micros:         Renesas Boards.
* serial line speed, Renesas micros:     Renesas Boards.
* serial line, target remote:            Connecting.
* serial protocol, GDB remote:           Overview.
* server prefix for annotations:         Server Prefix.
* set:                                   Help.
* set args:                              Arguments.
* set auto-solib-add:                    Files.
* set auto-solib-limit:                  Files.
* set backtrace limit:                   Backtrace.
* set backtrace past-main:               Backtrace.
* set breakpoint pending:                Set Breaks.
* set charset:                           Character Sets.
* set check range:                       Range Checking.
* set check type:                        Type Checking.
* set check, range:                      Range Checking.
* set check, type:                       Type Checking.
* set coerce-float-to-double:            ABI.
* set complaints:                        Messages/Warnings.
* set confirm:                           Messages/Warnings.
* set cp-abi:                            ABI.
* set debug arch:                        Debugging Output.
* set debug event:                       Debugging Output.
* set debug expression:                  Debugging Output.
* set debug frame:                       Debugging Output.
* set debug overload:                    Debugging Output.
* set debug remote:                      Debugging Output.
* set debug serial:                      Debugging Output.
* set debug target:                      Debugging Output.
* set debug varobj:                      Debugging Output.
* set debug-file-directory:              Separate Debug Files.
* set debugevents:                       Cygwin Native.
* set debugexceptions:                   Cygwin Native.
* set debugexec:                         Cygwin Native.
* set debugmemory:                       Cygwin Native.
* set demangle-style:                    Print Settings.
* set disassembly-flavor:                Machine Code.
* set editing:                           Editing.
* set endian auto:                       Byte Order.
* set endian big:                        Byte Order.
* set endian little:                     Byte Order.
* set environment:                       Environment.
* set extension-language:                Show.
* set follow-fork-mode:                  Processes.
* set gnutarget:                         Target Commands.
* set height:                            Screen Size.
* set history expansion:                 History.
* set history filename:                  History.
* set history save:                      History.
* set history size:                      History.
* set host-charset:                      Character Sets.
* set input-radix:                       Numbers.
* set language:                          Manually.
* set listsize:                          List.
* set logging:                           Logging output.
* set machine:                           Renesas Special.
* set max-user-call-depth:               Define.
* set memory MOD:                        H8/500.
* set mipsfpu:                           MIPS Embedded.
* set new-console:                       Cygwin Native.
* set new-group:                         Cygwin Native.
* set opaque-type-resolution:            Symbols.
* set os:                                KOD.
* set osabi:                             ABI.
* set output-radix:                      Numbers.
* set overload-resolution:               Debugging C plus plus.
* set print address:                     Print Settings.
* set print array:                       Print Settings.
* set print asm-demangle:                Print Settings.
* set print demangle:                    Print Settings.
* set print elements:                    Print Settings.
* set print max-symbolic-offset:         Print Settings.
* set print null-stop:                   Print Settings.
* set print object:                      Print Settings.
* set print pretty:                      Print Settings.
* set print sevenbit-strings:            Print Settings.
* set print static-members:              Print Settings.
* set print symbol-filename:             Print Settings.
* set print union:                       Print Settings.
* set print vtbl:                        Print Settings.
* set processor ARGS:                    MIPS Embedded.
* set prompt:                            Prompt.
* set remote hardware-breakpoint-limit:  Remote configuration.
* set remote hardware-watchpoint-limit:  Remote configuration.
* set remote system-call-allowed 0:      The system call.
* set remote system-call-allowed 1:      The system call.
* set remotedebug, MIPS protocol:        MIPS Embedded.
* set retransmit-timeout:                MIPS Embedded.
* set rstack_high_address:               A29K.
* set shell:                             Cygwin Native.
* set solib-absolute-prefix:             Files.
* set solib-search-path:                 Files.
* set step-mode:                         Continuing and Stepping.
* set symbol-reloading:                  Symbols.
* set target-charset:                    Character Sets.
* set timeout:                           MIPS Embedded.
* set tracepoint:                        Create and Delete Tracepoints.
* set trust-readonly-sections:           Files.
* set tui active-border-mode:            TUI Configuration.
* set tui border-kind:                   TUI Configuration.
* set tui border-mode:                   TUI Configuration.
* set variable:                          Assignment.
* set verbose:                           Messages/Warnings.
* set width:                             Screen Size.
* set write:                             Patching.
* set-mark (C-@):                        Miscellaneous Commands.
* set_debug_traps:                       Stub Contents.
* setting variables:                     Assignment.
* setting watchpoints:                   Set Watchpoints.
* SH:                                    remote stub.
* sh-stub.c:                             remote stub.
* share:                                 Files.
* shared libraries:                      Files.
* sharedlibrary:                         Files.
* shell:                                 Shell Commands.
* shell escape:                          Shell Commands.
* show:                                  Help.
* show args:                             Arguments.
* show auto-solib-add:                   Files.
* show auto-solib-limit:                 Files.
* show backtrace limit:                  Backtrace.
* show backtrace past-main:              Backtrace.
* show breakpoint pending:               Set Breaks.
* show charset:                          Character Sets.
* show check range:                      Range Checking.
* show check type:                       Type Checking.
* show complaints:                       Messages/Warnings.
* show confirm:                          Messages/Warnings.
* show convenience:                      Convenience Vars.
* show copying:                          Help.
* show cp-abi:                           ABI.
* show debug arch:                       Debugging Output.
* show debug event:                      Debugging Output.
* show debug expression:                 Debugging Output.
* show debug frame:                      Debugging Output.
* show debug overload:                   Debugging Output.
* show debug remote:                     Debugging Output.
* show debug serial:                     Debugging Output.
* show debug target:                     Debugging Output.
* show debug varobj:                     Debugging Output.
* show debug-file-directory:             Separate Debug Files.
* show demangle-style:                   Print Settings.
* show directories:                      Source Path.
* show editing:                          Editing.
* show environment:                      Environment.
* show gnutarget:                        Target Commands.
* show height:                           Screen Size.
* show history:                          History.
* show host-charset:                     Character Sets.
* show input-radix:                      Numbers.
* show language:                         Show.
* show listsize:                         List.
* show logging:                          Logging output.
* show machine:                          Renesas Special.
* show max-user-call-depth:              Define.
* show mipsfpu:                          MIPS Embedded.
* show new-console:                      Cygwin Native.
* show new-group:                        Cygwin Native.
* show opaque-type-resolution:           Symbols.
* show os:                               KOD.
* show osabi:                            ABI.
* show output-radix:                     Numbers.
* show paths:                            Environment.
* show print address:                    Print Settings.
* show print array:                      Print Settings.
* show print asm-demangle:               Print Settings.
* show print demangle:                   Print Settings.
* show print elements:                   Print Settings.
* show print max-symbolic-offset:        Print Settings.
* show print object:                     Print Settings.
* show print pretty:                     Print Settings.
* show print sevenbit-strings:           Print Settings.
* show print static-members:             Print Settings.
* show print symbol-filename:            Print Settings.
* show print union:                      Print Settings.
* show print vtbl:                       Print Settings.
* show processor:                        MIPS Embedded.
* show prompt:                           Prompt.
* show remote system-call-allowed:       The system call.
* show remotedebug, MIPS protocol:       MIPS Embedded.
* show retransmit-timeout:               MIPS Embedded.
* show rstack_high_address:              A29K.
* show shell:                            Cygwin Native.
* show solib-absolute-prefix:            Files.
* show solib-search-path:                Files.
* show symbol-reloading:                 Symbols.
* show target-charset:                   Character Sets.
* show timeout:                          MIPS Embedded.
* show user:                             Define.
* show values:                           Value History.
* show verbose:                          Messages/Warnings.
* show version:                          Help.
* show warranty:                         Help.
* show width:                            Screen Size.
* show write:                            Patching.
* show-all-if-ambiguous:                 Readline Init File Syntax.
* shows:                                 History.
* si (stepi):                            Continuing and Stepping.
* signal <1>:                            Annotations for Running.
* signal:                                Signaling.
* signal-name:                           Annotations for Running.
* signal-name-end:                       Annotations for Running.
* signal-string:                         Annotations for Running.
* signal-string-end:                     Annotations for Running.
* signalled:                             Annotations for Running.
* signals:                               Signals.
* silent:                                Break Commands.
* sim:                                   Z8000.
* simulator, Z8000:                      Z8000.
* size of screen:                        Screen Size.
* software watchpoints:                  Set Watchpoints.
* source <1>:                            Source Annotations.
* source:                                Command Files.
* source path:                           Source Path.
* Sparc:                                 remote stub.
* sparc-stub.c:                          remote stub.
* sparcl-stub.c:                         remote stub.
* Sparclet:                              Sparclet.
* SparcLite:                             remote stub.
* speed:                                 Renesas Boards.
* spr:                                   OpenRISC 1000.
* ST2000 auxiliary commands:             ST2000.
* st2000 CMD:                            ST2000.
* stack frame:                           Frames.
* stack on Alpha:                        MIPS.
* stack on MIPS:                         MIPS.
* stack traces:                          Backtrace.
* stacking targets:                      Active Targets.
* start a new trace experiment:          Starting and Stopping Trace Experiment.
* start-kbd-macro (C-x ():               Keyboard Macros.
* starting <1>:                          Annotations for Running.
* starting:                              Starting.
* stat, file-i/o system call:            stat/fstat.
* status of trace data collection:       Starting and Stopping Trace Experiment.
* status output in GDB/MI:               GDB/MI Output Syntax.
* STDBUG commands (ST2000):              ST2000.
* step:                                  Continuing and Stepping.
* stepi:                                 Continuing and Stepping.
* stepping:                              Continuing and Stepping.
* stepping into functions with no line info: Continuing and Stepping.
* stop a running trace experiment:       Starting and Stopping Trace Experiment.
* stop reply packets:                    Stop Reply Packets.
* stop, a pseudo-command:                Hooks.
* stopped threads:                       Thread Stops.
* stopping:                              Annotations for Running.
* stream records in GDB/MI:              GDB/MI Stream Records.
* struct stat, in file-i/o protocol:     struct stat.
* struct timeval, in file-i/o protocol:  struct timeval.
* stub example, remote debugging:        remote stub.
* stupid questions:                      Messages/Warnings.
* switching threads:                     Threads.
* switching threads automatically:       Threads.
* symbol decoding style, C++:            Print Settings.
* symbol dump:                           Symbols.
* symbol from address:                   Symbols.
* symbol names:                          Symbols.
* symbol overloading:                    Breakpoint Menus.
* symbol table:                          Files.
* symbol tables, listing GDB's internal: Symbols.
* symbol-file:                           Files.
* symbols, reading from relocatable object files: Files.
* symbols, reading immediately:          Files.
* sysinfo:                               DJGPP Native.
* system call, file-i/o protocol:        The system call.
* system calls and thread breakpoints:   Thread Stops.
* system, file-i/o system call:          system.
* T packet:                              Packets.
* t packet:                              Packets.
* T packet reply:                        Stop Reply Packets.
* target:                                Targets.
* target abug:                           M68K.
* target array:                          MIPS Embedded.
* target byte order:                     Byte Order.
* target character set:                  Character Sets.
* target core:                           Target Commands.
* target cpu32bug:                       M68K.
* target dbug:                           M68K.
* target ddb PORT:                       MIPS Embedded.
* target dink32:                         PowerPC.
* target e7000, with H8/300:             H8/300.
* target e7000, with Renesas ICE:        Renesas ICE.
* target e7000, with Renesas SH:         SH.
* target est:                            M68K.
* target exec:                           Target Commands.
* target hms, and serial protocol:       Renesas Boards.
* target hms, with H8/300:               H8/300.
* target hms, with Renesas SH:           SH.
* target jtag:                           OpenRISC 1000.
* target lsi PORT:                       MIPS Embedded.
* target m32r:                           M32R/D.
* target m32rsdi:                        M32R/D.
* target mips PORT:                      MIPS Embedded.
* target nrom:                           Target Commands.
* target op50n:                          PA.
* target output in GDB/MI:               GDB/MI Output Syntax.
* target pmon PORT:                      MIPS Embedded.
* target ppcbug:                         PowerPC.
* target ppcbug1:                        PowerPC.
* target r3900:                          MIPS Embedded.
* target rdi:                            ARM.
* target rdp:                            ARM.
* target remote:                         Target Commands.
* target rom68k:                         M68K.
* target rombug:                         M68K.
* target sds:                            PowerPC.
* target sh3, with H8/300:               H8/300.
* target sh3, with SH:                   SH.
* target sh3e, with H8/300:              H8/300.
* target sh3e, with SH:                  SH.
* target sim:                            Target Commands.
* target sim, with Z8000:                Z8000.
* target sparclite:                      Sparclite.
* target vxworks:                        VxWorks.
* target w89k:                           PA.
* tbreak:                                Set Breaks.
* TCP port, target remote:               Connecting.
* tdump:                                 tdump.
* terminal:                              Input/Output.
* Text User Interface:                   TUI.
* tfind:                                 tfind.
* thbreak:                               Set Breaks.
* this, inside C++ member functions:     C plus plus expressions.
* thread apply:                          Threads.
* thread breakpoints:                    Thread Stops.
* thread breakpoints and system calls:   Thread Stops.
* thread identifier (GDB):               Threads.
* thread identifier (system):            Threads.
* thread identifier (system), on HP-UX:  Threads.
* thread number:                         Threads.
* thread THREADNO:                       Threads.
* threads and watchpoints:               Set Watchpoints.
* threads of execution:                  Threads.
* threads, automatic switching:          Threads.
* threads, continuing:                   Thread Stops.
* threads, stopped:                      Thread Stops.
* timeout, MIPS protocol:                MIPS Embedded.
* trace:                                 Create and Delete Tracepoints.
* trace experiment, status of:           Starting and Stopping Trace Experiment.
* tracebacks:                            Backtrace.
* tracepoint actions:                    Tracepoint Actions.
* tracepoint data, display:              tdump.
* tracepoint deletion:                   Create and Delete Tracepoints.
* tracepoint number:                     Create and Delete Tracepoints.
* tracepoint pass count:                 Tracepoint Passcounts.
* tracepoint variables:                  Tracepoint Variables.
* tracepoints:                           Tracepoints.
* translating between character sets:    Character Sets.
* transpose-chars (C-t):                 Commands For Text.
* transpose-words (M-t):                 Commands For Text.
* tstart:                                Starting and Stopping Trace Experiment.
* tstatus:                               Starting and Stopping Trace Experiment.
* tstop:                                 Starting and Stopping Trace Experiment.
* tty:                                   Input/Output.
* TUI:                                   TUI.
* TUI commands:                          TUI Commands.
* TUI configuration variables:           TUI Configuration.
* TUI key bindings:                      TUI Keys.
* tui reg:                               TUI Commands.
* TUI single key mode:                   TUI Single Key Mode.
* type casting memory:                   Expressions.
* type checking:                         Checks.
* type conversions in C++:               C plus plus expressions.
* u (SingleKey TUI key):                 TUI Single Key Mode.
* u (until):                             Continuing and Stepping.
* UDP port, target remote:               Connecting.
* undisplay:                             Auto Display.
* undo (C-_ or C-x C-u):                 Miscellaneous Commands.
* universal-argument ():                 Numeric Arguments.
* unix-line-discard (C-u):               Commands For Killing.
* unix-word-rubout (C-w):                Commands For Killing.
* unknown address, locating:             Output Formats.
* unlink, file-i/o system call:          unlink.
* unmap an overlay:                      Overlay Commands.
* unmapped overlays:                     How Overlays Work.
* unset environment:                     Environment.
* unsupported languages:                 Unsupported languages.
* until:                                 Continuing and Stepping.
* Up:                                    TUI Keys.
* up:                                    Selection.
* up-silently:                           Selection.
* upcase-word (M-u):                     Commands For Text.
* update:                                TUI Commands.
* user-defined command:                  Define.
* user-defined macros:                   Macros.
* v (SingleKey TUI key):                 TUI Single Key Mode.
* value history:                         Value History.
* variable name conflict:                Variables.
* variable objects in GDB/MI:            GDB/MI Variable Objects.
* variable values, wrong:                Variables.
* variables, readline:                   Readline Init File Syntax.
* variables, setting:                    Assignment.
* vCont packet:                          Packets.
* vCont? packet:                         Packets.
* vector unit:                           Vector Unit.
* vector, auxiliary:                     Auxiliary Vector.
* version number:                        Help.
* visible-stats:                         Readline Init File Syntax.
* VxWorks:                               VxWorks.
* vxworks-timeout:                       VxWorks.
* w (SingleKey TUI key):                 TUI Single Key Mode.
* watch:                                 Set Watchpoints.
* watchpoint:                            Annotations for Running.
* watchpoints:                           Breakpoints.
* watchpoints and threads:               Set Watchpoints.
* whatis:                                Symbols.
* where:                                 Backtrace.
* while:                                 Define.
* while-stepping (tracepoints):          Tracepoint Actions.
* wild pointer, interpreting:            Print Settings.
* winheight:                             TUI Commands.
* word completion:                       Completion.
* working directory:                     Source Path.
* working directory (of your program):   Working Directory.
* working language:                      Languages.
* write, file-i/o system call:           write.
* writing into corefiles:                Patching.
* writing into executables:              Patching.
* wrong values:                          Variables.
* x (examine memory):                    Memory.
* X packet:                              Packets.
* x(examine), and info line:             Machine Code.
* yank (C-y):                            Commands For Killing.
* yank-last-arg (M-. or M-_):            Commands For History.
* yank-nth-arg (M-C-y):                  Commands For History.
* yank-pop (M-y):                        Commands For Killing.
* yanking text:                          Readline Killing Commands.
* z packet:                              Packets.
* Z packets:                             Packets.
* Z0 packet:                             Packets.
* z0 packet:                             Packets.
* Z1 packet:                             Packets.
* z1 packet:                             Packets.
* Z2 packet:                             Packets.
* z2 packet:                             Packets.
* Z3 packet:                             Packets.
* z3 packet:                             Packets.
* Z4 packet:                             Packets.
* z4 packet:                             Packets.
* Z8000:                                 Z8000.
* Zilog Z8000 simulator:                 Z8000.
* {TYPE}:                                Expressions.


OpenPOWER on IntegriCloud