Quote:
Limit for the IDT. That's why the question. I want to extract that information from the IDTR and then do a memory dump using the 32-bit linear address.
Let's see if I can make this happen.
|
again assuming that you're under a win32 OS, you will face some problems:
1. win9x
every Virtual Machine has its own IDT, what's more, each one of them has two (one is used when the VM executes V86 mode code, this IDT is actually common for all VMs, and one for protected mode execution, it is created dynamically each time a VM switches to protected mode). if you write a win32 application to do all this IDT dumping, your SIDT will give you the protected mode IDT of the System VM which again is just one of the IDTs used in win9x. other than this, you can simply use the linear address as it is without the need for any further selector

ffset transformation magic, win32 apps execute in a 'flat' environment, ie. all segments are 0 based and 4 GB limited (well, almost, for practical purposes it's true ;-)).
2. winnt
here you have a different issue, actually 2. first, you face a problem on SMP machines as each one of them has its own IDT, second the IDT is not accessible from user mode code (well, not entirely true ;-)) as it is in the system arena and the paging logic will prevent any access to it. so your only option would be to write a kernel mode driver that would then enumerate all the IDTs and dump them. i'm not sure how far you want to go to achieve this, so i'll stop here and let me know what you need.