gdb - Debugging with gdbserver and qemu, how to set watchpoint on a control register, cr3 -


i'm debugging kernel , want know when cr3 register changed. know how set watchpoint on general purpose register eax , others.

the problem is, since gdb not have access control registers, setting watchpoint on cr3 not work.

so, possible set watchpoint qemu monitor? if yes, how?

sorry, there's no way qemu monitor. (if @ target-i386/helper.c:cpu_x86_update_cr3() in qemu sources you'll see doesn't notify cr3 updates, puts new value internal cpu state structure.)

the best can sort of thing run 2 debuggers (one connected qemu's gdbstub talk guest, , 1 directly debugging qemu itself). can put breakpoint on cpu_x86_update_cr3() in qemu , see what's going on then. need know fair amount qemu's internals able effectively, though...


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -