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 (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
33 Dbg_audit_lib(Rt_map
*clmp
, const char *lib
, int type
)
35 Lm_list
*clml
= LIST(clmp
);
38 if (DBG_NOTCLASS(DBG_C_AUDITING
))
41 Dbg_util_nl(clml
, DBG_NL_STD
);
44 str
= MSG_ORIG(MSG_AUD_PRELOAD
);
47 str
= MSG_ORIG(MSG_AUD_GLOBAL
);
52 str
= MSG_ORIG(MSG_STR_EMPTY
);
55 dbg_print(clml
, MSG_INTL(MSG_AUD_LIB
), lib
, NAME(clmp
), str
);
59 Dbg_audit_interface(Lm_list
*lml
, const char *lib
, const char *interface
)
61 if (DBG_NOTCLASS(DBG_C_AUDITING
))
64 dbg_print(lml
, MSG_INTL(MSG_AUD_INTERFACE
), lib
, interface
);
68 Dbg_audit_version(Lm_list
*lml
, const char *lib
, uint_t overs
, uint_t nvers
)
70 if (DBG_NOTCLASS(DBG_C_AUDITING
))
73 dbg_print(lml
, MSG_INTL(MSG_AUD_VERSION
), lib
, overs
, nvers
);
77 Dbg_audit_activity(Lm_list
*lml
, const char *lib
, const char *obj
, uint_t flags
)
79 Conv_inv_buf_t inv_buf
;
81 if (DBG_NOTCLASS(DBG_C_AUDITING
))
84 Dbg_util_nl(lml
, DBG_NL_STD
);
85 dbg_print(lml
, MSG_INTL(MSG_AUD_ACTIVITY
), lib
, obj
,
86 conv_la_activity(flags
, CONV_FMT_ALT_DEFAULT
, &inv_buf
));
90 Dbg_audit_preinit(Lm_list
*lml
, const char *lib
, const char *obj
)
92 if (DBG_NOTCLASS(DBG_C_AUDITING
))
95 Dbg_util_nl(lml
, DBG_NL_STD
);
96 dbg_print(lml
, MSG_INTL(MSG_AUD_PREINIT
), lib
, obj
);
100 Dbg_audit_objsearch(Lm_list
*lml
, int call
, const char *lib
,
101 const char *oobj
, uint_t flags
, const char *nobj
)
103 Conv_la_search_buf_t la_search_buf
;
105 if (DBG_NOTCLASS(DBG_C_AUDITING
))
108 if (call
== DBG_AUD_CALL
) {
109 Dbg_util_nl(lml
, DBG_NL_STD
);
110 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJSEARCH
), lib
, oobj
,
111 conv_la_search(flags
, &la_search_buf
));
114 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJSEARCH_R
), lib
,
117 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJSEARCH_S
), lib
,
123 Dbg_audit_objfilter(Lm_list
*lml
, int call
, const char *lib
,
124 const char *filter
, const char *filtee
, const char *ref
)
126 if (DBG_NOTCLASS(DBG_C_AUDITING
))
129 if (call
== DBG_AUD_CALL
) {
130 Dbg_util_nl(lml
, DBG_NL_STD
);
131 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJFILTER
), lib
, filter
,
134 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJFILTER_R
), lib
, filter
);
138 Dbg_audit_objopen(Lm_list
*lml
, int call
, const char *lib
, const char *obj
,
139 uint_t flags
, Boolean ignore
)
141 Conv_la_bind_buf_t la_bind_buf
;
143 if (DBG_NOTCLASS(DBG_C_AUDITING
))
146 if (call
== DBG_AUD_CALL
) {
147 Dbg_util_nl(lml
, DBG_NL_STD
);
148 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJOPEN
), lib
, obj
);
151 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJOPEN_RI
), lib
, obj
,
152 conv_la_bind(flags
, &la_bind_buf
));
154 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJOPEN_R
), lib
, obj
,
155 conv_la_bind(flags
, &la_bind_buf
));
160 Dbg_audit_objclose(Lm_list
*lml
, const char *lib
, const char *obj
)
162 if (DBG_NOTCLASS(DBG_C_AUDITING
))
165 Dbg_util_nl(lml
, DBG_NL_STD
);
166 dbg_print(lml
, MSG_INTL(MSG_AUD_OBJCLOSE
), lib
, obj
);
170 Dbg_audit_symbind(Lm_list
*lml
, int call
, const char *lib
, const char *name
,
171 Addr value
, uint_t flags
)
173 Conv_la_symbind_buf_t la_symbind_buf
;
175 if (DBG_NOTCLASS(DBG_C_AUDITING
))
178 if (call
== DBG_AUD_CALL
) {
179 Dbg_util_nl(lml
, DBG_NL_STD
);
180 dbg_print(lml
, MSG_INTL(MSG_AUD_SYMBIND
), lib
, name
,
181 EC_XWORD(value
), conv_la_symbind(flags
, &la_symbind_buf
));
183 dbg_print(lml
, MSG_INTL(MSG_AUD_SYMBIND_R
), lib
, name
,
184 EC_XWORD(value
), conv_la_symbind(flags
, &la_symbind_buf
));
189 Dbg_audit_pltenter(Lm_list
*lml
, int call
, const char *lib
, const char *name
,
192 if (DBG_NOTCLASS(DBG_C_AUDITING
))
195 if (call
== DBG_AUD_CALL
) {
196 Dbg_util_nl(lml
, DBG_NL_STD
);
197 dbg_print(lml
, MSG_INTL(MSG_AUD_PLTENTER
), lib
, name
,
200 dbg_print(lml
, MSG_INTL(MSG_AUD_PLTENTER_R
), lib
, name
,
206 Dbg_audit_pltexit(Lm_list
*lml
, const char *lib
, const char *name
)
208 if (DBG_NOTCLASS(DBG_C_AUDITING
))
211 dbg_print(lml
, MSG_INTL(MSG_AUD_PLTEXIT
), lib
, name
);
215 Dbg_audit_skip(Lm_list
*lml
, const char *name
, const char *lmid
)
217 if (DBG_NOTCLASS(DBG_C_AUDITING
| DBG_C_FILES
))
220 dbg_print(lml
, MSG_INTL(MSG_AUD_SKIP
), name
, lmid
);
224 Dbg_audit_terminate(Lm_list
*lml
, const char *name
)
226 if (DBG_NOTCLASS(DBG_C_FILES
))
229 dbg_print(lml
, MSG_INTL(MSG_AUD_TERM
), name
);
233 Dbg_audit_ignore(Rt_map
*lmp
)
235 if (DBG_NOTCLASS(DBG_C_AUDITING
| DBG_C_FILES
))
238 dbg_print(LIST(lmp
), MSG_INTL(MSG_AUD_IGNORE
), NAME(lmp
));