Hacker News new | ask | show | jobs
by aliguori 5316 days ago
That's a GDB bug actually. GDB doesn't handle remote targets that change CPU modes. If your guest is in 16 bit mode, you need to do 'set arch i8086'. For 32-bit mode, 'set arch i386', and for 64-bit mode, 'set arch i386:x86-64'.
1 comments

Thanks for the tip, I will try it out when I get some time my OS development project again.

It may be a bug in GDB, but reverting a change in QEMU made it work for me.