bdpayne/libvmi — pull request #142 by tklengyel (2014-03-16 13:56:28+00:00)
Title: Cleanup Windows internals

This PR started as a cleanup of the ambiguity between KdVersionBlock and KdDebuggerDataBlock within LibVMI. At one point when the KPCR trick still worked I assume LibVMI was using it to get to KdVersionBlock and from there to KdDebuggerDataBlock. That approach has been long gone with the only remnants remaining are the naming of the variables, which don't reflect their actual contents at all.

So in this PR I went through LibVMI and cleaned up all the remnants, except the config setting win_kdvb as to not break existing setup.

While at it I also cleaned up windows_init so that init_kdbg is called directly from windows_init, instead of it being hidden in the symbol lookup function. As part of the init, if the appropriate config values are passed by the user, the kdbg_init heuristics can be bypassed (previously only happened when win_kdvb was set, but it can also be bypassed now if win_ntoskrnl and win_kdbg are both set).

The PR also includes a bunch of small cosmetic fixes here and there.