Fabrice Bellard wrote: > The breakpoints are set for a given virtual address. So IMHO testing > only the EIP value instead of EIP + CS.base is not logical...
That I just check for EIP is a convenience for me. The code is linked to 0x00100000 but moves itself to the virtual address 0xC0100000 (CS starts at 0xC0000000 so code offsets still fit!). All debugging symbols however still point to 0x00100000. Only looking at EIP regardless of CS makes the symbols fit for me again. Leaving that aside, if I do set the breakpoint correctly at virtual address (e.g.) 0xC0123456 qemu will (correctly I guess) cause an exception for code offset 0x123456 (as CS base is 0xC0000000). GDB however then doesn't recognize its own breakpoint as it only remembers having set one at 0xC0123456, and apparently doesn't translate the given exception address of CS:0x123456 back to a virtual one. So all in all GDB just doesn't seem to cope very well with segmented memory. At least that's my theory. If I didn't already have a huge headache today thinking about the mix of physical, virtual, linear and segment:offset addresses would surely give me one. Cheers, Marcel _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel