qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: Debugging with paging enabled


From: Marcel Kilgus
Subject: [Qemu-devel] Re: Debugging with paging enabled
Date: Thu, 9 Nov 2006 00:33:05 +0100

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]