Skip to content

Commit

Permalink
Fix memory disassembly always 64-bits bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackINT3 committed Oct 27, 2020
1 parent ed65673 commit 4fc29ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/OpenArk/kernel/memory/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ void KernelMemoryRW::ViewMemory(ULONG pid, ULONG64 addr, ULONG size)
auto hexdump2 = HexDumpMemory(addr+size, nullptr, size-memsize);
hexdump.append(hexdump2);
}
auto disasm = DisasmMemory(addr, mem, minsize);
bool isx64 = true;
if (ArkDrvApi::Memory::IsKernelAddress(addr)) {
isx64 = UNONE::OsIs64();
} else {
EN_VID_PROCESS();
isx64 = UNONE::PsIsX64(pid);
}
auto disasm = DisasmMemory(addr, mem, minsize, isx64 ? 64 : 32);

DEFINE_WIDGET(QTextEdit*, hexEdit);
DEFINE_WIDGET(QTextEdit*, disasmEdit);
Expand Down

0 comments on commit 4fc29ff

Please sign in to comment.