@Monax, @jlxip: thanks!
jlxip wrote:
Quite an epic debugger you got there mate. Is it worth coding? Is it better than plain old Bochs?
Well, I needed a debugger that I can run on real hardware using only minicom on the other side. I was thinking about implementing gdb-server, but that protocol is just too dumb for what I need. So for me it wasn't a question of worth it, but it was a necessity, a must have.
Otherwise writing a debugger is not a big deal.
Here's a minimal one, only ca. 300 SLoC. It is for AArch64, but the code would be pretty much the same for x86 (except for the disassembler). This one is MIT licensed.
The code for the debugger you see on the screenshot is
here. It's more complex, the common part being more than 1000 SLoC. The architecture specific parts are in their corresponding directories (supports x86_64 and AArch64). This is not a free software, licensed under CC-by-nc-sa.
As for the disassembler, it's available as a separate project,
udisasm (for AArch64, I haven't migrated the x86 disassembler to this new format yet, but I'm going to. Any help would be appreciated
). The udisasm is licensed interestingly, the instruction tables and the generator script is licensed under GPL (so it's free, but copyleft), while the generated C headers are MIT licensed (so you can include the generated disassembler code in any project, even in proprietary ones).
Cheers,
bzt