gdb
The GNU Debugger. More information: <https://www.gnu.org/software/gdb>.
Install
- All systems
-
curl cmd.cat/gdb.sh
- Debian
-
apt-get install gdb
- Ubuntu
-
apt-get install gdb
- Alpine
-
apk add gdb
- Arch Linux
-
pacman -S gdb
- Kali Linux
-
apt-get install gdb
- CentOS
-
yum install gdb
- Fedora
-
dnf install gdb
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install gdb
- OS X
-
brew install gdb
- Raspbian
-
apt-get install gdb
- Dockerfile
- dockerfile.run/gdb
- Docker
-
docker run cmd.cat/gdb gdb
powered by Commando
The GNU Debugger. More information: <https://www.gnu.org/software/gdb>.
-
Debug an executable:
gdb executable
-
Attach a process to gdb:
gdb -p procID
-
Debug with a core file:
gdb -c core executable
-
Execute given GDB commands upon start:
gdb -ex "commands" executable
-
Start `gdb` and pass arguments to the executable:
gdb --args executable argument1 argument2
© tl;dr; authors and contributors