The easiest way to verify your GDT is to use it. If it works, you must have done something right.
You can use "info gdt" in the Bochs debugger to decode the contents of the current GDT. It doesn't quite display everything, but it's good for a quick sanity check.
You can use "sreg" in the Bochs debugger or "info registers" in the QEMU monitor to decode the contents of the segment registers. Of course, you have to load descriptors from your GDT into the segment registers before you can see them this way.
Other virtual machines probably have similar tools, but I'm not familiar with any of them.
|