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

1992/0806/gnot/trap.c (diff list | history)

1992/0805/sys/src/9/gnot/trap.c:79,841992/0806/sys/src/9/gnot/trap.c:79,85 (short | long | prev | next)
1991/1113    
excname(unsigned vo, ulong pc) 
1990/03091    
{ 
	static char buf[32];	/* BUG: not reentrant! */ 
1992/0806    
	ulong fppc; 
1990/03091    
 
	vo &= 0x0FFF; 
	vo >>= 2; 
1992/0805/sys/src/9/gnot/trap.c:90,961992/0806/sys/src/9/gnot/trap.c:91,100
1991/1218    
		return buf; 
1991/1113    
	} 
1991/1218    
	if(49<=vo && vo<=54){ 
		sprint(buf, "fp: %s", fptrapname[vo-49]); 
1992/0806    
		fppc = 0; 
		if(u) 
			fppc = *(ulong*)(u->fpsave.reg+8); 
		sprint(buf, "fp: %s fppc=0x%lux", fptrapname[vo-49], fppc); 
1991/1218    
		return buf; 
	} 
1990/03091    
	sprint(buf, "offset 0x%ux", vo<<2); 
1992/0805/sys/src/9/gnot/trap.c:109,1141992/0806/sys/src/9/gnot/trap.c:113,121
1991/1112    
		u->dbgreg = ur; 
1992/0805    
 
1990/03091    
	if(user){ 
1992/0806    
		splhi(); 
		procsave(u->p); 
		spllo(); 
1991/1218    
		sprint(buf, "sys: %s", excname(ur->vo, ur->pc)); 
1990/03091    
		postnote(u->p, 1, buf, NDebug); 
	}else{ 
1992/0805/sys/src/9/gnot/trap.c:174,1801992/0806/sys/src/9/gnot/trap.c:181,187
1991/1218    
		l = strlen(n->msg); 
		if(l > ERRLEN-15)	/* " pc=0x12345678\0" */ 
			l = ERRLEN-15; 
		sprint(n->msg+l, " pc=0x%.8lux", ur->pc); 
1992/0806    
		sprint(n->msg+l, " pc=0x%lux", ur->pc); 
1991/1218    
	} 
	if(n->flag!=NUser && (u->notified || u->notify==0)){ 
1992/0714    
		if(n->flag == NDebug) 


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