forked from enlightenment/efl
eo: improve error reporting for _eo_api_op_id_get()
This commit is contained in:
parent
9a79d1e864
commit
0ce3154656
|
@ -2,6 +2,10 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_DLADDR
|
||||||
|
# include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <Eina.h>
|
#include <Eina.h>
|
||||||
|
|
||||||
#include "Eo.h"
|
#include "Eo.h"
|
||||||
|
@ -748,8 +752,14 @@ _eo_api_op_id_get(const void *api_func, const char *file, int line)
|
||||||
|
|
||||||
if (desc == NULL)
|
if (desc == NULL)
|
||||||
{
|
{
|
||||||
ERR("in %s:%d: unable to resolve %s api func %p.",
|
const char *fct_name = "unknown";
|
||||||
file, line, (class_ref ? "class" : "regular"), api_func);
|
#ifdef HAVE_DLADDR
|
||||||
|
Dl_info info;
|
||||||
|
if (dladdr(api_func, &info) != 0)
|
||||||
|
fct_name = info.dli_sname;
|
||||||
|
#endif
|
||||||
|
ERR("in %s:%d: unable to resolve %s api func '%s' %p.",
|
||||||
|
file, line, (class_ref ? "class" : "regular"), fct_name, api_func);
|
||||||
return EO_NOOP;
|
return EO_NOOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue