toaruos/modules/crash.c

20 lines
330 B
C
Raw Normal View History

#include <module.h>
#include <mod/shell.h>
DEFINE_SHELL_FUNCTION(crash, "Dereference NULL.") {
2014-03-19 09:57:07 +04:00
int x = *((int *)0x20000000 );
return x;
}
static int crash_init(void) {
BIND_SHELL_FUNCTION(crash);
2014-03-19 09:57:07 +04:00
return 0;
}
static int crash_fini(void) {
2014-03-19 09:57:07 +04:00
return 0;
}
MODULE_DEF(crash, crash_init, crash_fini);
2014-03-19 07:11:56 +04:00
MODULE_DEPENDS(debugshell);