How to install GDB



How to install GDB

  • Before you go for installation, check if you already have gdb installed on your Unix system by using the following command :
    • $gdb -help
  • If GDB is installed, then it will display all the available options within your GDB. If GDB is not installed, then proceed for a fresh installation.
  • You can install GDB on your system by following the simple steps discussed below.
 GDB Installation

GDB Installation

Step 1 : Make sure you have the prerequisites for installing GDB

  • An ANSI-compliant C compiler (gcc is recommended - Note that gdb can debug codes generated by other compilers)
  • 115 MB of free disk space is required on the partition on which you're going to build gdb.
  • 20 MB of free disk space is required on the partition on which you're going to install gdb.

Read Also

Step 2

  • Use the following command to install gdb on Linux machine.
    • $ sudo apt-get install libc6-dbg gdb valgrind

Step 3

  • Now you can use the following command to find the help information.
    • $gdb -help
  • Now you have gdb installed on your system and it is ready to use.


Related Searches to How to install GDB