Skip to content

Instantly share code, notes, and snippets.

@imax9000
imax9000 / switch-gdb-cheatsheet.md
Created September 22, 2024 09:04 — forked from jam1garner/switch-gdb-cheatsheet.md
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, with no prerequisite knowledge of gdb. 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.

If some part is unclear, your OS doesn't have install instructions, or you feel part of your workflow should be added here, feel free to comment any additions.

(If you only need a quick reference Jump to the Appendix)

Installing GDB

First off you'll need a version of GDB compatible with aarch64. This can be obtained via either a distribution of

@imax9000
imax9000 / escape.go
Last active April 21, 2017 21:37 — forked from excavador/escape.go
func escapeRune(c rune) rune {
if uint(c) < 0x20 {
return '_'
}
switch c {
case ';', '\n', '"', '\\':
return '_'
default:
return c
}