Verifying the GDT
Page 1 of 1

Author:  FunnyGuy9796 [ Mon Mar 04, 2024 5:25 pm ]
Post subject:  Verifying the GDT

I apologize in advance if this is a basic or stupid question. However, I was curious if there was a way to verify that the GDT is set up properly. I assume it would have something to do with the GDTR register but I wasn't sure.


Author:  Octocontrabass [ Mon Mar 04, 2024 6:56 pm ]
Post subject:  Re: Verifying the GDT

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group