1. Introduction

    System Information

  2. Inter-Process Communication
  3. Signals

    Programming in Various Environments

  4. Script Programming
    1. Script Variables
    2. Test Conditions
    3. Control and Iteration
    4. Commonly used Programs
    5. Shell Capabilities
    6. Example looping script
    7. Example using Variables
    8. Example working with files
    9. Example install script
  5. C and C++ Programming
    1. POSIX System Capabilities
    2. More POSIX
    3. Threads
    4. Mutexes
    5. An example viewmod program
    6. An example serial program
  6. X Programming
  7. Debugging
  8. Credits

Debugging Linux Programs

gdb debugger commands

See the gdb(1) man page for more information on the gdb program. Below are listed some commands:

  • file - Loads the exe file.
  • kill - Terminates the program being debugged.
  • list - List sections of the source code.
  • next - Advances one line of source code in the current function and steps into other functions.
  • run - Executes the program that is being debugged.
  • quit - Ends gdb.
  • watch - Enables you to tell the value of a variable when it changes.
  • break - Set a break point.
  • make - Remake the exe program without quitting gdb.
  • shell - Run a UNIX shell command without leaving gdb.