Rename analyzer

This commit is contained in:
momo5502
2024-09-24 20:23:42 +02:00
parent 136ff118d4
commit d57dae589a
10 changed files with 24 additions and 24 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include "reflect_type_info.hpp"
template <typename T>
emulator_hook* watch_object(windows_emulator& emu, emulator_object<T> object)
{
const reflect_type_info<T> info{};
return emu.emu().hook_memory_read(object.value(), object.size(),
[i = std::move(info), object, &emu](const uint64_t address, size_t, uint64_t)
{
const auto rip = emu.emu().read_instruction_pointer();
const auto offset = address - object.value();
emu.logger.log("Object access: %s - 0x%llX (%s) at 0x%llX (%s)\n", i.get_type_name().c_str(),
offset,
i.get_member_name(offset).c_str(), rip,
emu.process().module_manager.find_name(rip));
});
}