static char sccsid
[] = "@(#)print.c 5.3 (Berkeley) %G%";
* adb - printing routines
/* general printing routines ($) */
while (readchar() != '\n')
char *strcpy(), *strcat();
} while (readchar() != '\n');
(void) strcpy(Ifile
, Ipath
);
(void) strcat(Ifile
, "/");
(void) strcat(Ifile
, file
);
if (strcmp(file
, "-") != 0) {
(void) lseek(infile
, 0L, 0);
outfile
= open(file
, O_CREAT
|O_WRONLY
, 0644);
(void) lseek(outfile
, 0L, 2);
prints("not debugging kernel\n");
if (!(i
>= 2 && i
<= 16 || i
<= -2 && i
>= -16)) {
adbprintf("illegal radix %d base ten",
adbprintf("radix=%D base ten", (expr_t
)radix
);
maxcol
= gavedot
? edot
: MAXCOL
;
maxoff
= gavedot
? edot
: MAXOFF
;
for (i
= 0; i
<= 35; i
++)
i
> 9 ? i
+ 'a' - 10 : i
+ '0',
printmap("? map", &txtmap
);
printmap("/ map", &datmap
);
adbprintf("pcs id = %D\n", (expr_t
)pid
);
printstack(modif
== 'C', gavecount
? (int)ecount
: -1);
adbprintf("%s%12t`%s'\n", s
, m
->ufd
< 0 ? "-" :
m
->ufd
== corefile
.fd
? corefile
.name
: symfile
.name
);
adbprintf("b1 = %-16Re1 = %-16Rf1 = %-16R\n",
m
->m1
.b
, m
->m1
.e
, m
->m1
.f
);
adbprintf("b2 = %-16Re2 = %-16Rf2 = %-16R\n",
m
->m2
.b
, m
->m2
.e
, m
->m2
.f
);
* Print global data and bss symbols, and if texttoo, text symbols too.
register struct nlist
*sp
;
for (sp
= symtab
; sp
< esymtab
; sp
++) {
if ((sp
->n_type
& N_EXT
) == 0)
adbprintf("%s:%12t@ %R\n",
adbprintf("%s:%12t", sp
->n_un
.n_name
);
prfrom((addr_t
)sp
->n_value
, '\n');
* Print the value stored in some location, or `?' if it cannot be read,
* then the character c (usually '\n' or ',').
if (adbread(SP_DATA
, a
, &v
, sizeof(v
)) == sizeof(v
) && errflag
== NULL
)
adbprintf("%R\%c", v
, c
);
* Print a local symbol (called from printstack()).
* Local symbols end with ':', so cannot use %s format.
while (*cp
&& *cp
!= ':')
register struct reglist
*p
;
extern struct reglist reglist
[];
for (p
= reglist
; p
->r_name
!= NULL
; p
++) {
adbprintf("%s%6t%R\%16t", p
->r_name
, v
);
valpr(v
, ispace_reg(p
) ? SP_INSTR
: SP_DATA
);