ams_mitm: Implement emummc Nintendo folder redirection

This commit is contained in:
Michael Scire
2019-12-05 23:41:33 -08:00
committed by SciresM
parent 733f2b3cdd
commit 746dbfe018
78 changed files with 2190 additions and 187 deletions

View File

@@ -21,7 +21,7 @@ namespace ams::creport {
class CrashReport {
private:
static constexpr size_t DyingMessageSizeMax = 0x1000;
static constexpr size_t DyingMessageSizeMax = os::MemoryPageSize;
private:
Handle debug_handle = INVALID_HANDLE;
bool has_extra_info = true;

View File

@@ -33,7 +33,7 @@ extern "C" {
void __appExit(void);
/* Exception handling. */
alignas(16) u8 __nx_exception_stack[0x1000];
alignas(16) u8 __nx_exception_stack[ams::os::MemoryPageSize];
u64 __nx_exception_stack_size = sizeof(__nx_exception_stack);
void __libnx_exception_handler(ThreadExceptionDump *ctx);
}

View File

@@ -229,7 +229,7 @@ namespace ams::creport {
}
/* We want to read the last two pages of .rodata. */
static u8 s_last_rodata_pages[2 * 0x1000];
static u8 s_last_rodata_pages[2 * os::MemoryPageSize];
const size_t read_size = mi.size >= sizeof(s_last_rodata_pages) ? sizeof(s_last_rodata_pages) : (sizeof(s_last_rodata_pages) / 2);
if (R_FAILED(svcReadDebugProcessMemory(s_last_rodata_pages, this->debug_handle, mi.addr + mi.size - read_size, read_size))) {
return;