4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
35 #define FLAGSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \
36 MSG_TLS_FLAG_STATIC_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
37 CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE
40 Dbg_tls_modent(Lm_list
*lml
, TLS_modinfo
* tmodent
)
43 * MSG_ORIG(MSG_TLS_FLAG_STATIC)
45 static char flagstr
[FLAGSZ
];
46 static Val_desc vda
[] = {
47 { TM_FLG_STATICTLS
, MSG_TLS_FLAG_STATIC
},
50 static CONV_EXPN_FIELD_ARG conv_arg
= { flagstr
, sizeof (flagstr
) };
54 if ((flags
= tmodent
->tm_flags
) != 0) {
55 conv_arg
.oflags
= conv_arg
.rflags
= flags
;
56 (void) conv_expn_field(&conv_arg
, vda
, 0);
61 dbg_print(lml
, MSG_INTL(MSG_TLS_MODENT1
),
62 EC_XWORD((uintptr_t)tmodent
->tm_tlsblock
),
63 EC_XWORD(tmodent
->tm_stattlsoffset
), EC_XWORD(tmodent
->tm_flags
),
65 dbg_print(lml
, MSG_INTL(MSG_TLS_MODENT2
),
66 EC_XWORD(tmodent
->tm_filesz
), EC_XWORD(tmodent
->tm_memsz
),
67 EC_XWORD(tmodent
->tm_modid
));
71 Dbg_tls_static_block(Lm_list
*lml
, void *list
, ulong_t size
, ulong_t resv
)
73 if (DBG_NOTCLASS(DBG_C_TLS
))
76 Dbg_util_nl(lml
, DBG_NL_STD
);
80 TLS_modinfo
**tlsmodlist
;
82 tlsmodlist
= (TLS_modinfo
**)list
;
84 for (ndx
= 0; tlsmodlist
[ndx
]; ndx
++) {
85 dbg_print(lml
, MSG_INTL(MSG_TLS_STATBLOCK1
), ndx
,
86 tlsmodlist
[ndx
]->tm_modname
);
87 Dbg_tls_modent(lml
, tlsmodlist
[ndx
]);
88 Dbg_util_nl(lml
, DBG_NL_STD
);
91 dbg_print(lml
, MSG_INTL(MSG_TLS_STATBLOCK2
), EC_XWORD(size
),
96 Dbg_tls_static_resv(Rt_map
*lmp
, ulong_t size
, ulong_t resv
)
98 Lm_list
*lml
= LIST(lmp
);
100 if (DBG_NOTCLASS(DBG_C_TLS
))
103 Dbg_util_nl(lml
, DBG_NL_STD
);
104 dbg_print(lml
, MSG_INTL(MSG_TLS_STATBLOCK3
), TLSMODID(lmp
), NAME(lmp
),
105 EC_XWORD(size
), EC_XWORD(resv
));
109 Dbg_tls_modactivity(Lm_list
*lml
, void *vtlsmodent
, uint_t flag
)
112 TLS_modinfo
*tlsmodent
;
114 if (DBG_NOTCLASS(DBG_C_TLS
))
117 if (flag
== TM_FLG_MODADD
)
118 str
= MSG_INTL(MSG_TLS_ADD
);
120 str
= MSG_INTL(MSG_TLS_REMOVE
);
122 tlsmodent
= (TLS_modinfo
*)vtlsmodent
;
123 Dbg_util_nl(lml
, DBG_NL_STD
);
124 dbg_print(lml
, MSG_INTL(MSG_TLS_MODACT
), str
, tlsmodent
->tm_modname
);
125 Dbg_tls_modent(lml
, tlsmodent
);