GDB x86_64 stub
Posted: Wed Apr 01, 2015 12:30 pm
I'm working on a kernel for some time now, and I'm making slow but (generally) steady progress. In emulators and virtual machines (bochs, qemu, virtualbox) everything works fine, and when something does not, it is easy to debug. However, when running on native systems, I run into all sorts of problems, which are extremely hard to debug. Therefore I wanted to integrate a gdb stub into my kernel, so that I can debug my physical computers as well.
After searching quite a bit on the internet, I can only find a i368 stub. Unfortunately, all my code (except for a small bootstrap asm) is running in long mode. Searching for a x86_64 version did not result to anything helpfull (The only thing I could find was the qemu-gdb stub, which has quite a messy unclear source code). Of course I can dig into the documentation, the protocol and the existing stubs, in order to write my own. This however, is quite a lot of work, and at the moment I just want to use it for some really hard to debug issue I have on my system.
I was wondering if anyone has found such stub, and could point me to it. Any other tips on this are also very welcome!
Thanks
After searching quite a bit on the internet, I can only find a i368 stub. Unfortunately, all my code (except for a small bootstrap asm) is running in long mode. Searching for a x86_64 version did not result to anything helpfull (The only thing I could find was the qemu-gdb stub, which has quite a messy unclear source code). Of course I can dig into the documentation, the protocol and the existing stubs, in order to write my own. This however, is quite a lot of work, and at the moment I just want to use it for some really hard to debug issue I have on my system.
I was wondering if anyone has found such stub, and could point me to it. Any other tips on this are also very welcome!
Thanks