OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 11:36 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Verifying the GDT
PostPosted: Mon Mar 04, 2024 5:25 pm 
Offline
Member
Member

Joined: Tue Sep 13, 2022 9:29 pm
Posts: 61
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.

Thanks


Top
 Profile  
 
 Post subject: Re: Verifying the GDT
PostPosted: Mon Mar 04, 2024 6:56 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5134
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], MichaelPetch and 514 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group