mr.cat wrote on 2021-03-13, 10:37:
That's an interesting approach actually! There are many frontend contenders out there but most cater for gdb.
I seem to remember finding quite a few frontends for Bochs's debugger too. I was planning to call mine BDG9000, subtitle "hopefully the 9001st Bochs Debugger GUI is the final one!" 😀
I'd like to think that one could make a frontend that could talk to various emulators (high up my list would be adding Qemu support) since really the basic operations like dumping memory and controlling execution are similar between all debuggers, they're just slightly different syntax and output formats. Of course I haven't even done much of the Bochs side 😀
An important part of course is letting the user run commands directly so that the GUI can have incomplete coverage of the debugger's features but still be usable.
kjliew wrote on 2021-03-13, 12:41:
The frontend typically only deals with linear addressing for any debug operations such as breakpoints, memory and instruction disassembly.
Do you mean gdb's own console-based frontend, or the various frontend GUIs you can get for it?
I seem to recall gdb has a thing called the "Machine Interface" or something which Emacs uses to talk to it, so that frontends don't need to deal with parsing human-readable output, which is nice. I suppose there is a chance the MI doesn't do everything the console-based interface does too, possibly the corner cases like handling real mode could have bugs in the MI which nobody has found because nobody uses it?
It isn't that great for reversing/hacking when one focus is on the disassembly and finding suspicious patterns in the memory, but can be made for such use cases when both the stub and frontend support additional capabilities to supplement the needs for reversing/hacking.
Thanks, it's good to hear from someone with more experience in this than me! I seem to remember gdb stubs can implement custom commands, I assume that's what you're talking about here? Do you know off the top of your head if any of the emulators we're talking about provide useful ones?