mirror of
https://github.com/Pharaoh2k/ps5debug-NG.git
synced 2026-10-21 19:33:05 -05:00
PS5 debugger payload, inspired by Ctn's ps5debug 1.0b5 and wire-compatible with it. Runs the wire-protocol server inside SceShellCore via an umtx-loaded installer that injects the embedded debugger ELF. Features: process scan/RPC/ELF-inject, on-console scan, full debugger (breakpoints, watchpoints, single-step, regs/FP/DR access), kernel R/W, server-side Zydis disassembly, on-console Keystone assembler (0xBDAA0024), foreground-app metadata (0xBDDD0006), server-side RBP stack walk (CMD_PROC_READ_STACK), klog forwarder (TCP 3232), rest-mode survival and a lot more. Supports FW families 3.x / 4.0 / 4.x (incl. 4.51) / 5.x / 6.x / 7.x / 7.5x / 8.x via the kpatch routine in installer/source/main.c. GPL-3.0-only.
54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
#include <stdint.h>
|
|
|
|
struct proc_vm_map_entry;
|
|
|
|
#define SYS_PROC_ALLOC 1
|
|
#define SYS_PROC_FREE 2
|
|
#define SYS_PROC_PROTECT 3
|
|
#define SYS_PROC_VM_MAP 4
|
|
#define SYS_PROC_INSTALL 5
|
|
#define SYS_PROC_CALL 6
|
|
#define SYS_PROC_ELF 7
|
|
#define SYS_PROC_INFO 8
|
|
#define SYS_PROC_THRINFO 9
|
|
#define SYS_PROC_ALLOC_HINTED 10
|
|
#define SYS_PROC_ELF_RPC 11
|
|
|
|
struct sys_proc_alloc_args {
|
|
uint64_t address;
|
|
uint64_t length;
|
|
} __attribute__((packed));
|
|
|
|
struct sys_proc_free_args {
|
|
uint64_t address;
|
|
uint64_t length;
|
|
} __attribute__((packed));
|
|
|
|
struct sys_proc_protect_args {
|
|
uint64_t address;
|
|
uint64_t length;
|
|
uint64_t prot;
|
|
} __attribute__((packed));
|
|
|
|
struct sys_proc_vm_map_args {
|
|
struct proc_vm_map_entry *maps;
|
|
uint64_t num;
|
|
} __attribute__((packed));
|
|
|
|
struct sys_proc_elf_args {
|
|
void *elf;
|
|
|
|
uint64_t length;
|
|
} __attribute__((packed));
|
|
|
|
struct sys_proc_elf_rpc_args {
|
|
void *elf;
|
|
uint64_t length;
|
|
uint64_t entry;
|
|
} __attribute__((packed));
|
|
|
|
int sys_proc_cmd(uint64_t pid, uint64_t cmd, void *data);
|