diff options
| author | 2019-05-26 11:40:41 -0400 | |
|---|---|---|
| committer | 2019-05-26 11:40:46 -0400 | |
| commit | b77fde7c5c1f63aad9d4f01ea625805661870f3e (patch) | |
| tree | 1a69520beebaac50ecd19d4c54828f7b8a498dd0 /src/core/loader/nso.cpp | |
| parent | prepo: Save reports from PlayReport service (diff) | |
| download | yuzu-b77fde7c5c1f63aad9d4f01ea625805661870f3e.tar.gz yuzu-b77fde7c5c1f63aad9d4f01ea625805661870f3e.tar.xz yuzu-b77fde7c5c1f63aad9d4f01ea625805661870f3e.zip | |
loader: Move NSO module tracking to AppLoader
Also cleanup of general stuff
Diffstat (limited to 'src/core/loader/nso.cpp')
| -rw-r--r-- | src/core/loader/nso.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 7beeaaff3..e0d6ab473 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -164,9 +164,6 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, | |||
| 164 | // Register module with GDBStub | 164 | // Register module with GDBStub |
| 165 | GDBStub::RegisterModule(file.GetName(), load_base, load_base); | 165 | GDBStub::RegisterModule(file.GetName(), load_base, load_base); |
| 166 | 166 | ||
| 167 | // Register module for ARMInterface with System | ||
| 168 | Core::System::GetInstance().RegisterNSOModule(file.GetName(), load_base); | ||
| 169 | |||
| 170 | return load_base + image_size; | 167 | return load_base + image_size; |
| 171 | } | 168 | } |
| 172 | 169 | ||
| @@ -175,11 +172,15 @@ AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::Process& process) { | |||
| 175 | return {ResultStatus::ErrorAlreadyLoaded, {}}; | 172 | return {ResultStatus::ErrorAlreadyLoaded, {}}; |
| 176 | } | 173 | } |
| 177 | 174 | ||
| 175 | modules.clear(); | ||
| 176 | |||
| 178 | // Load module | 177 | // Load module |
| 179 | const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress(); | 178 | const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress(); |
| 180 | if (!LoadModule(process, *file, base_address, true)) { | 179 | if (!LoadModule(process, *file, base_address, true)) { |
| 181 | return {ResultStatus::ErrorLoadingNSO, {}}; | 180 | return {ResultStatus::ErrorLoadingNSO, {}}; |
| 182 | } | 181 | } |
| 182 | |||
| 183 | modules.insert_or_assign(base_address, file->GetName()); | ||
| 183 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", file->GetName(), base_address); | 184 | LOG_DEBUG(Loader, "loaded module {} @ 0x{:X}", file->GetName(), base_address); |
| 184 | 185 | ||
| 185 | is_loaded = true; | 186 | is_loaded = true; |
| @@ -187,4 +188,9 @@ AppLoader_NSO::LoadResult AppLoader_NSO::Load(Kernel::Process& process) { | |||
| 187 | LoadParameters{Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE}}; | 188 | LoadParameters{Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE}}; |
| 188 | } | 189 | } |
| 189 | 190 | ||
| 191 | ResultStatus AppLoader_NSO::ReadNSOModules(Modules& modules) { | ||
| 192 | modules = this->modules; | ||
| 193 | return ResultStatus::Success; | ||
| 194 | } | ||
| 195 | |||
| 190 | } // namespace Loader | 196 | } // namespace Loader |