| 114 | } |
| 115 | |
| 116 | static void ps3mapi_dump_process(const char *dump_file, u32 pid, u32 address, u32 size) |
| 117 | { |
| 118 | sys_addr_t sysmem = sys_mem_allocate(_64KB_); |
| 119 | if(sysmem) |
| 120 | { |
| 121 | { PS3MAPI_ENABLE_ACCESS_SYSCALL8 } |
| 122 | |
| 123 | int fd; |
| 124 | char *mem_buf = (char*)sysmem; |
| 125 | |
| 126 | show_msg_with_icon(ICON_WAIT, "Dumping..."); |
| 127 | |
| 128 | if(cellFsOpen(dump_file, CELL_FS_O_CREAT | CELL_FS_O_WRONLY | CELL_FS_O_TRUNC, &fd, NULL, 0) == CELL_FS_SUCCEEDED) |
| 129 | { |
| 130 | char label[20]; |
| 131 | for(u32 addr = 0; addr < size; addr += _64KB_) |
| 132 | { |
| 133 | ps3mapi_get_memory(pid, (address + addr), mem_buf, _64KB_); |
| 134 | cellFsWrite(fd, mem_buf, _64KB_, NULL); |
| 135 | sprintf(label, "0x%x", address + addr); show_progress(label, OV_DUMP); |
| 136 | } |
| 137 | cellFsClose(fd); |
| 138 | } |
| 139 | sys_memory_free(sysmem); |
| 140 | |
| 141 | show_msg("Dump completed!"); |
| 142 | |
| 143 | play_rco_sound("snd_trophy"); |
| 144 | |
| 145 | disable_progress(); |
| 146 | |
| 147 | { PS3MAPI_DISABLE_ACCESS_SYSCALL8 } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | #ifdef DEBUG_MEM |
| 152 | static void ps3mapi_mem_dump(char *buffer, char *html, char *param) |
no test coverage detected