kernel: Add basic exceptions for linux

This commit is contained in:
IndecisiveTurtle 2024-10-24 21:55:40 +03:00 committed by IndecisiveTurtle
parent ef3341c78c
commit cef37be33d
20 changed files with 351 additions and 38 deletions

View file

@ -165,15 +165,6 @@ public:
return elf.IsSharedLib();
}
void* FindByName(std::string_view name) {
const auto symbols = export_sym.GetSymbols();
const auto it = std::ranges::find(symbols, name, &Loader::SymbolRecord::nid_name);
if (it != symbols.end()) {
return reinterpret_cast<void*>(it->virtual_address);
}
return nullptr;
}
template <typename T = VAddr>
T GetProcParam() const noexcept {
return reinterpret_cast<T>(proc_param_virtual_addr);
@ -217,6 +208,8 @@ public:
void LoadDynamicInfo();
void LoadSymbols();
void* FindByName(std::string_view name);
OrbisKernelModuleInfoEx GetModuleInfoEx() const;
const ModuleInfo* FindModule(std::string_view id);
const LibraryInfo* FindLibrary(std::string_view id);