util.c revision 5aefb6555731130ca4fd295960123d71f2d21fe8
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "msg.h"
#include "_debug.h"
#include "libld.h"
/*
* If any run-time linker debugging is being carried out always indicate the
* fact and specify the point at which we transfer control to the main program.
*/
void
{
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (flag == DBG_INIT_SORT)
else if (flag == DBG_INIT_PEND)
else if (flag == DBG_INIT_DYN)
else
}
void
{
if (DBG_NOTCLASS(DBG_C_INIT))
return;
}
void
{
}
void
{
const char *estr;
const char *sstr;
if (DBG_NOTCLASS(DBG_C_FILES))
return;
if (DBG_NOTDETAIL())
return;
switch (event) {
case RD_PREINIT:
break;
case RD_POSTINIT:
break;
case RD_DLACTIVITY:
switch (state) {
case RT_CONSISTENT:
break;
case RT_ADD:
break;
case RT_DELETE:
break;
default:
break;
}
break;
default:
break;
}
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (shtype == SHT_INIT_ARRAY)
else if (shtype == SHT_FINI_ARRAY)
else
}
void
{
if (DBG_NOTCLASS(DBG_C_INIT))
return;
}
void
{
}
void
{
const char *_sec;
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
if (sec)
else
}
void
{
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
}
void
{
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
if (what == DBG_WAIT_INIT)
else if (what == DBG_WAIT_FINI)
else
}
static int ectoggle = 0;
void
{
const char *str;
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
if (flag & RT_SORT_REV)
else
if (clmp == 0) {
} else
ectoggle = 1;
}
void
{
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
}
void
{
const char *str;
if (DBG_NOTCLASS(DBG_C_INIT))
return;
if (DBG_NOTDETAIL())
return;
if (flag & RT_SORT_REV)
else
if (ectoggle == 1) {
ectoggle = 0;
}
}
/*
* Generic new line generator. To prevent multiple newlines from being
* generated, a flag is maintained in the global debug descriptor. This flag
* is cleared by the callers dbg_print() function to indicate that a newline
* (actually, any line) has been printed. Multiple newlines can be generated
* using the DBG_NL_FRC flag.
*/
void
{
return;
if (flag == DBG_NL_STD)
}
/*
* Define name demanglers.
*/
const char *
Dbg_demangle_name(const char *name)
{
if (DBG_NOTCLASS(DBG_C_DEMANGLE))
return (name);
return (conv_demangle_name(name));
}
const char *
Elf_demangle_name(const char *name)
{
if (DBG_ISDEMANGLE())
return (conv_demangle_name(name));
return (name);
}