Hi,
is there a way to enable the debug on Linux?
I'm currently using Visual Studio Code with marsdev, but, I was not able to set up the debug. Is that possible?
I'm using debug messages with KMod, but it start to be complicated just with messages.
Is there any way have GDB or whatever debug system working on linux?
Many thanks to everyone!
Is possible to have a debug on linux?
Moderator: Stef
-
screwbreaker
- Newbie
- Posts: 1
- Joined: Mon Dec 26, 2022 10:36 am
- Contact:
-
Mask of Destiny
- Very interested
- Posts: 630
- Joined: Thu Nov 30, 2006 6:30 am
Re: Is possible to have a debug on linux?
BlastEm supports the gdb remote debug protocol for the main 68K on Linux (and elsewhere). There isn't currently any support for debugging the SH2s if you're doing 32X though. To use this, you need to ensure your toolchain preserves the ELF binary in addition to the final ROM. Load the ELF in a 68K capable gdb (not sure offhand if marsdev comes with one, but I think there might be one in the Ubuntu repos if not). Then use the following command
replace path/to/blastem with the actual path to blastem and path/to/rom.bin with the actual path to your ROM file
BlastEm will then load the ROM and then enter the debugger at the first instruction, giving you an opportunity to set any desired breakpoints before continuing.
I believe there's a way to set up VSCode to use this so you can have a GUI, but I'm not familiar with it. For BlastEm, I recommend you use the most recent nightly, which can be found here, as the most recent stable build is quite old
Code: Select all
target remote | path/to/blastem path/to/rom.bin -dBlastEm will then load the ROM and then enter the debugger at the first instruction, giving you an opportunity to set any desired breakpoints before continuing.
I believe there's a way to set up VSCode to use this so you can have a GUI, but I'm not familiar with it. For BlastEm, I recommend you use the most recent nightly, which can be found here, as the most recent stable build is quite old