Cover image for GDB Pocket Reference

Book description

Many Linux and Unix developers are familiar with the GNU debugger (GBD), the invaluable open source tool for testing, fixing, and retesting software. And since GDB can be ported to Windows, Microsoft developers and others who use this platform can also take advantage of this amazing free software that allows you to see exactly what's going on inside of a program as it's executing. This new pocket guide gives you a convenient quick reference for using the debugger with several different programming languages, including C, C++, Java, Fortran and Assembly. The GNU debugger is the most useful tool during the testing phase of the software development cycle because it helps you catch bugs in the act. You can see what a program was doing at the moment it crashed, and then readily pinpoint and correct problem code. With the GDB Pocket Reference on hand, the process is quick and painless. The book covers the essentials of using GBD is a testing environment, including how to specify a target for debugging and how to make a program stop on specified conditions. This handy guide also provides details on using the debugger to examine the stack, source files and data to find the cause of program failure-and then explains ways to use GBD to make quick changes to the program for further testing and debugging. The ability to spot a bug in real time with GDB can save you hours of frustration, and having a quick way to refer to GBD's essential functions is key to making the process work. Once you get your hands on the GDB Pocket Reference, you'll never let go!

Table of Contents

  1. GDB Pocket Reference
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. 1. GDB Pocket Reference
      1. Introduction
      2. Conventions Used in This Book
      3. Conceptual Overview
        1. Source Code Locations
      4. Command-Line Syntax
      5. Initialization Files
        1. The .gdbinit File
        2. The .inputrc File
      6. GDB Expressions
        1. The Value History
        2. Convenience Variables and Machine Registers
        3. Special Expressions
      7. The GDB Text User Interface
      8. Group Listing of GDB Commands
        1. Aliases for Other Commands
        2. Breakpoints
        3. Examining Data
        4. Controlling and Examining Files
        5. Running a Program
        6. Examining the Stack
        7. Status Inquiries
        8. Support Facilities
        9. Text User Interface Commands
        10. Frequently Used Commands
      9. Summary of set and show Commands
        1. annotate
        2. architecture
        3. args
        4. auto-solib-add
        5. auto-solib-limit
        6. backtrace
        7. breakpoint
        8. can-use-hw-watchpoints
        9. case-sensitive
        10. coerce-float-to-double
        11. commands
        12. complaints
        13. confirm
        14. convenience
        15. copying
        16. cp-abi
        17. debug-file-directory
        18. demangle-style
        19. directories
        20. disassembly-flavor
        21. editing
        22. environment
        23. exec-done-display
        24. extension-language
        25. follow-fork-mode
        26. gnutarget
        27. height
        28. history
        29. input-radix
        30. language
        31. listsize
        32. logging
        33. max-user-call-depth
        34. opaque-type-resolution
        35. osabi
        36. output-radix
        37. overload-resolution
        38. pagination
        39. paths
        40. print
        41. prompt
        42. radix
        43. scheduler-locking
        44. solib-absolute-prefix
        45. solib-search-path
        46. step-mode
        47. stop-on-solib-events
        48. symbol-reloading
        49. trust-readonly-sections
        50. tui
        51. values
        52. variable
        53. verbose
        54. version
        55. warranty
        56. watchdog
        57. width
        58. write
      10. Summary of the info Command
      11. Alphabetical Summary of GDB Commands
        1. add-symbol-file
        2. advance
        3. apropos
        4. attach
        5. awatch
        6. backtrace
        7. break
        8. call
        9. catch
        10. cd
        11. clear
        12. commands
        13. complete
        14. condition
        15. continue
        16. core-file
        17. define
        18. delete
        19. detach
        20. directory
        21. disable
        22. disassemble
        23. display
        24. document
        25. dont-repeat
        26. down
        27. down-silently
        28. echo
        29. edit
        30. else
        31. enable
        32. end
        33. exec-file
        34. fg
        35. file
        36. finish
        37. focus
        38. forward-search
        39. frame
        40. generate-core-file
        41. handle
        42. hbreak
        43. help
        44. if
        45. ignore
        46. inspect
        47. info
        48. jump
        49. kill
        50. layout
        51. list
        52. macro
        53. make
        54. mem
        55. next
        56. nexti
        57. nosharedlibrary
        58. output
        59. path
        60. print
        61. print-object
        62. printf
        63. ptype
        64. pwd
        65. quit
        66. rbreak
        67. refresh
        68. return
        69. reverse-search
        70. run
        71. rwatch
        72. search
        73. section
        74. select-frame
        75. set
        76. sharedlibrary
        77. shell
        78. show
        79. signal
        80. silent
        81. source
        82. step
        83. stepi
        84. symbol-file
        85. tbreak
        86. tcatch
        87. thbreak
        88. thread
        89. tty
        90. tui
        91. undisplay
        92. unset
        93. until
        94. up
        95. up-silently
        96. update
        97. watch
        98. whatis
        99. where
        100. while
        101. winheight
        102. x
    3. Index
    4. About the Author
    5. SPECIAL OFFER: Upgrade this ebook with O’Reilly