xref: /titanic_52/usr/src/cmd/sgs/liblddbg/common/basic.c (revision 3ed621bc8eb70ee11c69cd408fb8450eac33c281)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #include	<debug.h>
28 #include	"_debug.h"
29 #include	"msg.h"
30 
31 /*
32  * This file contains a number of simple title interfaces, that give a basic
33  * trace of a link-edit.  These interfaces cross several functional boundaries,
34  * but are consolidated here to ensure consistent use of the DBG_C_BASIC and
35  * DBG_NOTTIME macros.
36  */
37 void
38 Dbg_basic_collect(Lm_list *lml)
39 {
40 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
41 		return;
42 
43 	Dbg_util_nl(lml, DBG_NL_STD);
44 	dbg_print(lml, MSG_INTL(MSG_BASIC_COLLECT));
45 	Dbg_util_nl(lml, DBG_NL_STD);
46 }
47 
48 void
49 Dbg_basic_create(Lm_list *lml)
50 {
51 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
52 		return;
53 
54 	Dbg_util_nl(lml, DBG_NL_STD);
55 	dbg_print(lml, MSG_INTL(MSG_BASIC_CREATE));
56 	Dbg_util_nl(lml, DBG_NL_STD);
57 }
58 
59 void
60 Dbg_basic_files(Lm_list *lml)
61 {
62 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
63 		return;
64 
65 	Dbg_util_nl(lml, DBG_NL_STD);
66 	dbg_print(lml, MSG_INTL(MSG_BASIC_FILES));
67 	Dbg_util_nl(lml, DBG_NL_STD);
68 }
69 void
70 Dbg_basic_finish(Lm_list *lml)
71 {
72 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
73 		return;
74 
75 	Dbg_util_nl(lml, DBG_NL_STD);
76 	dbg_print(lml, MSG_INTL(MSG_BASIC_FINISHED));
77 	Dbg_util_nl(lml, DBG_NL_STD);
78 }
79 
80 void
81 Dbg_basic_options(Lm_list *lml)
82 {
83 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
84 		return;
85 
86 	Dbg_util_nl(lml, DBG_NL_STD);
87 	dbg_print(lml, MSG_INTL(MSG_BASIC_OPTIONS));
88 	Dbg_util_nl(lml, DBG_NL_STD);
89 }
90 
91 void
92 Dbg_basic_relocate(Lm_list *lml)
93 {
94 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
95 		return;
96 
97 	Dbg_util_nl(lml, DBG_NL_STD);
98 	dbg_print(lml, MSG_INTL(MSG_BASIC_RELOCATE));
99 	Dbg_util_nl(lml, DBG_NL_STD);
100 }
101 
102 void
103 Dbg_basic_validate(Lm_list *lml)
104 {
105 	if (DBG_NOTCLASS(DBG_C_BASIC) && DBG_NOTTIME())
106 		return;
107 
108 	Dbg_util_nl(lml, DBG_NL_STD);
109 	dbg_print(lml, MSG_INTL(MSG_BASIC_VALIDATE));
110 	Dbg_util_nl(lml, DBG_NL_STD);
111 }
112