2014-03-17 01:39:39 +04:00
|
|
|
#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;
|
2014-03-17 01:39:39 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static int crash_init(void) {
|
|
|
|
BIND_SHELL_FUNCTION(crash);
|
2014-03-19 09:57:07 +04:00
|
|
|
return 0;
|
2014-03-17 01:39:39 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static int crash_fini(void) {
|
2014-03-19 09:57:07 +04:00
|
|
|
return 0;
|
2014-03-17 01:39:39 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
MODULE_DEF(crash, crash_init, crash_fini);
|
2014-03-19 07:11:56 +04:00
|
|
|
MODULE_DEPENDS(debugshell);
|