Beispiel #1
0
/* Install an error handler */
int pspDebugInstallErrorHandler(PspDebugErrorHandler handler)
{
	u32 addr;

	curr_handler = handler;

	addr = (u32) _pspDebugExceptionHandler;
	addr |= 0x80000000;

	return sceKernelRegisterDefaultExceptionHandler((void *) addr);
}
Beispiel #2
0
/* Entry point */
int module_start(SceSize args, void *argp)
{
	int ret = 0;

#ifndef _DEBUG
	if (args != 8)
		return -1;
	curr_handler = (PspDebugErrorHandler) ((int *) argp)[0];
	exception_regs = (PspDebugRegBlock *) ((int *) argp)[1];
	if (!curr_handler || !exception_regs)
		return -1;

	if (sceKernelDevkitVersion() < 0x03070110)
		ret = sceKernelRegisterDefaultExceptionHandler((void *)
													   _pspDebugExceptionHandler);
	else
		ret = sceKernelRegisterDefaultExceptionHandler371((void *)
														  _pspDebugExceptionHandler);
#endif

	return ret;
}