Daniel Jacobowitz wrote: >> 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. > Which segment is it running from at this point? Qemu may be reporting > the wrong address.
After paging is switched on, all code always runs in the CS that is based at 0xC0000000. As I see it qemu reports the address just fine. As I wrote in my original mail it only works if I set two breakpoints, one at 0x123456 and one at 0xC0123456. Makes sense then, the 0xC0123456 triggers the breakpoint exception within qemu and the 0x123456 is used by GDB to recognize the offset it gets from qemu. It's a mess, really, and probably not qemu's fault. >> So all in all GDB just doesn't seem to cope very well with segmented >> memory. > Correct. It doesn't know anything at all about i386 segmentation. Well, that explains it then, I guess. In that case I don't really see a clean solution for it. Marcel _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel