mGBA Forums
How to compile the emulator with debugger enabled? - Printable Version

+- mGBA Forums (https://forums.mgba.io)
+-- Forum: mGBA (https://forums.mgba.io/forumdisplay.php?fid=1)
+--- Forum: Development (https://forums.mgba.io/forumdisplay.php?fid=11)
+--- Thread: How to compile the emulator with debugger enabled? (/showthread.php?tid=3276)



How to compile the emulator with debugger enabled? - wavedevice - 07-21-2017

Hello. I am trying to compile mgba on linux 32 bit using the following steps:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIXTongueATH=/usr ..
make
sudo make install

But the debugger is not enabled on the final ./mgba binary. When I press F11 in the emulator, nothing happens. How can I force the compilation of the debugger? Is this debugger specific for gba, or does it work on gbc roms?


RE: How to compile the emulator with debugger enabled? - endrift - 07-21-2017

Make sure libedit/editline and associated development headers are installed.


RE: How to compile the emulator with debugger enabled? - wavedevice - 07-21-2017

Ok. I cleaned the files, installed libedit and editline and compiled again, but still it's not possible to start the debugger. There are some way to force the use of the debugger on the source code?


RE: How to compile the emulator with debugger enabled? - endrift - 07-21-2017

Did you pass -d to mgba when starting it?


RE: How to compile the emulator with debugger enabled? - wavedevice - 07-21-2017

(07-21-2017, 09:17 PM)endrift Wrote: Did you pass -d to mgba when starting it?

Oh! Now it works, with the -d option Big Grin
Thank you very much \o/


One more thing -> do you know how I can enable/compile/use the python extensions of mgba?


RE: How to compile the emulator with debugger enabled? - endrift - 07-22-2017

you need to pass -DBUILD_PYTHON=ON to cmake (and make sure you have the python dev headers installed), and then rebuild. If all goes well, you'll have a directory called python in your build dir, which you can enter and do python setup.py install or develop. I don't recommend the former if you're not using a virtualenv. The interfaces kind of rough at the moment and you can't use it from the UI (although in master you can use it from the debugger with the source command). The API isn't documented yet since it's fairly in flux.