10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
51618Srie * Common Development and Distribution License (the "License").
61618Srie * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate *
80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate * See the License for the specific language governing permissions
110Sstevel@tonic-gate * and limitations under the License.
120Sstevel@tonic-gate *
130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate *
190Sstevel@tonic-gate * CDDL HEADER END
200Sstevel@tonic-gate */
211618Srie
220Sstevel@tonic-gate /*
23*8324SAli.Bahrami@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
241618Srie * Use is subject to license terms.
250Sstevel@tonic-gate */
260Sstevel@tonic-gate
270Sstevel@tonic-gate #include "msg.h"
280Sstevel@tonic-gate #include "_debug.h"
290Sstevel@tonic-gate
300Sstevel@tonic-gate void
Dbg_support_req(Lm_list * lml,const char * define,int flag)311618Srie Dbg_support_req(Lm_list *lml, const char *define, int flag)
320Sstevel@tonic-gate {
330Sstevel@tonic-gate const char *str;
340Sstevel@tonic-gate
351618Srie if (DBG_NOTCLASS(DBG_C_SUPPORT))
360Sstevel@tonic-gate return;
370Sstevel@tonic-gate
38*8324SAli.Bahrami@Sun.COM switch (flag) {
39*8324SAli.Bahrami@Sun.COM case DBG_SUP_ENVIRON:
400Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_REQ_ENV);
41*8324SAli.Bahrami@Sun.COM break;
42*8324SAli.Bahrami@Sun.COM case DBG_SUP_CMDLINE:
430Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_REQ_CMD);
44*8324SAli.Bahrami@Sun.COM break;
45*8324SAli.Bahrami@Sun.COM default:
46*8324SAli.Bahrami@Sun.COM str = MSG_ORIG(MSG_STR_EMPTY);
47*8324SAli.Bahrami@Sun.COM break;
48*8324SAli.Bahrami@Sun.COM }
490Sstevel@tonic-gate
501618Srie dbg_print(lml, MSG_ORIG(MSG_STR_EMPTY));
511618Srie dbg_print(lml, MSG_INTL(MSG_SUP_REQ), define, str);
520Sstevel@tonic-gate }
530Sstevel@tonic-gate
540Sstevel@tonic-gate void
Dbg_support_load(Lm_list * lml,const char * obj,const char * func)551618Srie Dbg_support_load(Lm_list *lml, const char *obj, const char *func)
560Sstevel@tonic-gate {
571618Srie if (DBG_NOTCLASS(DBG_C_SUPPORT))
580Sstevel@tonic-gate return;
590Sstevel@tonic-gate
601618Srie dbg_print(lml, MSG_INTL(MSG_SUP_ROUTINE), obj, func);
610Sstevel@tonic-gate }
620Sstevel@tonic-gate
630Sstevel@tonic-gate void
Dbg_support_vnone(Lm_list * lml,const char * obj)64*8324SAli.Bahrami@Sun.COM Dbg_support_vnone(Lm_list *lml, const char *obj)
65*8324SAli.Bahrami@Sun.COM {
66*8324SAli.Bahrami@Sun.COM if (DBG_NOTCLASS(DBG_C_SUPPORT))
67*8324SAli.Bahrami@Sun.COM return;
68*8324SAli.Bahrami@Sun.COM
69*8324SAli.Bahrami@Sun.COM dbg_print(lml, MSG_INTL(MSG_SUP_VNONE), obj);
70*8324SAli.Bahrami@Sun.COM }
71*8324SAli.Bahrami@Sun.COM
72*8324SAli.Bahrami@Sun.COM void
Dbg_support_action(Lm_list * lml,const char * obj,const char * func,Support_ndx ndx,const char * name)731618Srie Dbg_support_action(Lm_list *lml, const char *obj, const char *func,
741618Srie Support_ndx ndx, const char *name)
750Sstevel@tonic-gate {
760Sstevel@tonic-gate const char *str;
770Sstevel@tonic-gate
781618Srie if (DBG_NOTCLASS(DBG_C_SUPPORT))
790Sstevel@tonic-gate return;
800Sstevel@tonic-gate if (DBG_NOTDETAIL())
810Sstevel@tonic-gate return;
820Sstevel@tonic-gate
830Sstevel@tonic-gate if (ndx == LDS_START)
840Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_OUTFILE);
852978Srie else if ((ndx == LDS_OPEN) || (ndx == LDS_FILE))
860Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_INFILE);
872850Srie else if (ndx == LDS_INSEC)
880Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_INSEC);
892850Srie else if (ndx == LDS_SEC)
900Sstevel@tonic-gate str = MSG_INTL(MSG_SUP_SEC);
910Sstevel@tonic-gate
920Sstevel@tonic-gate if ((ndx == LDS_ATEXIT) || (ndx == LDS_VERSION) ||
930Sstevel@tonic-gate (ndx == LDS_INPUT_DONE))
941618Srie dbg_print(lml, MSG_INTL(MSG_SUP_CALLING_1), func, obj);
950Sstevel@tonic-gate else
961618Srie dbg_print(lml, MSG_INTL(MSG_SUP_CALLING_2), func, obj,
971618Srie str, name);
980Sstevel@tonic-gate }
99