dmnt2: add memory-map read, improve module shared-lib names

This commit is contained in:
Michael Scire 2021-10-31 18:32:23 -07:00 committed by SciresM
parent 3dce23773a
commit 277bd101c5
5 changed files with 100 additions and 5 deletions

View file

@ -194,6 +194,16 @@ namespace ams::dmnt {
/* Truncate module name. */
module_name[ModuleDefinition::PathLengthMax - 1] = 0;
/* Set default module name start. */
module.SetNameStart(0);
/* Ignore leading directories. */
for (size_t i = 0; i < static_cast<size_t>(module_path.path_length); ++i) {
if (module_name[i] == '/' || module_name[i] == '\\') {
module.SetNameStart(i + 1);
}
}
}
}
@ -228,6 +238,11 @@ namespace ams::dmnt {
return svc::WriteDebugProcessMemory(m_debug_handle, reinterpret_cast<uintptr_t>(src), address, size);
}
Result DebugProcess::QueryMemory(svc::MemoryInfo *out, uintptr_t address) {
svc::PageInfo dummy;
return svc::QueryDebugProcessMemory(out, std::addressof(dummy), m_debug_handle, address);
}
Result DebugProcess::Continue() {
AMS_DMNT2_GDB_LOG_DEBUG("DebugProcess::Continue() all\n");