From 5924f60d061c3bb69d0a000a29e3719f92c96635 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Tue, 28 Apr 2020 02:45:48 +0100 Subject: [PATCH] gbd: fix address lookup limit on lower fw --- sysmodules/rosalina/source/gdb/remote_command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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))) {