This is an old revision of the document!
====== Stefan Hajnoczi: GDB Remote Debugging ====== ===== Journal ===== ==== Week 1 ==== **Milestone:** Set up IDT and write an interrupt handler. === Fri May 23 === Some notes after chatting with mdc and mcb30: * Place IDT code in ''arch/i386/transitions/librm.S'' - in similar places to ''lgdt'' and ''sgdt''. * GDB stub should be written with portability in mind, separate out arch-specific parts. * GDB stub should be a build option. * Source-level debugging and symbols should work (mostly) out-of-the-box due to ELF build. === Sat May 24 === Implemented an interrupt handler in ''arch/i386/transitions/librm.S''. It currently sets ''eax'' to ''0xcafebabe'' and spins in an infinite loop. Have tested that it is working using QEMU. Still need to: * Check with mcb30 whether the IDT setup code is sane. * Distinguish between incoming interrupt numbers. * Store/restore CPU state. * Return cleanly from interrupt handler. * Reduce the number of IDT entries to the minimum (16 should be fine).