mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-17 19:13:55 +00:00
Merge remote-tracking branch 'origin/main' into wow64
This commit is contained in:
@@ -211,6 +211,7 @@ mapped_module* module_manager::map_module_core(const pe_detection_result& detect
|
||||
|
||||
const auto image_base = mod.image_base;
|
||||
const auto entry = this->modules_.try_emplace(image_base, std::move(mod));
|
||||
this->last_module_cache_ = this->modules_.end();
|
||||
|
||||
// TODO: Patch shell32.dll entry point to prevent TLS storage issues
|
||||
// The shell32.dll module in SysWOW64 has TLS storage that fails, causing crashes
|
||||
@@ -409,6 +410,7 @@ void module_manager::install_wow64_heaven_gate(const logger& logger)
|
||||
module.sections.emplace_back(std::move(section));
|
||||
|
||||
this->modules_.emplace(module.image_base, std::move(module));
|
||||
this->last_module_cache_ = this->modules_.end();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,6 +523,7 @@ void module_manager::serialize(utils::buffer_serializer& buffer) const
|
||||
void module_manager::deserialize(utils::buffer_deserializer& buffer)
|
||||
{
|
||||
buffer.read_map(this->modules_);
|
||||
this->last_module_cache_ = this->modules_.end();
|
||||
|
||||
const auto executable_base = buffer.read<uint64_t>();
|
||||
const auto ntdll_base = buffer.read<uint64_t>();
|
||||
@@ -559,6 +562,7 @@ bool module_manager::unmap(const uint64_t address)
|
||||
this->callbacks_->on_module_unload(mod->second);
|
||||
unmap_module(*this->memory_, mod->second);
|
||||
this->modules_.erase(mod);
|
||||
this->last_module_cache_ = this->modules_.end();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user