Skip to content

Instantly share code, notes, and snippets.

@LiquidFenrir
Last active February 21, 2023 22:06
  • Star 22 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save LiquidFenrir/d110f3e7755ffbe82672eda49ae21af2 to your computer and use it in GitHub Desktop.
gdb 101 for 3ds, credits to Stary
1. enable debugger in rosalina menu
go to process list
select a process
2. launch arm-none-eabi-gdb <path to elf>
command "target remote ip:port"
3. command "continue" or "c" to resume execution
4.
"b <func | file:line | *address>" to set a breakpoint
"del <breakpoint number>" to remove a breakpoint
"p <expression>" to print something
"x <expression>" to view memory there
like if you have a pointer or something
"c", "continue"
"s", "step"
"bt" for backtrace with errors
@pvpb0t
Copy link

pvpb0t commented Apr 9, 2022

since oreo639 helped me, i will just summerize for noobs like me:
start msys2
do cd to the folder of your .elf of the homebrew application (on pc)
write $DEVKITARM/bin/arm-none-eabi-gdb and then your-apps-name.elf
now go into homebrew menu or where you launch it from
open rosalina menu by L+down+select
go to debugger options->Enable Debugger and Force-debug next application on launch
make note of the port, and check the ip in the right top corner
Go out of rosalina menu
Start your app
Go to your pc and in msys2/terminal do target remote ip:port
it should say something like 0x00100000 in _start ()
then write c and hit enter
write backtrace or bt

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