diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 441 |
1 files changed, 238 insertions, 203 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index e0738357..b8f5df60 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -21601,12 +21601,12 @@ File: gawk.info, Node: Debugger, Next: Arbitrary Precision Arithmetic, Prev: It would be nice if computer programs worked perfectly the first time they were run, but in real life, this rarely happens for programs of any complexity. Thus, most programming languages have facilities available -for "debugging" programs, and now 'awk' is no exception. +for "debugging" programs, and 'awk' is no exception. The 'gawk' debugger is purposely modeled after the GNU Debugger (GDB) (https://www.gnu.org/software/gdb/) command-line debugger. If you are -familiar with GDB, learning how to use 'gawk' for debugging your program -is easy. +familiar with GDB, learning how to use 'gawk' for debugging your +programs is easy. * Menu: @@ -21743,7 +21743,12 @@ instructions. is easy to lose sight of everything that is going on "inside" each line of 'awk' code. The debugger provides the opportunity to look at the individual primitive instructions carried out by the higher-level 'awk' -commands. +commands.(1) + + ---------- Footnotes ---------- + + (1) The "primitive instructions" are defined by 'gawk' itself; the +debugger does not work at the level of machine instructions. File: gawk.info, Node: Sample Debugging Session, Next: List of Debugger Commands, Prev: Debugging, Up: Debugger @@ -21753,7 +21758,7 @@ File: gawk.info, Node: Sample Debugging Session, Next: List of Debugger Comman In order to illustrate the use of 'gawk' as a debugger, let's look at a sample debugging session. We will use the 'awk' implementation of the -POSIX 'uniq' command described earlier (*note Uniq Program::) as our +POSIX 'uniq' command presented earlier (*note Uniq Program::) as our example. * Menu: @@ -21800,9 +21805,8 @@ File: gawk.info, Node: Finding The Bug, Prev: Debugger Invocation, Up: Sample ---------------------- Let's say that we are having a problem using (a faulty version of) -'uniq.awk' in the "field-skipping" mode, and it doesn't seem to be -catching lines which should be identical when skipping the first field, -such as: +'uniq.awk' in "field-skipping" mode, and it doesn't seem to be catching +lines which should be identical when skipping the first field, such as: awk is a wonderful program! gawk is a wonderful program! @@ -33647,7 +33651,7 @@ Index (line 6) * break debugger command: Breakpoint Control. (line 11) * break statement: Break Statement. (line 6) -* breakpoint: Debugging Terms. (line 33) +* breakpoint (debugger): Debugging Terms. (line 33) * breakpoint at location, how to delete: Breakpoint Control. (line 36) * breakpoint commands: Debugger Execution Control. (line 10) @@ -33706,6 +33710,7 @@ Index (line 44) * call by value: Pass By Value/Reference. (line 15) +* call stack (debugger): Debugging Terms. (line 10) * call stack, display in debugger: Execution Stack. (line 13) * caret (^), in bracket expressions: Bracket Expressions. (line 25) * caret (^), regexp operator: Regexp Operators. (line 22) @@ -33962,6 +33967,7 @@ Index * dcngettext() function (gawk), portability and: I18N Portability. (line 33) * deadlocks: Two-way I/O. (line 53) +* debugger capabilities: Debugging Concepts. (line 16) * debugger commands, b (break): Breakpoint Control. (line 11) * debugger commands, backtrace: Execution Stack. (line 13) * debugger commands, break: Breakpoint Control. (line 11) @@ -34059,15 +34065,41 @@ Index * debugger commands, watch: Viewing And Changing Data. (line 66) * debugger commands, where (backtrace): Execution Stack. (line 13) +* debugger concepts: Debugging Terms. (line 6) * debugger default list amount: Debugger Info. (line 69) * debugger history file: Debugger Info. (line 81) * debugger history size: Debugger Info. (line 65) * debugger options: Debugger Info. (line 57) * debugger prompt: Debugger Info. (line 78) +* debugger, b command: Finding The Bug. (line 32) +* debugger, backtrace command: Finding The Bug. (line 52) +* debugger, break command: Finding The Bug. (line 32) +* debugger, breakpoint command: Finding The Bug. (line 32) +* debugger, bt command: Finding The Bug. (line 52) +* debugger, command completion: Readline Support. (line 6) +* debugger, history expansion: Readline Support. (line 6) * debugger, how to start: Debugger Invocation. (line 6) +* debugger, instruction tracing: Debugger Info. (line 90) +* debugger, limitations: Limitations. (line 6) +* debugger, n command: Finding The Bug. (line 105) +* debugger, next command: Finding The Bug. (line 105) +* debugger, p command: Finding The Bug. (line 68) +* debugger, print command: Finding The Bug. (line 68) +* debugger, printing all array elements: Finding The Bug. (line 154) +* debugger, printing single array elements: Finding The Bug. (line 140) +* debugger, prompt: Debugger Invocation. (line 23) * debugger, read commands from a file: Debugger Info. (line 97) +* debugger, repeating commands: List of Debugger Commands. + (line 21) +* debugger, run command: Finding The Bug. (line 39) +* debugger, running the program: Finding The Bug. (line 39) +* debugger, save commands to a file: Debugger Info. (line 92) +* debugger, setting a breakpoint: Finding The Bug. (line 32) +* debugger, show stack frames: Finding The Bug. (line 52) * debugging awk programs: Debugger. (line 6) * debugging gawk, bug reports: Bugs. (line 9) +* debugging, example session: Sample Debugging Session. + (line 6) * decimal point character, locale specific: Options. (line 282) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) @@ -34274,6 +34306,8 @@ Index * evaluation order, concatenation: Concatenation. (line 41) * evaluation order, functions: Calling Built-in. (line 30) * examining fields: Fields. (line 6) +* example debugging session: Sample Debugging Session. + (line 6) * exclamation point (!), ! operator: Boolean Ops. (line 69) * exclamation point (!), ! operator <1>: Precedence. (line 51) * exclamation point (!), ! operator <2>: Egrep Program. (line 174) @@ -35838,7 +35872,7 @@ Index * square brackets ([]), regexp operator: Regexp Operators. (line 56) * square root: Numeric Functions. (line 78) * srand: Numeric Functions. (line 82) -* stack frame: Debugging Terms. (line 10) +* stack frame (debugger): Debugging Terms. (line 10) * Stallman, Richard: Manual History. (line 6) * Stallman, Richard <1>: Acknowledgments. (line 18) * Stallman, Richard <2>: Contributors. (line 24) @@ -36121,7 +36155,7 @@ Index * warnings, issuing: Options. (line 198) * watch debugger command: Viewing And Changing Data. (line 66) -* watchpoint: Debugging Terms. (line 42) +* watchpoint (debugger): Debugging Terms. (line 42) * wc utility: Wc Program. (line 6) * wc.awk program: Wc Program. (line 46) * Weinberger, Peter: History. (line 17) @@ -36547,197 +36581,198 @@ Ref: I18N Example-Footnote-1874131 Node: Gawk I18N874204 Node: I18N Summary874849 Node: Debugger876190 -Node: Debugging877213 -Node: Debugging Concepts877654 -Node: Debugging Terms879463 -Node: Awk Debugging882038 -Node: Sample Debugging Session882944 -Node: Debugger Invocation883478 -Node: Finding The Bug884864 -Node: List of Debugger Commands891342 -Node: Breakpoint Control892675 -Node: Debugger Execution Control896369 -Node: Viewing And Changing Data899731 -Node: Execution Stack903105 -Node: Debugger Info904742 -Node: Miscellaneous Debugger Commands908813 -Node: Readline Support913875 -Node: Limitations914771 -Node: Debugging Summary916880 -Node: Arbitrary Precision Arithmetic918159 -Node: Computer Arithmetic919644 -Ref: table-numeric-ranges923410 -Ref: table-floating-point-ranges923903 -Ref: Computer Arithmetic-Footnote-1924561 -Node: Math Definitions924618 -Ref: table-ieee-formats927934 -Ref: Math Definitions-Footnote-1928537 -Node: MPFR features928642 -Node: FP Math Caution930360 -Ref: FP Math Caution-Footnote-1931432 -Node: Inexactness of computations931801 -Node: Inexact representation932761 -Node: Comparing FP Values934121 -Node: Errors accumulate935362 -Node: Getting Accuracy936795 -Node: Try To Round939505 -Node: Setting precision940404 -Ref: table-predefined-precision-strings941101 -Node: Setting the rounding mode942931 -Ref: table-gawk-rounding-modes943305 -Ref: Setting the rounding mode-Footnote-1947236 -Node: Arbitrary Precision Integers947415 -Ref: Arbitrary Precision Integers-Footnote-1950590 -Node: Checking for MPFR950739 -Node: POSIX Floating Point Problems952213 -Ref: POSIX Floating Point Problems-Footnote-1956498 -Node: Floating point summary956536 -Node: Dynamic Extensions958726 -Node: Extension Intro960279 -Node: Plugin License961545 -Node: Extension Mechanism Outline962342 -Ref: figure-load-extension962781 -Ref: figure-register-new-function964346 -Ref: figure-call-new-function965438 -Node: Extension API Description967500 -Node: Extension API Functions Introduction969142 -Node: General Data Types974682 -Ref: General Data Types-Footnote-1983043 -Node: Memory Allocation Functions983342 -Ref: Memory Allocation Functions-Footnote-1987552 -Node: Constructor Functions987651 -Node: Registration Functions991237 -Node: Extension Functions991922 -Node: Exit Callback Functions997137 -Node: Extension Version String998387 -Node: Input Parsers999050 -Node: Output Wrappers1011771 -Node: Two-way processors1016283 -Node: Printing Messages1018548 -Ref: Printing Messages-Footnote-11019719 -Node: Updating ERRNO1019872 -Node: Requesting Values1020611 -Ref: table-value-types-returned1021348 -Node: Accessing Parameters1022284 -Node: Symbol Table Access1023519 -Node: Symbol table by name1024031 -Node: Symbol table by cookie1025820 -Ref: Symbol table by cookie-Footnote-11030005 -Node: Cached values1030069 -Ref: Cached values-Footnote-11033605 -Node: Array Manipulation1033758 -Ref: Array Manipulation-Footnote-11034849 -Node: Array Data Types1034886 -Ref: Array Data Types-Footnote-11037544 -Node: Array Functions1037636 -Node: Flattening Arrays1042134 -Node: Creating Arrays1049110 -Node: Redirection API1053877 -Node: Extension API Variables1056710 -Node: Extension Versioning1057421 -Ref: gawk-api-version1057850 -Node: Extension GMP/MPFR Versioning1059581 -Node: Extension API Informational Variables1061209 -Node: Extension API Boilerplate1062282 -Node: Changes from API V11066256 -Node: Finding Extensions1067828 -Node: Extension Example1068387 -Node: Internal File Description1069185 -Node: Internal File Ops1073265 -Ref: Internal File Ops-Footnote-11084615 -Node: Using Internal File Ops1084755 -Ref: Using Internal File Ops-Footnote-11087138 -Node: Extension Samples1087412 -Node: Extension Sample File Functions1088941 -Node: Extension Sample Fnmatch1096590 -Node: Extension Sample Fork1098077 -Node: Extension Sample Inplace1099295 -Node: Extension Sample Ord1102512 -Node: Extension Sample Readdir1103348 -Ref: table-readdir-file-types1104237 -Node: Extension Sample Revout1105042 -Node: Extension Sample Rev2way1105631 -Node: Extension Sample Read write array1106371 -Node: Extension Sample Readfile1108313 -Node: Extension Sample Time1109408 -Node: Extension Sample API Tests1110756 -Node: gawkextlib1111248 -Node: Extension summary1114166 -Node: Extension Exercises1117868 -Node: Language History1119366 -Node: V7/SVR3.11121022 -Node: SVR41123174 -Node: POSIX1124608 -Node: BTL1125988 -Node: POSIX/GNU1126717 -Node: Feature History1132495 -Node: Common Extensions1148541 -Node: Ranges and Locales1149824 -Ref: Ranges and Locales-Footnote-11154440 -Ref: Ranges and Locales-Footnote-21154467 -Ref: Ranges and Locales-Footnote-31154702 -Node: Contributors1154923 -Node: History summary1160868 -Node: Installation1162248 -Node: Gawk Distribution1163192 -Node: Getting1163676 -Node: Extracting1164639 -Node: Distribution contents1166277 -Node: Unix Installation1172757 -Node: Quick Installation1173439 -Node: Shell Startup Files1175853 -Node: Additional Configuration Options1176942 -Node: Configuration Philosophy1179107 -Node: Non-Unix Installation1181476 -Node: PC Installation1181936 -Node: PC Binary Installation1182774 -Node: PC Compiling1183209 -Node: PC Using1184326 -Node: Cygwin1187879 -Node: MSYS1188978 -Node: VMS Installation1189479 -Node: VMS Compilation1190270 -Ref: VMS Compilation-Footnote-11191499 -Node: VMS Dynamic Extensions1191557 -Node: VMS Installation Details1193242 -Node: VMS Running1195495 -Node: VMS GNV1199774 -Node: VMS Old Gawk1200509 -Node: Bugs1200980 -Node: Bug address1201643 -Node: Usenet1204625 -Node: Maintainers1205629 -Node: Other Versions1206890 -Node: Installation summary1213804 -Node: Notes1215006 -Node: Compatibility Mode1215800 -Node: Additions1216582 -Node: Accessing The Source1217507 -Node: Adding Code1218944 -Node: New Ports1225163 -Node: Derived Files1229651 -Ref: Derived Files-Footnote-11235297 -Ref: Derived Files-Footnote-21235332 -Ref: Derived Files-Footnote-31235930 -Node: Future Extensions1236044 -Node: Implementation Limitations1236702 -Node: Extension Design1237885 -Node: Old Extension Problems1239029 -Ref: Old Extension Problems-Footnote-11240547 -Node: Extension New Mechanism Goals1240604 -Ref: Extension New Mechanism Goals-Footnote-11243968 -Node: Extension Other Design Decisions1244157 -Node: Extension Future Growth1246270 -Node: Notes summary1247106 -Node: Basic Concepts1248281 -Node: Basic High Level1248962 -Ref: figure-general-flow1249244 -Ref: figure-process-flow1249929 -Ref: Basic High Level-Footnote-11253230 -Node: Basic Data Typing1253415 -Node: Glossary1256743 -Node: Copying1288581 -Node: GNU Free Documentation License1326124 -Node: Index1351244 +Node: Debugging877210 +Node: Debugging Concepts877651 +Node: Debugging Terms879460 +Node: Awk Debugging882035 +Ref: Awk Debugging-Footnote-1882980 +Node: Sample Debugging Session883112 +Node: Debugger Invocation883646 +Node: Finding The Bug885032 +Node: List of Debugger Commands891506 +Node: Breakpoint Control892839 +Node: Debugger Execution Control896533 +Node: Viewing And Changing Data899895 +Node: Execution Stack903269 +Node: Debugger Info904906 +Node: Miscellaneous Debugger Commands908977 +Node: Readline Support914039 +Node: Limitations914935 +Node: Debugging Summary917044 +Node: Arbitrary Precision Arithmetic918323 +Node: Computer Arithmetic919808 +Ref: table-numeric-ranges923574 +Ref: table-floating-point-ranges924067 +Ref: Computer Arithmetic-Footnote-1924725 +Node: Math Definitions924782 +Ref: table-ieee-formats928098 +Ref: Math Definitions-Footnote-1928701 +Node: MPFR features928806 +Node: FP Math Caution930524 +Ref: FP Math Caution-Footnote-1931596 +Node: Inexactness of computations931965 +Node: Inexact representation932925 +Node: Comparing FP Values934285 +Node: Errors accumulate935526 +Node: Getting Accuracy936959 +Node: Try To Round939669 +Node: Setting precision940568 +Ref: table-predefined-precision-strings941265 +Node: Setting the rounding mode943095 +Ref: table-gawk-rounding-modes943469 +Ref: Setting the rounding mode-Footnote-1947400 +Node: Arbitrary Precision Integers947579 +Ref: Arbitrary Precision Integers-Footnote-1950754 +Node: Checking for MPFR950903 +Node: POSIX Floating Point Problems952377 +Ref: POSIX Floating Point Problems-Footnote-1956662 +Node: Floating point summary956700 +Node: Dynamic Extensions958890 +Node: Extension Intro960443 +Node: Plugin License961709 +Node: Extension Mechanism Outline962506 +Ref: figure-load-extension962945 +Ref: figure-register-new-function964510 +Ref: figure-call-new-function965602 +Node: Extension API Description967664 +Node: Extension API Functions Introduction969306 +Node: General Data Types974846 +Ref: General Data Types-Footnote-1983207 +Node: Memory Allocation Functions983506 +Ref: Memory Allocation Functions-Footnote-1987716 +Node: Constructor Functions987815 +Node: Registration Functions991401 +Node: Extension Functions992086 +Node: Exit Callback Functions997301 +Node: Extension Version String998551 +Node: Input Parsers999214 +Node: Output Wrappers1011935 +Node: Two-way processors1016447 +Node: Printing Messages1018712 +Ref: Printing Messages-Footnote-11019883 +Node: Updating ERRNO1020036 +Node: Requesting Values1020775 +Ref: table-value-types-returned1021512 +Node: Accessing Parameters1022448 +Node: Symbol Table Access1023683 +Node: Symbol table by name1024195 +Node: Symbol table by cookie1025984 +Ref: Symbol table by cookie-Footnote-11030169 +Node: Cached values1030233 +Ref: Cached values-Footnote-11033769 +Node: Array Manipulation1033922 +Ref: Array Manipulation-Footnote-11035013 +Node: Array Data Types1035050 +Ref: Array Data Types-Footnote-11037708 +Node: Array Functions1037800 +Node: Flattening Arrays1042298 +Node: Creating Arrays1049274 +Node: Redirection API1054041 +Node: Extension API Variables1056874 +Node: Extension Versioning1057585 +Ref: gawk-api-version1058014 +Node: Extension GMP/MPFR Versioning1059745 +Node: Extension API Informational Variables1061373 +Node: Extension API Boilerplate1062446 +Node: Changes from API V11066420 +Node: Finding Extensions1067992 +Node: Extension Example1068551 +Node: Internal File Description1069349 +Node: Internal File Ops1073429 +Ref: Internal File Ops-Footnote-11084779 +Node: Using Internal File Ops1084919 +Ref: Using Internal File Ops-Footnote-11087302 +Node: Extension Samples1087576 +Node: Extension Sample File Functions1089105 +Node: Extension Sample Fnmatch1096754 +Node: Extension Sample Fork1098241 +Node: Extension Sample Inplace1099459 +Node: Extension Sample Ord1102676 +Node: Extension Sample Readdir1103512 +Ref: table-readdir-file-types1104401 +Node: Extension Sample Revout1105206 +Node: Extension Sample Rev2way1105795 +Node: Extension Sample Read write array1106535 +Node: Extension Sample Readfile1108477 +Node: Extension Sample Time1109572 +Node: Extension Sample API Tests1110920 +Node: gawkextlib1111412 +Node: Extension summary1114330 +Node: Extension Exercises1118032 +Node: Language History1119530 +Node: V7/SVR3.11121186 +Node: SVR41123338 +Node: POSIX1124772 +Node: BTL1126152 +Node: POSIX/GNU1126881 +Node: Feature History1132659 +Node: Common Extensions1148705 +Node: Ranges and Locales1149988 +Ref: Ranges and Locales-Footnote-11154604 +Ref: Ranges and Locales-Footnote-21154631 +Ref: Ranges and Locales-Footnote-31154866 +Node: Contributors1155087 +Node: History summary1161032 +Node: Installation1162412 +Node: Gawk Distribution1163356 +Node: Getting1163840 +Node: Extracting1164803 +Node: Distribution contents1166441 +Node: Unix Installation1172921 +Node: Quick Installation1173603 +Node: Shell Startup Files1176017 +Node: Additional Configuration Options1177106 +Node: Configuration Philosophy1179271 +Node: Non-Unix Installation1181640 +Node: PC Installation1182100 +Node: PC Binary Installation1182938 +Node: PC Compiling1183373 +Node: PC Using1184490 +Node: Cygwin1188043 +Node: MSYS1189142 +Node: VMS Installation1189643 +Node: VMS Compilation1190434 +Ref: VMS Compilation-Footnote-11191663 +Node: VMS Dynamic Extensions1191721 +Node: VMS Installation Details1193406 +Node: VMS Running1195659 +Node: VMS GNV1199938 +Node: VMS Old Gawk1200673 +Node: Bugs1201144 +Node: Bug address1201807 +Node: Usenet1204789 +Node: Maintainers1205793 +Node: Other Versions1207054 +Node: Installation summary1213968 +Node: Notes1215170 +Node: Compatibility Mode1215964 +Node: Additions1216746 +Node: Accessing The Source1217671 +Node: Adding Code1219108 +Node: New Ports1225327 +Node: Derived Files1229815 +Ref: Derived Files-Footnote-11235461 +Ref: Derived Files-Footnote-21235496 +Ref: Derived Files-Footnote-31236094 +Node: Future Extensions1236208 +Node: Implementation Limitations1236866 +Node: Extension Design1238049 +Node: Old Extension Problems1239193 +Ref: Old Extension Problems-Footnote-11240711 +Node: Extension New Mechanism Goals1240768 +Ref: Extension New Mechanism Goals-Footnote-11244132 +Node: Extension Other Design Decisions1244321 +Node: Extension Future Growth1246434 +Node: Notes summary1247270 +Node: Basic Concepts1248445 +Node: Basic High Level1249126 +Ref: figure-general-flow1249408 +Ref: figure-process-flow1250093 +Ref: Basic High Level-Footnote-11253394 +Node: Basic Data Typing1253579 +Node: Glossary1256907 +Node: Copying1288745 +Node: GNU Free Documentation License1326288 +Node: Index1351408 End Tag Table |