summaryrefslogtreecommitdiffstats
path: root/sysif.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-05 20:02:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-05 20:02:07 -0700
commit266097d184a48385fc44f8c5c9a4bc7ba03b6294 (patch)
treeb68ead108c91919ea1c3cdb8099d041ca5ef1c49 /sysif.c
parentc5c227d4ed411e4828bc0b2685693e60cef585c4 (diff)
downloadtxr-266097d184a48385fc44f8c5c9a4bc7ba03b6294.tar.gz
txr-266097d184a48385fc44f8c5c9a4bc7ba03b6294.tar.bz2
txr-266097d184a48385fc44f8c5c9a4bc7ba03b6294.zip
dlsym: improve diagnostic.
* sysif.c (dlsym_error): Show the library object and symbol even when the system has a diagnotic. On Cygwin/Cygnal there is a generic "No such process" error that doesn't mention the library or symbol.
Diffstat (limited to 'sysif.c')
-rw-r--r--sysif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysif.c b/sysif.c
index 288f37b4..3e482897 100644
--- a/sysif.c
+++ b/sysif.c
@@ -2228,7 +2228,8 @@ static void dlsym_error(val dlptr, val name, val self)
{
char *err = dlerror();
if (err)
- uw_throwf(error_s, lit("~a: ~a"), self, string_utf8(err), nao);
+ uw_throwf(error_s, lit("~a: while looking up ~a in ~s: ~a"),
+ self, name, dlptr, string_utf8(err), nao);
else
uw_throwf(error_s, lit("~a: ~a not found in ~s"),
self, name, dlptr, nao);