sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
main.cpp
1
#include <cstdio>
2
#include <cstring>
3
#include <stdexcept>
4
5
extern
"C"
{
6
#include <
kernel.h
>
7
#include <
crashscreen.h
>
8
int
kputs(
char
*s);
9
}
10
11
static
void
hook(
const
char
*report) {
12
bool
ok = strstr(report,
"std::terminate"
) && strstr(report,
"boom"
) && strstr(report,
"Backtrace"
);
13
kputs(ok ? (
char
*)
"crash-terminate: PASS\n"
: (
char
*)
"crash-terminate: FAIL report\n"
);
14
SleepThread();
15
}
16
17
int
main() {
18
crashscreen_install
();
19
crashscreen_set_hook
(hook);
20
throw
std::runtime_error(
"boom"
);
21
}
crashscreen.h
crashscreen_set_hook
void crashscreen_set_hook(crashscreen_hook_t hook)
Definition
crashscreen.c:468
crashscreen_install
void crashscreen_install(void)
Definition
crashscreen.c:473
kernel.h
tests
crash-terminate
src
main.cpp
Generated by
1.18.0