gbd: fix address lookup limit on lower fw

This commit is contained in:
TuxSH 2020-04-28 02:45:48 +01:00
parent cd68b66c03
commit 5924f60d06

View File

@ -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)))
{