diff options
Diffstat (limited to 'include/kernel')
-rw-r--r-- | include/kernel/appmgr.h | 31 | ||||
-rw-r--r-- | include/kernel/kernel/processmgr.h | 3 | ||||
-rw-r--r-- | include/kernel/kernel/sysmem.h | 26 |
3 files changed, 59 insertions, 1 deletions
diff --git a/include/kernel/appmgr.h b/include/kernel/appmgr.h index 4336ca5..758c339 100644 --- a/include/kernel/appmgr.h +++ b/include/kernel/appmgr.h @@ -14,6 +14,37 @@ extern "C" { */ int sceAppMgrKillProcess(SceUID pid); +typedef struct +{ + size_t size; + unsigned int unk_4; //<! set to 0x80000000 to break on launch + unsigned int unk_8; + unsigned int unk_C; + unsigned int unk_10; + unsigned int unk_14; + unsigned int unk_18; + unsigned int unk_1C; + unsigned int unk_20; + unsigned int unk_24; + unsigned int unk_28; + unsigned int unk_2C; + unsigned int unk_30; +} SceAppMgrLaunchParam; + +/** + * @brief Launch an application for debugging + * + * @param[in] path Path to the executable to load + * @param[in] args Arguments to pass to the executable and to configure appmgr + * @param[in] arg_size The size of the args passed in + * @param[in] type Set to 0x80000000 for debugging launch + * @param[in] param pointer to launch params + * @param unk unknown, set to nullptr + * + * @return pid on success, else < 0. + */ +int sceAppMgrLaunchAppByPath(const char *path, const char *args, unsigned arg_size, unsigned int type, const SceAppMgrLaunchParam *param, void *unk); + #ifdef __cplusplus } #endif diff --git a/include/kernel/kernel/processmgr.h b/include/kernel/kernel/processmgr.h index 4578b35..e0209f9 100644 --- a/include/kernel/kernel/processmgr.h +++ b/include/kernel/kernel/processmgr.h @@ -45,9 +45,10 @@ int sceKernelResumeProcess(SceUID pid); /** * @brief Suspend a running process. * @param[in] pid The process to suspend. + * @param[in] status The new status for the process. * @return Zero on success, < 0 on error. */ -int sceKernelSuspendProcess(SceUID pid); +int sceKernelSuspendProcess(SceUID pid, int status); /** * @brief Get the status of a given process. diff --git a/include/kernel/kernel/sysmem.h b/include/kernel/kernel/sysmem.h index 3675526..1f03ede 100644 --- a/include/kernel/kernel/sysmem.h +++ b/include/kernel/kernel/sysmem.h @@ -458,6 +458,32 @@ int sceDebugPutchar(int character); int sceDebugDisableInfoDump(int flag); +typedef struct +{ + size_t size; //!< sizeof(SceSysrootProcessHandler) + int (* unk_4)(void); + int (* unk_8)(void); + int (* unk_C)(void); + int (* unk_10)(void); + int (* unk_14)(void); + int (* unk_18)(void); + int (* on_process_created)(void); //!< called when process is created + int (* unk_20)(void); + int (* unk_24)(void); +} SceSysrootProcessHandler; + +/** + * Set handlers for the process lifecycle. + * + * This internal function allows a developer to introspect and receive events based + * on the process lifecycle. + * + * @param[in] handlers Pointer to struct containing the handlers. This function does not copy the handlers, so this pointer must remain valid after a successful call. + * + * @return 0 on success, < 0 on error. + */ +int sceKernelSysrootSetProcessHandler(const SceSysrootProcessHandler *handlers); + #ifdef __cplusplus } #endif |