MCPcopy Create free account
hub / github.com/aldostools/webMAN-MOD / ps3mapi_get_memory

Function ps3mapi_get_memory

include/ps3mapi/debug_mem.h:84–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84static int ps3mapi_get_memory(u32 pid, u32 address, char *mem, u32 size)
85{
86 if(pid == LV1)
87 {
88 peek_chunk_lv1((address | BASE_MEMORY), size, (u64*)mem);
89 }
90 else if(pid == LV2)
91 {
92 peek_chunk_lv2((address | BASE_MEMORY), size, (u64*)mem);
93 }
94 else if(pid == FLASH)
95 {
96 peek_chunk_flash(address, size, (u64*)mem);
97 }
98 else if(pid < PID)
99 {
100 u64 device = (pid >= 10) ? (0x103000000000000ULL | pid): // USB
101 (0x101000000000000ULL | pid); // HDD
102 peek_chunk_device(device, address, size, (u64*)mem);
103 }
104 #ifdef PS3MAPI
105 else
106 {
107 #define PS3MAPI_OPCODE_GET_PROC_MEM 0x0031
108
109 system_call_6(SC_COBRA_SYSCALL8, SYSCALL8_OPCODE_PS3MAPI, PS3MAPI_OPCODE_GET_PROC_MEM, (u64)pid, (u64)address, (u64)(u32)mem, size);
110 return (int)p1;
111 }
112 #endif
113 return 0;
114}
115
116static void ps3mapi_dump_process(const char *dump_file, u32 pid, u32 address, u32 size)
117{

Callers 4

ps3mapi_find_offsetFunction · 0.85
ps3mapi_getmemFunction · 0.85
ps3mapi_dump_processFunction · 0.85
handleclient_ps3mapiFunction · 0.85

Calls 4

peek_chunk_lv1Function · 0.85
peek_chunk_lv2Function · 0.85
peek_chunk_flashFunction · 0.85
peek_chunk_deviceFunction · 0.85

Tested by

no test coverage detected