def __init__(self, base, config, *args, **kwargs): self.as_assert(base == None) self.as_assert(config.LOCATION=='windbg') self.as_assert(pykd.isKernelDebugging()) self.dtb = pykd.reg('cr3') self.nt = pykd.module('nt') config.KDBG = self.nt.KdCopyDataBlock self.pageSize = pykd.pageSize() self.lowPage = pykd.ptrMWord(self.nt.MmLowestPhysicalPage) self.highPage = pykd.ptrMWord(self.nt.MmHighestPhysicalPage) self.spaces = [ ( self.lowPage*self.pageSize, (self.highPage -self.lowPage )*self.pageSize) ] super(PykdAddressSpace,self).__init__(base,config) self.name = "WinDBG Address Space"
def __init__(self, base, config, *args, **kwargs): self.as_assert(base == None) self.as_assert(config.LOCATION == 'windbg') self.as_assert(pykd.isKernelDebugging()) self.dtb = pykd.reg('cr3') self.nt = pykd.module('nt') config.KDBG = self.nt.KdCopyDataBlock self.pageSize = pykd.pageSize() self.lowPage = pykd.ptrMWord(self.nt.MmLowestPhysicalPage) self.highPage = pykd.ptrMWord(self.nt.MmHighestPhysicalPage) self.spaces = [(self.lowPage * self.pageSize, (self.highPage - self.lowPage) * self.pageSize)] super(PykdAddressSpace, self).__init__(base, config) self.name = "WinDBG Address Space"
def get_page_size(): return pykd.pageSize()
def get_page_size(): global cache_page_size if not cache_page_size: cache_page_size = pykd.pageSize() return cache_page_size