I'm writing a kernel which is compiled as a PIE. After boot the kernel maps itself into 64-bit high mem, specifically the NULL page moves to 0x1FFFF << 0x2F, and then jumps there however in doing so GDB loses track of the code that accompanies the assembly. I lose the ability to set breakpoints(doing so triggers my breakpoint ISR instead of GDB) and am forced to step one instruction at a time through my C with nothing but assembly showing in GDB. Is there some way I can change the base address of my kernel executable in GDB at runtime. I'm connecting to QEMU's GDB server for debugging.
0
votes