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

1992/1126/power/debugger.c (diff list | history)

1992/1125/sys/src/9/power/debugger.c:84,951992/1126/sys/src/9/power/debugger.c:84,93 (short | long | prev | next)
1992/1125    
		p = s->buf; 
	while(p != end){ 
		c = *p & 0xff; 
		if(c >= ' ' && c <= '~'){ 
			if(c == '\r' || c == '\n') 
				dprintq.puts(&dprintq, "\r\n", 2); 
			else 
				dprintq.puts(&dprintq, p, 1); 
		} 
1992/1126    
		if(c == '\r' || c == '\n') 
			dprintq.puts(&dprintq, "\r\n", 2); 
		else if(c >= ' ' && c <= '~') 
			dprintq.puts(&dprintq, p, 1); 
1992/1125    
		p++; 
		if(p >= &s->buf[sizeof(s->buf)]) 
			p = s->buf; 
1992/1125/sys/src/9/power/debugger.c:107,1131992/1126/sys/src/9/power/debugger.c:105,111
1992/1125    
		dprint("!	h <location> <howmany> - hex display\r\n"); 
		return; 
	} 
	n = strtoul(start, 0, 0); 
1992/1126    
	n = strtoul(start, 0, 16); 
1992/1125    
	if((n & KZERO) == 0) 
		return; 
	p = (ulong *)n; 
1992/1125/sys/src/9/power/debugger.c:120,1271992/1126/sys/src/9/power/debugger.c:118,126
1992/1125    
	while(n > 0){ 
		dprint("%lux/", p); 
		for(i = 0; i < 8 && n > 0; i++, n--) 
			dprint("	%lux", p[i]); 
1992/1126    
			dprint(" %8.8lux", p[i]); 
1992/1125    
		dprint("\r\n"); 
1992/1126    
		p += 8; 
1992/1125    
	} 
} 
 
1992/1125/sys/src/9/power/debugger.c:137,1511992/1126/sys/src/9/power/debugger.c:136,149
1992/1125    
	for(i = 0; i < 4; i++){ 
		if((active.machs&(1<<i)) == 0) 
			continue; 
		mp = (void*)MACHADDR; 
		mp += i; 
1992/1126    
		mp = (void*)(MACHADDR+i*BY2PG); 
1992/1125    
		l = (ulong)(mp->proc); 
		dprint("mach[%d]->proc/	%lux\r\n", i, l); 
		dprint("mach[%d]->splpc/	%lux\r\n", i, mp->splpc); 
		if((l & 0xf0000000) == KZERO){ 
1992/1126    
		if(l & KZERO){ 
1992/1125    
			p = (Proc*)l; 
			l = (ulong)(p->upage); 
			if((l & 0xf0000000) == KZERO){ 
1992/1126    
			if(l & KZERO){ 
1992/1125    
				pg = (Page*)l; 
				l = pg->pa; 
				dprint("mach[%d]->proc->upage->pa/	%lux\r\n", i, l); 
1992/1125/sys/src/9/power/debugger.c:164,1741992/1126/sys/src/9/power/debugger.c:162,167
1992/1125    
	USED(arg); 
 
	/* 
 	 *  grab a port for a console 
	 */ 
	duartspecial(3, &dprintq, &dkbdq, 9600); 
                 
	/* 
	 *  sched() until we are on processor 1 
	 */ 
	for(;;){ 
1992/1125/sys/src/9/power/debugger.c:178,1831992/1126/sys/src/9/power/debugger.c:171,183
1992/1125    
		splx(level); 
		sched(); 
	} 
1992/1126    
 
	/* 
 	 *  grab a port for a console 
	 */ 
	initq(&dprintq); 
	initq(&dkbdq); 
	duartspecial(3, &dprintq, &dkbdq, 9600); 
1992/1125    
 
	/* 
	 *  take processor and process out of active groups 


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