plan 9 kernel history: overview | file list | diff list

1990/1104/gnot/trap.c (diff list | history)

1990/1104/sys/src/9/gnot/trap.c:91,971990/1110/sys/src/9/gnot/trap.c:91,97 (short | long | prev | next)
1990/03091    
	if(u) 
		u->p->pc = ur->pc;		/* BUG */ 
	if(user){ 
		sprint(buf, "pc=%lux trap: %s", ur->pc, excname(ur->vo)); 
1990/1110    
		sprint(buf, "sys: trap: %s", ur->pc, excname(ur->vo)); 
1990/03091    
		postnote(u->p, 1, buf, NDebug); 
	}else{ 
1990/0905    
		print("kernel trap vo=0x%ux pc=%lux\n", ur->vo, ur->pc); 
1990/1104/sys/src/9/gnot/trap.c:271,2771990/1110/sys/src/9/gnot/trap.c:271,277
1990/0511    
	if(!waserror()){ 
1990/0513    
		if(r0 >= sizeof systab/BY2WD){ 
			pprint("bad sys call number %d pc %lux\n", r0, ((Ureg*)UREGADDR)->pc); 
1990/0511    
			msg = "bad sys call"; 
1990/1110    
			msg = "sys: bad sys call"; 
1990/0511    
	    Bad: 
			postnote(u->p, 1, msg, NDebug); 
			error(0, Ebadarg); 
1990/1104/sys/src/9/gnot/trap.c:278,2841990/1110/sys/src/9/gnot/trap.c:278,284
1990/0511    
		} 
		if(sp & (BY2WD-1)){ 
			pprint("odd sp in sys call pc %lux sp %lux\n", ((Ureg*)UREGADDR)->pc, ((Ureg*)UREGADDR)->sp); 
			msg = "odd stack"; 
1990/1110    
			msg = "sys: odd stack"; 
1990/0511    
			goto Bad; 
		} 
		if(sp<(USTKTOP-BY2PG) || sp>(USTKTOP-4*BY2WD)) 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)