qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: gdbstub: packet reply is too long


From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: gdbstub: packet reply is too long
Date: Sat, 3 Jan 2009 01:53:07 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Jan Kiszka wrote:
> You need CR0.PE to detect if you are in real or protected mode. And then
> you need GDTR/LDTR to find the descriptor CS is pointing at, parsing it
> to detect if you are running 16, 32 or 64 bit code (by default). Those
> extensions would also be useful in order to decode memory addresses in
> case descriptor.base != 0 (or if it's CS >> 4, ie. you are in real
> mode).

If you're going to decode segment descriptors (great idea, btw, and
helpful for threaded code), it might be better to supply the CPU's
internal segment state, if that's possible, instead of looking at the
LDT/GDT in memory, since the CPU's state can differ from the memory
version when the latter is written to.

-- Jamie




reply via email to

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