summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-05-31 14:46:38 +0000
committermdodd <mdodd@FreeBSD.org>2003-05-31 14:46:38 +0000
commit59d2c4e02e31313116f2f37f280841d3247e6da5 (patch)
tree86480651d8f027d0a857b455ce5d9b1ed85cda26 /libexec
parentf365a266e11ce21eb038986db228367c55a6de5d (diff)
downloadFreeBSD-src-59d2c4e02e31313116f2f37f280841d3247e6da5.zip
FreeBSD-src-59d2c4e02e31313116f2f37f280841d3247e6da5.tar.gz
Provide function entry debugging messages.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/libmap.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/libexec/rtld-elf/libmap.c b/libexec/rtld-elf/libmap.c
index f5dd372..6a66ce1 100644
--- a/libexec/rtld-elf/libmap.c
+++ b/libexec/rtld-elf/libmap.c
@@ -49,6 +49,8 @@ lm_init (void)
char prog[MAXPATHLEN];
char line[MAXPATHLEN + 2];
+ dbg("%s()", __func__);
+
TAILQ_INIT(&lmp_head);
if ((fp = fopen(_PATH_LIBMAP_CONF, "r")) == NULL)
@@ -133,6 +135,8 @@ lm_free (struct lm_list *lml)
{
struct lm *lm;
+ dbg("%s(%p)", __func__, lml);
+
while (!TAILQ_EMPTY(lml)) {
lm = TAILQ_FIRST(lml);
TAILQ_REMOVE(lml, lm, lm_link);
@@ -148,6 +152,8 @@ lm_fini (void)
{
struct lmp *lmp;
+ dbg("%s()", __func__);
+
while (!TAILQ_EMPTY(&lmp_head)) {
lmp = TAILQ_FIRST(&lmp_head);
TAILQ_REMOVE(&lmp_head, lmp, lmp_link);
@@ -167,6 +173,8 @@ lm_add (const char *p, const char *f, const char *t)
if (p == NULL)
p = "$DEFAULT$";
+ dbg("%s(\"%s\", \"%s\", \"%s\")", __func__, p, f, t);
+
if ((lml = lmp_find(p)) == NULL)
lml = lmp_init(xstrdup(p));
@@ -182,6 +190,8 @@ lm_find (const char *p, const char *f)
struct lm_list *lml;
char *t;
+ dbg("%s(\"%s\", \"%s\")", __func__, p, f);
+
if (p != NULL && (lml = lmp_find(p)) != NULL) {
t = lml_find(lml, f);
if (t != NULL) {
@@ -205,6 +215,8 @@ lml_find (struct lm_list *lmh, const char *f)
{
struct lm *lm;
+ dbg("%s(%p, \"%s\")", __func__, lmh, f);
+
TAILQ_FOREACH(lm, lmh, lm_link)
if ((strncmp(f, lm->f, strlen(lm->f)) == 0) &&
(strlen(f) == strlen(lm->f)))
@@ -217,6 +229,8 @@ lmp_find (const char *n)
{
struct lmp *lmp;
+ dbg("%s(\"%s\")", __func__, n);
+
TAILQ_FOREACH(lmp, &lmp_head, lmp_link)
if ((strncmp(n, lmp->p, strlen(lmp->p)) == 0) &&
(strlen(n) == strlen(lmp->p)))
@@ -229,6 +243,8 @@ lmp_init (char *n)
{
struct lmp *lmp;
+ dbg("%s(\"%s\")", __func__, n);
+
lmp = xmalloc(sizeof(struct lmp));
lmp->p = n;
TAILQ_INIT(&lmp->lml);
@@ -236,4 +252,3 @@ lmp_init (char *n)
return (&lmp->lml);
}
-
OpenPOWER on IntegriCloud