| plan 9 kernel history: overview | file list | diff list |
1991/1113/gnot/trap.c (diff list | history)
| 1991/1112/sys/src/9/gnot/trap.c:68,81 – 1991/1113/sys/src/9/gnot/trap.c:68,85 (short | long | prev | next) | ||
| 1990/03091 | }; char* | |
| 1991/1113 | excname(unsigned vo, ulong pc) | |
| 1990/03091 | { static char buf[32]; /* BUG: not reentrant! */ vo &= 0x0FFF; vo >>= 2; | |
| 1991/1113 | if(vo < sizeof trapname/sizeof(char*)){ /* special case, and pc will be o.k. */ if(vo==4 && *(ushort*)pc==0x4848) return "breakpoint"; | |
| 1990/03091 | return trapname[vo]; | |
| 1991/1113 | } | |
| 1990/03091 | sprint(buf, "offset 0x%ux", vo<<2); return buf; } | |
| 1991/1112/sys/src/9/gnot/trap.c:93,102 – 1991/1113/sys/src/9/gnot/trap.c:97,106 | ||
| 1991/1112 | u->dbgreg = ur; } | |
| 1990/03091 | if(user){ | |
| 1991/0705 |
| |
| 1991/1113 | sprint(buf, "sys: %s pc=0x%lux", excname(ur->vo, ur->pc), ur->pc); | |
| 1990/03091 | postnote(u->p, 1, buf, NDebug); }else{ | |
| 1990/1127 |
| |
| 1991/1113 | print("kernel trap %s pc=0x%lux\n", excname(ur->vo, ur->pc), ur->pc); | |
| 1990/03091 | dumpregs(ur); exit(); } | |