mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-24 02:55:44 +01:00
core: Track load offsets of NSO modules
Needed for backtrace decomposition
This commit is contained in:
parent
e86d2e2e5b
commit
2179ad7483
@ -270,6 +270,8 @@ struct System::Impl {
|
|||||||
/// Telemetry session for this emulation session
|
/// Telemetry session for this emulation session
|
||||||
std::unique_ptr<Core::TelemetrySession> telemetry_session;
|
std::unique_ptr<Core::TelemetrySession> telemetry_session;
|
||||||
|
|
||||||
|
std::map<VAddr, std::string, std::greater<>> modules;
|
||||||
|
|
||||||
ResultStatus status = ResultStatus::Success;
|
ResultStatus status = ResultStatus::Success;
|
||||||
std::string status_details = "";
|
std::string status_details = "";
|
||||||
|
|
||||||
@ -509,6 +511,14 @@ void System::ClearContentProvider(FileSys::ContentProviderUnionSlot slot) {
|
|||||||
impl->content_provider->ClearSlot(slot);
|
impl->content_provider->ClearSlot(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void System::RegisterNSOModule(std::string name, VAddr start_address) {
|
||||||
|
impl->modules.insert_or_assign(start_address, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::map<VAddr, std::string, std::greater<>>& System::GetRegisteredNSOModules() const {
|
||||||
|
return impl->modules;
|
||||||
|
}
|
||||||
|
|
||||||
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
|
System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) {
|
||||||
return impl->Init(*this, emu_window);
|
return impl->Init(*this, emu_window);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include <map>
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "core/file_sys/vfs_types.h"
|
#include "core/file_sys/vfs_types.h"
|
||||||
#include "core/hle/kernel/object.h"
|
#include "core/hle/kernel/object.h"
|
||||||
@ -285,6 +286,10 @@ public:
|
|||||||
|
|
||||||
void ClearContentProvider(FileSys::ContentProviderUnionSlot slot);
|
void ClearContentProvider(FileSys::ContentProviderUnionSlot slot);
|
||||||
|
|
||||||
|
void RegisterNSOModule(std::string name, VAddr start_address);
|
||||||
|
|
||||||
|
const std::map<VAddr, std::string, std::greater<>>& GetRegisteredNSOModules() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
System();
|
System();
|
||||||
|
|
||||||
|
@ -164,6 +164,9 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process,
|
|||||||
// Register module with GDBStub
|
// Register module with GDBStub
|
||||||
GDBStub::RegisterModule(file.GetName(), load_base, load_base);
|
GDBStub::RegisterModule(file.GetName(), load_base, load_base);
|
||||||
|
|
||||||
|
// Register module for ARMInterface with System
|
||||||
|
Core::System::GetInstance().RegisterNSOModule(file.GetName(), load_base);
|
||||||
|
|
||||||
return load_base + image_size;
|
return load_base + image_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user