X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-dl%2Flttng-ust-dl.c;h=8f2faac00630717ee96bf3fa1e23681075e151ca;hb=0cd1695fc2d07d8b7d4335a58e74fb3bc7aef329;hp=954d9dfcb7381025e82054b110a525ae5855e717;hpb=edcfc2e58a187fb89127e7814b0b319aa0b44580;p=lttng-ust.git diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index 954d9dfc..8f2faac0 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -27,6 +27,7 @@ #include #include +#include #include "usterr-signal-safe.h" /* Include link.h last else it conflicts with ust-dlfcn. */ @@ -104,7 +105,8 @@ void lttng_ust_dl_dlopen(void *so_base, const char *so_name, void *ip) } tracepoint(lttng_ust_dl, dlopen, - ip, so_base, resolved_path, memsz); + ip, so_base, resolved_path, memsz, + has_build_id, has_debug_link); if (has_build_id) { tracepoint(lttng_ust_dl, build_id, @@ -135,7 +137,7 @@ void *dlopen(const char *filename, int flag) ret = dlinfo(handle, RTLD_DI_LINKMAP, &p); if (ret != -1 && p != NULL && p->l_addr != 0) { lttng_ust_dl_dlopen((void *) p->l_addr, p->l_name, - __builtin_return_address(0)); + LTTNG_UST_CALLER_IP()); } } @@ -144,14 +146,14 @@ void *dlopen(const char *filename, int flag) int dlclose(void *handle) { - if (__tracepoint_ptrs_registered && handle) { + if (__tracepoint_ptrs_registered) { struct link_map *p = NULL; int ret; ret = dlinfo(handle, RTLD_DI_LINKMAP, &p); if (ret != -1 && p != NULL && p->l_addr != 0) { tracepoint(lttng_ust_dl, dlclose, - __builtin_return_address(0), + LTTNG_UST_CALLER_IP(), (void *) p->l_addr); } }