static char sccsid
[] = "@(#)print.c 1.2 (Berkeley) %G%";
"p2lr", P2LR
, &pcb
.pcb_p2lr
,
"p2br", P2BR
, (int *)&pcb
.pcb_p2br
,
"p0lr", P0LR
, &pcb
.pcb_p0lr
,
"p0br", P0BR
, (int *)&pcb
.pcb_p0br
,
"ksp", KSP
, &pcb
.pcb_ksp
,
"hfs", HFS
, &pcb
.pcb_hfs
,
"psl", PSL
, &pcb
.pcb_psl
,
"ach", ACHI
, &pcb
.pcb_ach
,
"acl", ACLO
, &pcb
.pcb_acl
,
"usp", USP
, &pcb
.pcb_usp
,
"r12", R12
, &pcb
.pcb_r12
,
"r11", R11
, &pcb
.pcb_r11
,
"r10", R10
, &pcb
.pcb_r10
,
"input available (signal)",
/* general printing routines ($) */
register struct nlist
*sp
;
IF cntflg
==0 THEN cntval
= -1; FI
THEN WHILE
readchar() != EOR
THEN REP file
[index
++]=lastc
;
IF index
>=63 THEN
error(LONGFIL
); FI
IF infile
<0 && (infile
=open(Ifile
,0))<0
THEN infile
=0; error(NOTOPEN
);
ELSE outfile
=open(file
,1);
THEN outfile
=creat(file
,0644);
ELSE
lseek(outfile
,0L,2);
printf("not debugging kernel\n");
int pte
= access(RD
, dot
, DSP
, 0);
masterpcbb
= (pte
&PG_PFNUM
)*NBPG
;
if (!(adrval
>=2 && adrval
<=16 || adrval
<=-2 && adrval
>=-16)) {
printf("illegal radix %d base ten",radix
);
printf("radix=%d base ten",radix
);
case 'q': case 'Q': case '%':
maxpos
=(adrflg
?adrval
:MAXPOS
);
maxoff
=(adrflg
?adrval
:MAXOFF
);
THEN
printc((i
<=9 ? '0' : 'a'-10) + i
);
printf(" = %R\n",var
[i
]);
printmap("? map",&txtmap
);
printmap("/ map",&datmap
);
THEN
printf("pcs id = %d\n",pid
);
ELSE
printf("no process\n");
frame
= *(ADDR
*)(((ADDR
)(&u
))+FP
);
callpc
= *(ADDR
*)(((ADDR
)(&u
))+PC
);
WHILE cntval
-- ANDF frame
!=0
/* check for pc in pcb (signal trampoline code) */
if (MAXSTOR
< callpc
&& callpc
< MAXSTOR
+ctob(UPAGES
)) {
!strcmp(cursym
->n_un
.n_name
, "start"))
name
= cursym
->n_un
.n_name
;
narg
= ((get(frame
-4, DSP
)&0xffff)-4)/4;
LOOP IF narg
==0 THEN
break; FI
printf("%R", get(argp
+= 4, DSP
));
IF
--narg
!=0 THEN
printc(','); FI
psymoff(callpc
, ISYM
, "\n");
THEN WHILE
localsym(frame
,argp
)
DO word
=get(localval
,DSP
);
printf("%8t%s:%10t", cursym
->n_un
.n_name
);
IF errflg THEN
printf("?\n"); errflg
=0;
ELSE
printf("%R\n",word
); FI
callpc
= get(frame
-8, DSP
);
frame
= get(frame
, DSP
)&ALIGN
;
callpc
= get(lastframe
+44, DSP
);
IF
!adrflg ANDF
!INSTACK(frame
)
for (sp
= symtab
; sp
< esymtab
; sp
++) {
if (sp
->n_type
==(N_DATA
|N_EXT
) ORF sp
->n_type
==(N_BSS
|N_EXT
))
printf("%s:%12t%R\n", sp
->n_un
.n_name
, get(sp
->n_value
,DSP
));
printf("breakpoints\ncount%8tbkpt%24tcommand\n");
for (bkptr
=bkpthead
; bkptr
; bkptr
=bkptr
->nxtbkpt
)
printf("%-8.8d",bkptr
->count
);
psymoff(bkptr
->loc
,ISYM
,"%24t");
WHILE
*comptr DO
printc(*comptr
++); OD
printf("%s%12t`%s'\n",s
,(file
<0 ? "-" : (file
==fcor
? corfil
: symfil
)));
printf("b1 = %-16R",amap
->b1
);
printf("e1 = %-16R",amap
->e1
);
printf("f1 = %-16R",amap
->f1
);
printf("\nb2 = %-16R",amap
->b2
);
printf("e2 = %-16R",amap
->e2
);
printf("f2 = %-16R",amap
->f2
);
FOR p
=reglist
; p
->rname
; p
++
if(c
!='R' && p
->roffs
!=PSL
)
v
= kcore
? *p
->rkern
: *(ADDR
*)(((ADDR
)&u
)+p
->roffs
);
printf("%s%6t%R %16t", p
->rname
, v
);
valpr(v
,(p
->roffs
==PC
?ISYM
:DSYM
));
FOR p
=reglist
; p
->rname
; p
++
DO IF
readchar() != *regptr
++
ELSE
return(kcore
? (int)p
->rkern
: p
->roffs
);
dot
= *(ADDR
*)(((ADDR
)(&u
))+PC
);
psymoff(dot
,ISYM
,":%16t"); printins(ISP
,chkget(dot
,ISP
));
"reserved addressing fault",
"priviliged instruction fault",
"integer divide by zero trap",
"floating overflow trap",
"floating/decimal divide by zero trap",
"floating underflow trap",
"subscript out of range trap",
"floating overflow fault",
"floating divide by zero fault",
"floating undeflow fault"
IF (signo
>=0) ANDF (signo
<sizeof signals
/sizeof signals
[0])
THEN
printf(signals
[signo
]); FI
sigcode
< sizeof fpenames
/ sizeof fpenames
[0]) THEN
printf(" ("); printf(fpenames
[sigcode
]); printc(')');
sigcode
< sizeof illinames
/ sizeof illinames
[0]) THEN
printf(" ("); printf(illinames
[sigcode
]); printc(')');