dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / sgs / liblddbg / common / support.c
blobb018b9ae91fd99b77d7cac37e228b2ed8e1fe5da
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #include "msg.h"
28 #include "_debug.h"
30 void
31 Dbg_support_req(Lm_list *lml, const char *define, int flag)
33 const char *str;
35 if (DBG_NOTCLASS(DBG_C_SUPPORT))
36 return;
38 switch (flag) {
39 case DBG_SUP_ENVIRON:
40 str = MSG_INTL(MSG_SUP_REQ_ENV);
41 break;
42 case DBG_SUP_CMDLINE:
43 str = MSG_INTL(MSG_SUP_REQ_CMD);
44 break;
45 default:
46 str = MSG_ORIG(MSG_STR_EMPTY);
47 break;
50 dbg_print(lml, MSG_ORIG(MSG_STR_EMPTY));
51 dbg_print(lml, MSG_INTL(MSG_SUP_REQ), define, str);
54 void
55 Dbg_support_load(Lm_list *lml, const char *obj, const char *func)
57 if (DBG_NOTCLASS(DBG_C_SUPPORT))
58 return;
60 dbg_print(lml, MSG_INTL(MSG_SUP_ROUTINE), obj, func);
63 void
64 Dbg_support_vnone(Lm_list *lml, const char *obj)
66 if (DBG_NOTCLASS(DBG_C_SUPPORT))
67 return;
69 dbg_print(lml, MSG_INTL(MSG_SUP_VNONE), obj);
72 void
73 Dbg_support_action(Lm_list *lml, const char *obj, const char *func,
74 Support_ndx ndx, const char *name)
76 const char *str;
78 if (DBG_NOTCLASS(DBG_C_SUPPORT))
79 return;
80 if (DBG_NOTDETAIL())
81 return;
83 if (ndx == LDS_START)
84 str = MSG_INTL(MSG_SUP_OUTFILE);
85 else if ((ndx == LDS_OPEN) || (ndx == LDS_FILE))
86 str = MSG_INTL(MSG_SUP_INFILE);
87 else if (ndx == LDS_INSEC)
88 str = MSG_INTL(MSG_SUP_INSEC);
89 else if (ndx == LDS_SEC)
90 str = MSG_INTL(MSG_SUP_SEC);
92 if ((ndx == LDS_ATEXIT) || (ndx == LDS_VERSION) ||
93 (ndx == LDS_INPUT_DONE))
94 dbg_print(lml, MSG_INTL(MSG_SUP_CALLING_1), func, obj);
95 else
96 dbg_print(lml, MSG_INTL(MSG_SUP_CALLING_2), func, obj,
97 str, name);