Exemplo n.º 1
0
void
display_special_regs(struct ps_prochandle *ph, pstatus_t *prst)
{
	pstatus_t	pstatus;

	if (prst == NULL) {
		if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
		    0) == -1) {
			perror("dsr: reading status");
			return;
		}
		prst = &pstatus;
	}
	(void) printf("specials:\n");
	disp_reg_line(ph, prst, "psr", R_PSR, "pc", R_PC);
	disp_reg_line(ph, prst, "npc", R_nPC, "Y", R_Y);
	disp_reg_line(ph, prst, "wim", R_WIM, "TBR", R_TBR);
}
Exemplo n.º 2
0
void
display_out_regs(struct ps_prochandle *ph, pstatus_t *prst)
{
	pstatus_t	pstatus;

	if (prst == NULL) {
		if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
		    0) == -1) {
			perror("dor: reading status");
			return;
		}
		prst = &pstatus;
	}
	(void) printf("outs:\n");
	disp_reg_line(ph, prst, "o0", R_O0, "o4", R_O4);
	disp_reg_line(ph, prst, "o1", R_O1, "o5", R_O5);
	disp_reg_line(ph, prst, "o2", R_O2, "o6(sp)", R_O6);
	disp_reg_line(ph, prst, "o3", R_O3, "o7", R_O7);
}
Exemplo n.º 3
0
void
display_local_regs(struct ps_prochandle *ph, pstatus_t *prst)
{
	pstatus_t	pstatus;

	if (prst == NULL) {
		if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
		    0) == -1) {
			perror("dlr: reading status");
			return;
		}
		prst = &pstatus;
	}
	(void) printf("locals:\n");
	disp_reg_line(ph, prst, "l0", R_L0, "l4", R_L4);
	disp_reg_line(ph, prst, "l1", R_L1, "l5", R_L5);
	disp_reg_line(ph, prst, "l2", R_L2, "l6", R_L6);
	disp_reg_line(ph, prst, "l3", R_L3, "l7", R_L7);
}
Exemplo n.º 4
0
void
display_global_regs(struct ps_prochandle *ph, pstatus_t *prst)
{
	pstatus_t	pstatus;

	if (prst == NULL) {
		if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
		    0) == -1) {
			perror("dgr: reading status");
			return;
		}
		prst = &pstatus;
	}
	(void) printf("globals:\n");
	disp_reg_line(ph, prst, "g0", R_G0, "g4", R_G4);
	disp_reg_line(ph, prst, "g1", R_G1, "g5", R_G5);
	disp_reg_line(ph, prst, "g2", R_G2, "g6", R_G6);
	disp_reg_line(ph, prst, "g3", R_G3, "g7", R_G7);
}
Exemplo n.º 5
0
void
display_in_regs(struct ps_prochandle *ph, pstatus_t *prst)
{
	pstatus_t	pstatus;

	if (prst == NULL) {
		if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
		    0) == -1) {
			perror("dir: reading status");
			return;
		}
		prst = &pstatus;
	}
	(void) printf("ins:\n");
	disp_reg_line(ph, prst, "i0", R_I0, "i4", R_I4);
	disp_reg_line(ph, prst, "i1", R_I1, "i5", R_I5);
	disp_reg_line(ph, prst, "i2", R_I2, "i6(fp)", R_I6);
	disp_reg_line(ph, prst, "i3", R_I3, "i7", R_I7);

}
Exemplo n.º 6
0
retc_t
display_all_regs(struct ps_prochandle *ph)
{
	pstatus_t	pstatus;
	if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
	    0) == -1) {
		perror("dar: reading status");
		return (RET_FAILED);
	}
	printf("registers:\n");
	disp_reg_line(ph, &pstatus, "gs", GS, "fs", FS);
	disp_reg_line(ph, &pstatus, "es", ES, "ds", DS);
	disp_reg_line(ph, &pstatus, "edi", EDI, "esi", ESI);
	disp_reg_line(ph, &pstatus, "ebp", EBP, "esp", ESP);
	disp_reg_line(ph, &pstatus, "ebx", EBX, "edx", EDX);
	disp_reg_line(ph, &pstatus, "ecx", ECX, "eax", EAX);
	disp_reg_line(ph, &pstatus, "trapno", TRAPNO, "err", ERR);
	disp_reg_line(ph, &pstatus, "eip", EIP, "cs", CS);
	disp_reg_line(ph, &pstatus, "efl", EFL, "uesp", UESP);
	return (RET_OK);
}
Exemplo n.º 7
0
retc_t
display_all_regs(struct ps_prochandle *ph)
{
	pstatus_t	pstatus;

	if (pread(ph->pp_statusfd, &pstatus, sizeof (pstatus),
	    0) == -1) {
		perror("dar: reading status");
		return (RET_FAILED);
	}
	(void) printf("registers:\n");
	disp_reg_line(ph, &pstatus, "gs", REG_GS, "fs", REG_FS);
	disp_reg_line(ph, &pstatus, "es", REG_ES, "ds", REG_DS);
	disp_reg_line(ph, &pstatus, "rdi", REG_RDI, "rsi", REG_RSI);
	disp_reg_line(ph, &pstatus, "rbp", REG_RBP, "rsp", REG_RSP);
	disp_reg_line(ph, &pstatus, "rbx", REG_RBX, "rdx", REG_RDX);
	disp_reg_line(ph, &pstatus, "rcx", REG_RCX, "rax", REG_RAX);
	disp_reg_line(ph, &pstatus, "trapno", REG_TRAPNO, "err", REG_ERR);
	disp_reg_line(ph, &pstatus, "rip", REG_RIP, "cs", REG_CS);
	disp_reg_line(ph, &pstatus, "rfl", REG_RFL, "uesp", REG_RSP);
	return (RET_OK);
}