Last active
August 9, 2024 16:56
-
-
Save LiquidFenrir/d110f3e7755ffbe82672eda49ae21af2 to your computer and use it in GitHub Desktop.
gdb 101 for 3ds, credits to Stary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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