Killing Minix by typing Q on serial console
- if debugging on serial console is enabled typing Q kills the system. It is handy if the system gets locked up and the timer interrupts still work. Good for remote debugging. - NOT_REACHABLE reintroduced and fixed. It should be used for marking code which is not reachable because the previous code _should_ not return. Such places are not always obvious
This commit is contained in:
parent
8a2a4f97fc
commit
98563a4afa
3 changed files with 5 additions and 1 deletions
|
@ -286,6 +286,9 @@ PRIVATE void ser_debug(int c)
|
||||||
|
|
||||||
switch(c)
|
switch(c)
|
||||||
{
|
{
|
||||||
|
case 'Q':
|
||||||
|
minix_shutdown(NULL);
|
||||||
|
NOT_REACHABLE;
|
||||||
case '1':
|
case '1':
|
||||||
ser_dump_proc();
|
ser_dump_proc();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
#define vmassert(t) { }
|
#define vmassert(t) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NOT_REACHABLE(__x) do { \
|
#define NOT_REACHABLE do { \
|
||||||
kprintf("NOT_REACHABLE at %s:%d\n", __FILE__, __LINE__); \
|
kprintf("NOT_REACHABLE at %s:%d\n", __FILE__, __LINE__); \
|
||||||
minix_panic("execution at an unexpected location\n", NO_NUM); \
|
minix_panic("execution at an unexpected location\n", NO_NUM); \
|
||||||
for(;;); \
|
for(;;); \
|
||||||
|
|
|
@ -251,6 +251,7 @@ PUBLIC void main()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
restart();
|
restart();
|
||||||
|
NOT_REACHABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
|
|
Loading…
Reference in a new issue