bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error reporting should be improved


From: Peter Rosin
Subject: Re: Error reporting should be improved
Date: Wed, 30 Dec 2009 01:48:14 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Den 2009-12-30 00:41 skrev Bob Friesenhahn:
On Tue, 29 Dec 2009, Peter Rosin wrote:

I'm just saying that it is not going to be easy to deduce if an
error is allowed to be overwritten.

Have a look at libltdl/loaders/dlopen.c:vm_open(). It basically
calls dlopen and sets the error to CANNOT_OPEN if dlopen fails.
The ways I see to dig out the underlying failure is to either call
dlerror and parse the string (Eeek!) or replicate the dlopen
internals and arrive at the same cause as dlopen did (EEEK!).

If dlerror() is available it is supposed to be ignoring the supplied CANNOT_OPEN code and invoking dlerror() instead:

#if defined(HAVE_DLERROR)
#  define DLERROR(arg)  dlerror ()
#else
#  define DLERROR(arg)  LT__STRERROR (arg)
#endif

#define DL__SETERROR(errorcode) \
        LT__SETERRORSTR (DLERROR (errorcode))

Yes, I saw that later, but it doesn't change much. Any scheme has
to deduce if an error can be overridden without help from the
loaders. I now think you were correct in your first message where
you said that we need a flag or a full blown error stack...

Cheers,
Peter

--
They are in the crowd with the answer before the question.
> Why do you dislike Jeopardy?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]