Simplify violation hook API

This commit is contained in:
momo5502
2025-04-05 10:01:28 +02:00
parent 0fbb7a2e0d
commit a336bdf2af
3 changed files with 4 additions and 15 deletions

View File

@@ -53,8 +53,7 @@ class hook_interface
public:
virtual ~hook_interface() = default;
virtual emulator_hook* hook_memory_violation(uint64_t address, size_t size,
memory_violation_hook_callback callback) = 0;
virtual emulator_hook* hook_memory_violation(memory_violation_hook_callback callback) = 0;
virtual emulator_hook* hook_memory_access(uint64_t address, size_t size, memory_operation filter,
complex_memory_hook_callback callback) = 0;
@@ -67,11 +66,6 @@ class hook_interface
virtual void delete_hook(emulator_hook* hook) = 0;
emulator_hook* hook_memory_violation(memory_violation_hook_callback callback)
{
return this->hook_memory_violation(0, std::numeric_limits<size_t>::max(), std::move(callback));
}
emulator_hook* hook_memory_read(const uint64_t address, const size_t size, simple_memory_hook_callback callback)
{
return this->hook_simple_memory_access(address, size, std::move(callback), memory_operation::read);