mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 18:42:15 +02:00
Implement svcQueryProcessMemory
This commit is contained in:
parent
4448b354dd
commit
9958bf17fb
@ -1056,6 +1056,18 @@ Result svcMapProcessMemory(void* dst, Handle proc, u64 src, u64 size);
|
||||
*/
|
||||
Result svcUnmapProcessMemory(void* dst, Handle proc, u64 src, u64 size);
|
||||
|
||||
/**
|
||||
* @brief Equivalent to \ref svcQueryMemory, for another process.
|
||||
* @param[out] meminfo_ptr \ref MemoryInfo structure which will be filled in.
|
||||
* @param[out] pageinfo Page information which will be filled in.
|
||||
* @param[in] proc Process handle.
|
||||
* @param[in] addr Address to query.
|
||||
* @return Result code.
|
||||
* @note Syscall number 0x76.
|
||||
* @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available.
|
||||
*/
|
||||
Result svcQueryProcessMemory(MemoryInfo* meminfo_ptr, u32 *pageinfo, Handle proc, u64 addr);
|
||||
|
||||
/**
|
||||
* @brief Maps normal heap in a certain process as executable code (used when loading NROs).
|
||||
* @param[in] proc Process handle (cannot be \ref CUR_PROCESS_HANDLE).
|
||||
|
@ -572,6 +572,14 @@ SVC_BEGIN svcUnmapProcessMemory
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
SVC_BEGIN svcQueryProcessMemory
|
||||
str x1, [sp, #-16]!
|
||||
svc 0x76
|
||||
ldr x2, [sp], #16
|
||||
str w1, [x2]
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
SVC_BEGIN svcMapProcessCodeMemory
|
||||
svc 0x77
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user