Skip to content

Instantly share code, notes, and snippets.

@killvxk
Forked from jam1garner/switch-gdb-cheatsheet.md
Created September 25, 2025 22:09
Show Gist options
  • Save killvxk/7ce30714ee0366017482aefba086d6f2 to your computer and use it in GitHub Desktop.
Save killvxk/7ce30714ee0366017482aefba086d6f2 to your computer and use it in GitHub Desktop.
GDB for Switch Modding Cheatsheet/Tutorial

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.

Installing GDB

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)

aarch64-none-else-gdb Install

Install devkitpro if you haven't already.

  1. Install aarch64 gdb:
dkp-pacman -Syu devkitA64-gdb
  1. 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)

gdb-multiarch Install

Ubuntu

sudo apt-get install -y gdb-multiarch

Connecting GDB to a game

TODO


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment