dt_dis.c revision 2
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#include <strings.h>
2N/A#include <stdio.h>
2N/A
2N/A#include <dt_impl.h>
2N/A#include <dt_ident.h>
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_log(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %%r%u, %%r%u, %%r%u", name,
2N/A DIF_INSTR_R1(in), DIF_INSTR_R2(in), DIF_INSTR_RD(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_branch(const dtrace_difo_t *dp, const char *name,
2N/A dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %u", name, DIF_INSTR_LABEL(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_load(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s [%%r%u], %%r%u", name,
2N/A DIF_INSTR_R1(in), DIF_INSTR_RD(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_store(const dtrace_difo_t *dp, const char *name,
2N/A dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %%r%u, [%%r%u]", name,
2N/A DIF_INSTR_R1(in), DIF_INSTR_RD(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_str(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%s", name);
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_r1rd(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %%r%u, %%r%u", name,
2N/A DIF_INSTR_R1(in), DIF_INSTR_RD(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_cmp(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %%r%u, %%r%u", name,
2N/A DIF_INSTR_R1(in), DIF_INSTR_R2(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_tst(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %%r%u", name, DIF_INSTR_R1(in));
2N/A}
2N/A
2N/Astatic const char *
2N/Adt_dis_varname(const dtrace_difo_t *dp, uint_t id, uint_t scope)
2N/A{
2N/A const dtrace_difv_t *dvp = dp->dtdo_vartab;
2N/A uint_t i;
2N/A
2N/A for (i = 0; i < dp->dtdo_varlen; i++, dvp++) {
2N/A if (dvp->dtdv_id == id && dvp->dtdv_scope == scope) {
2N/A if (dvp->dtdv_name < dp->dtdo_strlen)
2N/A return (dp->dtdo_strtab + dvp->dtdv_name);
2N/A break;
2N/A }
2N/A }
2N/A
2N/A return (NULL);
2N/A}
2N/A
2N/Astatic uint_t
2N/Adt_dis_scope(const char *name)
2N/A{
2N/A switch (name[2]) {
2N/A case 'l': return (DIFV_SCOPE_LOCAL);
2N/A case 't': return (DIFV_SCOPE_THREAD);
2N/A case 'g': return (DIFV_SCOPE_GLOBAL);
2N/A default: return (-1u);
2N/A }
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_lda(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t var = DIF_INSTR_R1(in);
2N/A const char *vname;
2N/A
2N/A (void) fprintf(fp, "%-4s DT_VAR(%u), %%r%u, %%r%u", name,
2N/A var, DIF_INSTR_R2(in), DIF_INSTR_RD(in));
2N/A
2N/A if ((vname = dt_dis_varname(dp, var, dt_dis_scope(name))) != NULL)
2N/A (void) fprintf(fp, "\t\t! DT_VAR(%u) = \"%s\"", var, vname);
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_ldv(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t var = DIF_INSTR_VAR(in);
2N/A const char *vname;
2N/A
2N/A (void) fprintf(fp, "%-4s DT_VAR(%u), %%r%u",
2N/A name, var, DIF_INSTR_RD(in));
2N/A
2N/A if ((vname = dt_dis_varname(dp, var, dt_dis_scope(name))) != NULL)
2N/A (void) fprintf(fp, "\t\t! DT_VAR(%u) = \"%s\"", var, vname);
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_stv(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t var = DIF_INSTR_VAR(in);
2N/A const char *vname;
2N/A
2N/A (void) fprintf(fp, "%-4s %%r%u, DT_VAR(%u)",
2N/A name, DIF_INSTR_RS(in), var);
2N/A
2N/A if ((vname = dt_dis_varname(dp, var, dt_dis_scope(name))) != NULL)
2N/A (void) fprintf(fp, "\t\t! DT_VAR(%u) = \"%s\"", var, vname);
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_setx(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t intptr = DIF_INSTR_INTEGER(in);
2N/A
2N/A (void) fprintf(fp, "%-4s DT_INTEGER[%u], %%r%u", name,
2N/A intptr, DIF_INSTR_RD(in));
2N/A
2N/A if (intptr < dp->dtdo_intlen) {
2N/A (void) fprintf(fp, "\t\t! 0x%llx",
2N/A (u_longlong_t)dp->dtdo_inttab[intptr]);
2N/A }
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_sets(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t strptr = DIF_INSTR_STRING(in);
2N/A
2N/A (void) fprintf(fp, "%-4s DT_STRING[%u], %%r%u", name,
2N/A strptr, DIF_INSTR_RD(in));
2N/A
2N/A if (strptr < dp->dtdo_strlen)
2N/A (void) fprintf(fp, "\t\t! \"%s\"", dp->dtdo_strtab + strptr);
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_ret(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A (void) fprintf(fp, "%-4s %%r%u", name, DIF_INSTR_RD(in));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_call(const dtrace_difo_t *dp, const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t subr = DIF_INSTR_SUBR(in);
2N/A
2N/A (void) fprintf(fp, "%-4s DIF_SUBR(%u), %%r%u\t\t! %s",
2N/A name, subr, DIF_INSTR_RD(in), dtrace_subrstr(NULL, subr));
2N/A}
2N/A
2N/A/*ARGSUSED*/
2N/Astatic void
2N/Adt_dis_pushts(const dtrace_difo_t *dp,
2N/A const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A static const char *const tnames[] = { "D type", "string" };
2N/A uint_t type = DIF_INSTR_TYPE(in);
2N/A
2N/A (void) fprintf(fp, "%-4s DT_TYPE(%u), %%r%u, %%r%u",
2N/A name, type, DIF_INSTR_R2(in), DIF_INSTR_RS(in));
2N/A
2N/A if (type < sizeof (tnames) / sizeof (tnames[0]))
2N/A (void) fprintf(fp, "\t! DT_TYPE(%u) = %s", type, tnames[type]);
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_xlate(const dtrace_difo_t *dp,
2N/A const char *name, dif_instr_t in, FILE *fp)
2N/A{
2N/A uint_t xlr = DIF_INSTR_XLREF(in);
2N/A
2N/A (void) fprintf(fp, "%-4s DT_XLREF[%u], %%r%u",
2N/A name, xlr, DIF_INSTR_RD(in));
2N/A
2N/A if (xlr < dp->dtdo_xlmlen) {
2N/A (void) fprintf(fp, "\t\t! DT_XLREF[%u] = %u.%s", xlr,
2N/A (uint_t)dp->dtdo_xlmtab[xlr]->dn_membexpr->dn_xlator->dx_id,
2N/A dp->dtdo_xlmtab[xlr]->dn_membname);
2N/A }
2N/A}
2N/A
2N/Astatic char *
2N/Adt_dis_typestr(const dtrace_diftype_t *t, char *buf, size_t len)
2N/A{
2N/A char kind[16], ckind[16];
2N/A
2N/A switch (t->dtdt_kind) {
2N/A case DIF_TYPE_CTF:
2N/A (void) strcpy(kind, "D type");
2N/A break;
2N/A case DIF_TYPE_STRING:
2N/A (void) strcpy(kind, "string");
2N/A break;
2N/A default:
2N/A (void) snprintf(kind, sizeof (kind), "0x%x", t->dtdt_kind);
2N/A }
2N/A
2N/A switch (t->dtdt_ckind) {
2N/A case CTF_K_UNKNOWN:
2N/A (void) strcpy(ckind, "unknown");
2N/A break;
2N/A case CTF_K_INTEGER:
2N/A (void) strcpy(ckind, "integer");
2N/A break;
2N/A case CTF_K_FLOAT:
2N/A (void) strcpy(ckind, "float");
2N/A break;
2N/A case CTF_K_POINTER:
2N/A (void) strcpy(ckind, "pointer");
2N/A break;
2N/A case CTF_K_ARRAY:
2N/A (void) strcpy(ckind, "array");
2N/A break;
2N/A case CTF_K_FUNCTION:
2N/A (void) strcpy(ckind, "function");
2N/A break;
2N/A case CTF_K_STRUCT:
2N/A (void) strcpy(ckind, "struct");
2N/A break;
2N/A case CTF_K_UNION:
2N/A (void) strcpy(ckind, "union");
2N/A break;
2N/A case CTF_K_ENUM:
2N/A (void) strcpy(ckind, "enum");
2N/A break;
2N/A case CTF_K_FORWARD:
2N/A (void) strcpy(ckind, "forward");
2N/A break;
2N/A case CTF_K_TYPEDEF:
2N/A (void) strcpy(ckind, "typedef");
2N/A break;
2N/A case CTF_K_VOLATILE:
2N/A (void) strcpy(ckind, "volatile");
2N/A break;
2N/A case CTF_K_CONST:
2N/A (void) strcpy(ckind, "const");
2N/A break;
2N/A case CTF_K_RESTRICT:
2N/A (void) strcpy(ckind, "restrict");
2N/A break;
2N/A default:
2N/A (void) snprintf(ckind, sizeof (ckind), "0x%x", t->dtdt_ckind);
2N/A }
2N/A
2N/A if (t->dtdt_flags & DIF_TF_BYREF) {
2N/A (void) snprintf(buf, len, "%s (%s) by ref (size %lu)",
2N/A kind, ckind, (ulong_t)t->dtdt_size);
2N/A } else {
2N/A (void) snprintf(buf, len, "%s (%s) (size %lu)",
2N/A kind, ckind, (ulong_t)t->dtdt_size);
2N/A }
2N/A
2N/A return (buf);
2N/A}
2N/A
2N/Astatic void
2N/Adt_dis_rtab(const char *rtag, const dtrace_difo_t *dp, FILE *fp,
2N/A const dof_relodesc_t *rp, uint32_t len)
2N/A{
2N/A (void) fprintf(fp, "\n%-4s %-8s %-8s %s\n",
2N/A rtag, "OFFSET", "DATA", "NAME");
2N/A
2N/A for (; len != 0; len--, rp++) {
2N/A (void) fprintf(fp, "%-4u %-8llu %-8llu %s\n",
2N/A rp->dofr_type, (u_longlong_t)rp->dofr_offset,
2N/A (u_longlong_t)rp->dofr_data,
2N/A &dp->dtdo_strtab[rp->dofr_name]);
2N/A }
2N/A}
2N/A
2N/Avoid
2N/Adt_dis(const dtrace_difo_t *dp, FILE *fp)
2N/A{
2N/A static const struct opent {
2N/A const char *op_name;
2N/A void (*op_func)(const dtrace_difo_t *, const char *,
2N/A dif_instr_t, FILE *);
2N/A } optab[] = {
2N/A { "(illegal opcode)", dt_dis_str },
2N/A { "or", dt_dis_log }, /* DIF_OP_OR */
2N/A { "xor", dt_dis_log }, /* DIF_OP_XOR */
2N/A { "and", dt_dis_log }, /* DIF_OP_AND */
2N/A { "sll", dt_dis_log }, /* DIF_OP_SLL */
2N/A { "srl", dt_dis_log }, /* DIF_OP_SRL */
2N/A { "sub", dt_dis_log }, /* DIF_OP_SUB */
2N/A { "add", dt_dis_log }, /* DIF_OP_ADD */
2N/A { "mul", dt_dis_log }, /* DIF_OP_MUL */
2N/A { "sdiv", dt_dis_log }, /* DIF_OP_SDIV */
2N/A { "udiv", dt_dis_log }, /* DIF_OP_UDIV */
2N/A { "srem", dt_dis_log }, /* DIF_OP_SREM */
2N/A { "urem", dt_dis_log }, /* DIF_OP_UREM */
2N/A { "not", dt_dis_r1rd }, /* DIF_OP_NOT */
2N/A { "mov", dt_dis_r1rd }, /* DIF_OP_MOV */
2N/A { "cmp", dt_dis_cmp }, /* DIF_OP_CMP */
2N/A { "tst", dt_dis_tst }, /* DIF_OP_TST */
2N/A { "ba", dt_dis_branch }, /* DIF_OP_BA */
2N/A { "be", dt_dis_branch }, /* DIF_OP_BE */
2N/A { "bne", dt_dis_branch }, /* DIF_OP_BNE */
2N/A { "bg", dt_dis_branch }, /* DIF_OP_BG */
2N/A { "bgu", dt_dis_branch }, /* DIF_OP_BGU */
2N/A { "bge", dt_dis_branch }, /* DIF_OP_BGE */
2N/A { "bgeu", dt_dis_branch }, /* DIF_OP_BGEU */
2N/A { "bl", dt_dis_branch }, /* DIF_OP_BL */
2N/A { "blu", dt_dis_branch }, /* DIF_OP_BLU */
2N/A { "ble", dt_dis_branch }, /* DIF_OP_BLE */
2N/A { "bleu", dt_dis_branch }, /* DIF_OP_BLEU */
2N/A { "ldsb", dt_dis_load }, /* DIF_OP_LDSB */
2N/A { "ldsh", dt_dis_load }, /* DIF_OP_LDSH */
2N/A { "ldsw", dt_dis_load }, /* DIF_OP_LDSW */
2N/A { "ldub", dt_dis_load }, /* DIF_OP_LDUB */
2N/A { "lduh", dt_dis_load }, /* DIF_OP_LDUH */
2N/A { "lduw", dt_dis_load }, /* DIF_OP_LDUW */
2N/A { "ldx", dt_dis_load }, /* DIF_OP_LDX */
2N/A { "ret", dt_dis_ret }, /* DIF_OP_RET */
2N/A { "nop", dt_dis_str }, /* DIF_OP_NOP */
2N/A { "setx", dt_dis_setx }, /* DIF_OP_SETX */
2N/A { "sets", dt_dis_sets }, /* DIF_OP_SETS */
2N/A { "scmp", dt_dis_cmp }, /* DIF_OP_SCMP */
2N/A { "ldga", dt_dis_lda }, /* DIF_OP_LDGA */
2N/A { "ldgs", dt_dis_ldv }, /* DIF_OP_LDGS */
2N/A { "stgs", dt_dis_stv }, /* DIF_OP_STGS */
2N/A { "ldta", dt_dis_lda }, /* DIF_OP_LDTA */
2N/A { "ldts", dt_dis_ldv }, /* DIF_OP_LDTS */
2N/A { "stts", dt_dis_stv }, /* DIF_OP_STTS */
2N/A { "sra", dt_dis_log }, /* DIF_OP_SRA */
2N/A { "call", dt_dis_call }, /* DIF_OP_CALL */
2N/A { "pushtr", dt_dis_pushts }, /* DIF_OP_PUSHTR */
2N/A { "pushtv", dt_dis_pushts }, /* DIF_OP_PUSHTV */
2N/A { "popts", dt_dis_str }, /* DIF_OP_POPTS */
2N/A { "flushts", dt_dis_str }, /* DIF_OP_FLUSHTS */
2N/A { "ldgaa", dt_dis_ldv }, /* DIF_OP_LDGAA */
2N/A { "ldtaa", dt_dis_ldv }, /* DIF_OP_LDTAA */
2N/A { "stgaa", dt_dis_stv }, /* DIF_OP_STGAA */
2N/A { "sttaa", dt_dis_stv }, /* DIF_OP_STTAA */
2N/A { "ldls", dt_dis_ldv }, /* DIF_OP_LDLS */
2N/A { "stls", dt_dis_stv }, /* DIF_OP_STLS */
2N/A { "allocs", dt_dis_r1rd }, /* DIF_OP_ALLOCS */
2N/A { "copys", dt_dis_log }, /* DIF_OP_COPYS */
2N/A { "stb", dt_dis_store }, /* DIF_OP_STB */
2N/A { "sth", dt_dis_store }, /* DIF_OP_STH */
2N/A { "stw", dt_dis_store }, /* DIF_OP_STW */
2N/A { "stx", dt_dis_store }, /* DIF_OP_STX */
2N/A { "uldsb", dt_dis_load }, /* DIF_OP_ULDSB */
2N/A { "uldsh", dt_dis_load }, /* DIF_OP_ULDSH */
2N/A { "uldsw", dt_dis_load }, /* DIF_OP_ULDSW */
2N/A { "uldub", dt_dis_load }, /* DIF_OP_ULDUB */
2N/A { "ulduh", dt_dis_load }, /* DIF_OP_ULDUH */
2N/A { "ulduw", dt_dis_load }, /* DIF_OP_ULDUW */
2N/A { "uldx", dt_dis_load }, /* DIF_OP_ULDX */
2N/A { "rldsb", dt_dis_load }, /* DIF_OP_RLDSB */
2N/A { "rldsh", dt_dis_load }, /* DIF_OP_RLDSH */
2N/A { "rldsw", dt_dis_load }, /* DIF_OP_RLDSW */
2N/A { "rldub", dt_dis_load }, /* DIF_OP_RLDUB */
2N/A { "rlduh", dt_dis_load }, /* DIF_OP_RLDUH */
2N/A { "rlduw", dt_dis_load }, /* DIF_OP_RLDUW */
2N/A { "rldx", dt_dis_load }, /* DIF_OP_RLDX */
2N/A { "xlate", dt_dis_xlate }, /* DIF_OP_XLATE */
2N/A { "xlarg", dt_dis_xlate }, /* DIF_OP_XLARG */
2N/A };
2N/A
2N/A const struct opent *op;
2N/A ulong_t i = 0;
2N/A char type[DT_TYPE_NAMELEN];
2N/A
2N/A (void) fprintf(fp, "\nDIFO 0x%p returns %s\n", (void *)dp,
2N/A dt_dis_typestr(&dp->dtdo_rtype, type, sizeof (type)));
2N/A
2N/A (void) fprintf(fp, "%-3s %-8s %s\n",
2N/A "OFF", "OPCODE", "INSTRUCTION");
2N/A
2N/A for (i = 0; i < dp->dtdo_len; i++) {
2N/A dif_instr_t instr = dp->dtdo_buf[i];
2N/A dif_instr_t opcode = DIF_INSTR_OP(instr);
2N/A
2N/A if (opcode >= sizeof (optab) / sizeof (optab[0]))
2N/A opcode = 0; /* force invalid opcode message */
2N/A
2N/A op = &optab[opcode];
2N/A (void) fprintf(fp, "%02lu: %08x ", i, instr);
2N/A op->op_func(dp, op->op_name, instr, fp);
2N/A (void) fprintf(fp, "\n");
2N/A }
2N/A
2N/A if (dp->dtdo_varlen != 0) {
2N/A (void) fprintf(fp, "\n%-16s %-4s %-3s %-3s %-4s %s\n",
2N/A "NAME", "ID", "KND", "SCP", "FLAG", "TYPE");
2N/A }
2N/A
2N/A for (i = 0; i < dp->dtdo_varlen; i++) {
2N/A dtrace_difv_t *v = &dp->dtdo_vartab[i];
2N/A char kind[4], scope[4], flags[16] = { 0 };
2N/A
2N/A switch (v->dtdv_kind) {
2N/A case DIFV_KIND_ARRAY:
2N/A (void) strcpy(kind, "arr");
2N/A break;
2N/A case DIFV_KIND_SCALAR:
2N/A (void) strcpy(kind, "scl");
2N/A break;
2N/A default:
2N/A (void) snprintf(kind, sizeof (kind),
2N/A "%u", v->dtdv_kind);
2N/A }
2N/A
2N/A switch (v->dtdv_scope) {
2N/A case DIFV_SCOPE_GLOBAL:
2N/A (void) strcpy(scope, "glb");
2N/A break;
2N/A case DIFV_SCOPE_THREAD:
2N/A (void) strcpy(scope, "tls");
2N/A break;
2N/A case DIFV_SCOPE_LOCAL:
2N/A (void) strcpy(scope, "loc");
2N/A break;
2N/A default:
2N/A (void) snprintf(scope, sizeof (scope),
2N/A "%u", v->dtdv_scope);
2N/A }
2N/A
2N/A if (v->dtdv_flags & ~(DIFV_F_REF | DIFV_F_MOD)) {
2N/A (void) snprintf(flags, sizeof (flags), "/0x%x",
2N/A v->dtdv_flags & ~(DIFV_F_REF | DIFV_F_MOD));
2N/A }
2N/A
2N/A if (v->dtdv_flags & DIFV_F_REF)
2N/A (void) strcat(flags, "/r");
2N/A if (v->dtdv_flags & DIFV_F_MOD)
2N/A (void) strcat(flags, "/w");
2N/A
2N/A (void) fprintf(fp, "%-16s %-4x %-3s %-3s %-4s %s\n",
2N/A &dp->dtdo_strtab[v->dtdv_name],
2N/A v->dtdv_id, kind, scope, flags + 1,
2N/A dt_dis_typestr(&v->dtdv_type, type, sizeof (type)));
2N/A }
2N/A
2N/A if (dp->dtdo_xlmlen != 0) {
2N/A (void) fprintf(fp, "\n%-4s %-3s %-12s %s\n",
2N/A "XLID", "ARG", "MEMBER", "TYPE");
2N/A }
2N/A
2N/A for (i = 0; i < dp->dtdo_xlmlen; i++) {
2N/A dt_node_t *dnp = dp->dtdo_xlmtab[i];
2N/A dt_xlator_t *dxp = dnp->dn_membexpr->dn_xlator;
2N/A (void) fprintf(fp, "%-4u %-3d %-12s %s\n",
2N/A (uint_t)dxp->dx_id, dxp->dx_arg, dnp->dn_membname,
2N/A dt_node_type_name(dnp, type, sizeof (type)));
2N/A }
2N/A
2N/A if (dp->dtdo_krelen != 0)
2N/A dt_dis_rtab("KREL", dp, fp, dp->dtdo_kreltab, dp->dtdo_krelen);
2N/A
2N/A if (dp->dtdo_urelen != 0)
2N/A dt_dis_rtab("UREL", dp, fp, dp->dtdo_ureltab, dp->dtdo_urelen);
2N/A}