diff --git a/sysmodules/rosalina/source/gdb/remote_command.c b/sysmodules/rosalina/source/gdb/remote_command.c index 2f36b00..9471f7c 100644 --- a/sysmodules/rosalina/source/gdb/remote_command.c +++ b/sysmodules/rosalina/source/gdb/remote_command.c @@ -262,7 +262,10 @@ GDB_DECLARE_REMOTE_COMMAND_HANDLER(GetMemRegions) goto end; } - while (address < 0x40000000 ///< Limit to check for regions + s64 TTBCR; + svcGetSystemInfo(&TTBCR, 0x10002, 0); + + while (address < (1u << (32 - (u32)TTBCR)) ///< Limit to check for regions && posInBuffer < maxPosInBuffer && R_SUCCEEDED(svcQueryProcessMemory(&memi, &pagei, handle, address))) {