core: improve debug workflow
This commit is contained in:
parent
04352a9aef
commit
3ef9673360
12 changed files with 36 additions and 17 deletions
|
@ -127,13 +127,14 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
|
|||
}
|
||||
|
||||
// Apply patches if necessary
|
||||
if (pm && (pm->HasNSOPatch(nso_header.build_id) || Settings::values.dump_nso)) {
|
||||
const auto name = nso_file.GetName();
|
||||
if (pm && (pm->HasNSOPatch(nso_header.build_id, name) || Settings::values.dump_nso)) {
|
||||
std::vector<u8> pi_header(sizeof(NSOHeader) + program_image.size());
|
||||
std::memcpy(pi_header.data(), &nso_header, sizeof(NSOHeader));
|
||||
std::memcpy(pi_header.data() + sizeof(NSOHeader), program_image.data(),
|
||||
program_image.size());
|
||||
|
||||
pi_header = pm->PatchNSO(pi_header, nso_file.GetName());
|
||||
pi_header = pm->PatchNSO(pi_header, name);
|
||||
|
||||
std::copy(pi_header.begin() + sizeof(NSOHeader), pi_header.end(), program_image.data());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue