简体   繁体   中英

How To Debug With GDB

I'm newbie to emulator. Nowadays I try to view src code of mgba(GBA Emulator).

https://github.com/mgba-emu/mgba

I built and found option -g .

-g option means Start GDB session (default port 2345) from help.

Is it able to be debugged with GDB?

How can I debug with GDB?

Please tell me how to or other methods to trace source code?

(Sorry for my poor English.)

The -g option means you can remotely debug your rom with a remote debugger of gdb like gdb , ghidra or radare2 . You will need another tool as mentioned before.

Sadly you can not debug remotely a classic gameboy rom. It only works for gameboy advance roms.

If you just want to debug the rom with no remote debugging access you can still use gdb from mgba with no remote debugging using the command

mgba -d your_rom.gb

a terminal should start. Then use gdb commands such as c to continue.

If you do not like gdb, you can get a look at BGB if you prefer a more graphic debugger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM