17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
55aefb655Srie * Common Development and Distribution License (the "License").
65aefb655Srie * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
215aefb655Srie
227c478bd9Sstevel@tonic-gate /*
23*d2d5cf7cSAli Bahrami * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
245aefb655Srie * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate */
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gate #include "msg.h"
287c478bd9Sstevel@tonic-gate #include "_debug.h"
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate void
Dbg_support_req(Lm_list * lml,const char * define,int flag)315aefb655Srie Dbg_support_req(Lm_list *lml, const char *define, int flag)
327c478bd9Sstevel@tonic-gate {
337c478bd9Sstevel@tonic-gate const char *str;
347c478bd9Sstevel@tonic-gate
355aefb655Srie if (DBG_NOTCLASS(DBG_C_SUPPORT))
367c478bd9Sstevel@tonic-gate return;
377c478bd9Sstevel@tonic-gate
38*d2d5cf7cSAli Bahrami switch (flag) {
39*d2d5cf7cSAli Bahrami case DBG_SUP_ENVIRON:
407c478bd9Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_REQ_ENV);
41*d2d5cf7cSAli Bahrami break;
42*d2d5cf7cSAli Bahrami case DBG_SUP_CMDLINE:
437c478bd9Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_REQ_CMD);
44*d2d5cf7cSAli Bahrami break;
45*d2d5cf7cSAli Bahrami default:
46*d2d5cf7cSAli Bahrami str = MSG_ORIG(MSG_STR_EMPTY);
47*d2d5cf7cSAli Bahrami break;
48*d2d5cf7cSAli Bahrami }
497c478bd9Sstevel@tonic-gate
505aefb655Srie dbg_print(lml, MSG_ORIG(MSG_STR_EMPTY));
515aefb655Srie dbg_print(lml, MSG_INTL(MSG_SUP_REQ), define, str);
527c478bd9Sstevel@tonic-gate }
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate void
Dbg_support_load(Lm_list * lml,const char * obj,const char * func)555aefb655Srie Dbg_support_load(Lm_list *lml, const char *obj, const char *func)
567c478bd9Sstevel@tonic-gate {
575aefb655Srie if (DBG_NOTCLASS(DBG_C_SUPPORT))
587c478bd9Sstevel@tonic-gate return;
597c478bd9Sstevel@tonic-gate
605aefb655Srie dbg_print(lml, MSG_INTL(MSG_SUP_ROUTINE), obj, func);
617c478bd9Sstevel@tonic-gate }
627c478bd9Sstevel@tonic-gate
63*d2d5cf7cSAli Bahrami void
Dbg_support_vnone(Lm_list * lml,const char * obj)64*d2d5cf7cSAli Bahrami Dbg_support_vnone(Lm_list *lml, const char *obj)
65*d2d5cf7cSAli Bahrami {
66*d2d5cf7cSAli Bahrami if (DBG_NOTCLASS(DBG_C_SUPPORT))
67*d2d5cf7cSAli Bahrami return;
68*d2d5cf7cSAli Bahrami
69*d2d5cf7cSAli Bahrami dbg_print(lml, MSG_INTL(MSG_SUP_VNONE), obj);
70*d2d5cf7cSAli Bahrami }
71*d2d5cf7cSAli Bahrami
727c478bd9Sstevel@tonic-gate void
Dbg_support_action(Lm_list * lml,const char * obj,const char * func,Support_ndx ndx,const char * name)735aefb655Srie Dbg_support_action(Lm_list *lml, const char *obj, const char *func,
745aefb655Srie Support_ndx ndx, const char *name)
757c478bd9Sstevel@tonic-gate {
767c478bd9Sstevel@tonic-gate const char *str;
777c478bd9Sstevel@tonic-gate
785aefb655Srie if (DBG_NOTCLASS(DBG_C_SUPPORT))
797c478bd9Sstevel@tonic-gate return;
807c478bd9Sstevel@tonic-gate if (DBG_NOTDETAIL())
817c478bd9Sstevel@tonic-gate return;
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gate if (ndx == LDS_START)
847c478bd9Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_OUTFILE);
853906e0c2Srie else if ((ndx == LDS_OPEN) || (ndx == LDS_FILE))
867c478bd9Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_INFILE);
872926dd2eSrie else if (ndx == LDS_INSEC)
887c478bd9Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_INSEC);
892926dd2eSrie else if (ndx == LDS_SEC)
907c478bd9Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_SEC);
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate if ((ndx == LDS_ATEXIT) || (ndx == LDS_VERSION) ||
937c478bd9Sstevel@tonic-gate (ndx == LDS_INPUT_DONE))
945aefb655Srie dbg_print(lml, MSG_INTL(MSG_SUP_CALLING_1), func, obj);
957c478bd9Sstevel@tonic-gate else
965aefb655Srie dbg_print(lml, MSG_INTL(MSG_SUP_CALLING_2), func, obj,
975aefb655Srie str, name);
987c478bd9Sstevel@tonic-gate }
99