fix various bugs in pddbg

note that there is still pddbg_v1 for the older version of the pddb
This commit is contained in:
bunnie 2022-04-20 03:47:17 +08:00
parent 758ed1ba31
commit 4f9f1116fc

View file

@ -672,7 +672,7 @@ def decode_pagetable(img, entries, keys, mbbb):
for pte in encrypted_ptes:
maybe_pte = Pte(cipher.decrypt(pte))
if maybe_pte.is_valid():
logging.debug(maybe_pte.as_str(page_num))
logging.debug(maybe_pte.as_str(page_num // Pte.PTE_LEN))
p_addr = page_num * (4096 // Pte.PTE_LEN)
if maybe_pte.addr() in v2p_table:
logging.warning("duplicate V2P PTE entry, evicting {:x}:{:x}", maybe_pte.addr(), p_addr)