Mail Archives: djgpp/1999/03/06/20:24:29
I have an application where I need to set up an exception handler for
page faults and have access to the value of cr2 (linear address to which
access faulted). But:
* mov cr2 is a privileged instruction.
* There is a DPMI 1.0 exception handling function that passes it, but it
will be tricky to make it interoperate with DJGPP's exception handlers,
and anyway CWSDPMI doesn't support it.
I could, I suppose, use CWSDPR0 and read cr2 directly, but that's
difficult, since virtual memory will probably be required. (It's a
malloc debugger whose memory usage is extremely inefficient, and I want
it to run on small boxes if possible.)
So: Does anyone know of another way to find the value of cr2? I don't
care about it working in anything but CWSDPMI.
TIA
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -