Module Name: src Committed By: riastradh Date: Sun Jun 4 23:42:38 UTC 2023
Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: ld.elf_so: Sprinkle more debug messages on dlopen and error. PR pkg/57445 To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.213 src/libexec/ld.elf_so/rtld.c:1.214 --- src/libexec/ld.elf_so/rtld.c:1.213 Sun Apr 23 11:53:00 2023 +++ src/libexec/ld.elf_so/rtld.c Sun Jun 4 23:42:38 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.213 2023/04/23 11:53:00 riastradh Exp $ */ +/* $NetBSD: rtld.c,v 1.214 2023/06/04 23:42:38 riastradh Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.213 2023/04/23 11:53:00 riastradh Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.214 2023/06/04 23:42:38 riastradh Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -1034,7 +1034,7 @@ dlopen(const char *name, int mode) sigset_t mask; int result; - dbg(("dlopen of %s %d", name, mode)); + dbg(("dlopen of %s 0x%x", name, mode)); _rtld_exclusive_enter(&mask); @@ -1091,6 +1091,9 @@ dlopen(const char *name, int mode) _rtld_debug.r_state = RT_CONSISTENT; _rtld_debug_state(); + dbg(("dlopen of %s 0x%x returned %p%s%s%s", name, mode, obj, + obj ? "" : " (", obj ? "" : error_message, obj ? "" : ")")); + _rtld_exclusive_exit(&mask); return obj; @@ -1565,6 +1568,7 @@ _rtld_error(const char *fmt,...) va_start(ap, fmt); xvsnprintf(buf, sizeof buf, fmt, ap); + dbg(("%s: %s", __func__, buf)); error_message = buf; va_end(ap); }