dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / sgs / liblddbg / common / move.c
blob2fd99624aed308dcc97978519be525a181e09dd9
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 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #include "msg.h"
28 #include "_debug.h"
29 #include "libld.h"
31 void
32 Dbg_move_data(Rt_map *lmp)
34 Lm_list *lml = LIST(lmp);
36 if (DBG_NOTCLASS(DBG_C_MOVE))
37 return;
39 dbg_print(lml, MSG_INTL(MSG_MOVE_FILE), NAME(lmp));
40 dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE2));
43 void
44 Dbg_move_adjexpandreloc(Lm_list *lml, Xword offset, const char *name)
46 if (DBG_NOTCLASS(DBG_C_MOVE | DBG_C_RELOC))
47 return;
48 if (DBG_NOTDETAIL())
49 return;
51 dbg_print(lml, MSG_INTL(MSG_MOVE_ADJEXPAND), Dbg_demangle_name(name),
52 EC_XWORD(offset));
55 void
56 Dbg_move_adjmovereloc(Lm_list *lml, Xword offset1, Xword offset2,
57 const char *name)
59 if (DBG_NOTCLASS(DBG_C_MOVE | DBG_C_RELOC))
60 return;
61 if (DBG_NOTDETAIL())
62 return;
64 dbg_print(lml, MSG_INTL(MSG_MOVE_ADJMOVE), Dbg_demangle_name(name),
65 EC_XWORD(offset1), EC_XWORD(offset2));
68 void
69 Dbg_move_outsctadj(Lm_list *lml, Sym_desc *sdp)
71 if (DBG_NOTCLASS(DBG_C_MOVE | DBG_C_RELOC))
72 return;
73 if (DBG_NOTDETAIL())
74 return;
76 dbg_print(lml, MSG_INTL(MSG_MOVE_OUTSCTADJ),
77 Dbg_demangle_name(sdp->sd_name));
80 void
81 Dbg_move_parexpn(Lm_list *lml, const char *name, const char *reason)
83 if (DBG_NOTCLASS(DBG_C_MOVE))
84 return;
86 Dbg_util_nl(lml, DBG_NL_STD);
87 dbg_print(lml, MSG_INTL(MSG_MOVE_PAREXPN), name, reason);
88 dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
91 void
92 Dbg_move_outmove(Lm_list *lml, const char *name)
94 if (DBG_NOTCLASS(DBG_C_MOVE))
95 return;
97 Dbg_util_nl(lml, DBG_NL_STD);
98 dbg_print(lml, MSG_INTL(MSG_MOVE_OUTMOVE), name);
99 dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
102 void
103 Dbg_move_expand(Lm_list *lml, Move *mv, Addr addr)
105 if (DBG_NOTCLASS(DBG_C_MOVE))
106 return;
108 dbg_print(lml, MSG_INTL(MSG_MOVE_EXPAND), EC_ADDR(addr),
109 EC_LWORD(mv->m_value));
112 void
113 Dbg_move_input(Lm_list *lml, const char *name)
115 if (DBG_NOTCLASS(DBG_C_MOVE))
116 return;
118 Dbg_util_nl(lml, DBG_NL_STD);
119 dbg_print(lml, MSG_INTL(MSG_MOVE_INPUT), name);
120 dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1));
123 void
124 Dbg_move_entry1(Lm_list *lml, int which, Move *mv, Sym_desc *s)
126 const char *str;
128 if (DBG_NOTCLASS(DBG_C_MOVE))
129 return;
131 if (which)
132 str = MSG_INTL(MSG_MOVE_ENTRYIN);
133 else
134 str = MSG_INTL(MSG_MOVE_ENTRYOUT);
136 dbg_print(lml, str, EC_XWORD(mv->m_poffset), ELF_M_SIZE(mv->m_info),
137 mv->m_repeat, mv->m_stride, EC_LWORD(mv->m_value), s->sd_name);
140 void
141 Dbg_move_entry2(Lm_list *lml, Move *mv, Word st_name, const char *name)
143 const char *sname;
145 if (DBG_NOTCLASS(DBG_C_MOVE))
146 return;
148 if (st_name)
149 sname = name;
150 else
151 sname = MSG_INTL(MSG_STR_UNKNOWN);
153 dbg_print(lml, MSG_INTL(MSG_MOVE_ENTRYIN), EC_XWORD(mv->m_poffset),
154 ELF_M_SIZE(mv->m_info), mv->m_repeat, mv->m_stride,
155 EC_LWORD(mv->m_value), sname);
158 void
159 Dbg_move_bad(Lm_list *lml, ulong_t num, const char *name, Addr addr)
161 if (DBG_NOTCLASS(DBG_C_MOVE))
162 return;
164 dbg_print(lml, MSG_INTL(MSG_MOVE_BAD), EC_XWORD(num), name,
165 EC_ADDR(addr));