This is a mini-tutorial of sorts for getting started with gdb on the Switch, with the target audience being people who want to mod and/or reverse games. The goal will be to walk you through some of the basic workflows needed to use a debugger on the Switch, while being brief enough for skimming for when you forget things.
First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of
aarch64-none-elf-gdb or gdb-multiarch. I personally use gdb-multiarch, however users of devkitpro or Windows
users may find it easier to aquire an aarch64-specific GDB.
`aarch64-none-else-gdb` Install (Click to expand)
Install devkitpro if you haven't already.
- Install aarch64 gdb:
dkp-pacman -Syu devkitA64-gdb
- Ensure devkitA64 is added to path. The path should look something like this:
- Linux -
/opt/devkitpro/devkitA64/bin - Windows -
C:/devkitpro/devkitA64/bin
`gdb-multiarch` Install (Click to expand)
sudo apt-get install -y gdb-multiarch
TODO