File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ inline void getLastErrorString(std::string &errorValue) {
39
39
# define GET_FUNCTION_PTR (LIB, FUNC_NAME ) GetProcAddress(LIB, FUNC_NAME)
40
40
# define string_copy_s strncpy_s
41
41
#else
42
+ # include < link.h>
42
43
# include < dlfcn.h>
43
44
# define HMODULE void *
44
45
# define MAKE_LIBRARY_NAME (NAME, VERSION ) " lib" NAME " .so." VERSION
Original file line number Diff line number Diff line change @@ -439,12 +439,19 @@ namespace loader
439
439
for ( auto name : discoveredDrivers )
440
440
{
441
441
auto handle = LOAD_DRIVER_LIBRARY ( name.c_str () );
442
- if (debugTraceEnabled) {
443
- std::string message = " Loading Driver " + name;
444
- debug_trace_message (message, " " );
445
- }
446
442
if ( NULL != handle )
447
443
{
444
+ if (debugTraceEnabled) {
445
+ std::string message = " Loading Driver " + name + " succeeded" ;
446
+ #ifndef _WIN32
447
+ // TODO: implement same message for windows, move dlinfo to ze_util.h as a macro
448
+ struct link_map *dlinfo_map;
449
+ if (dlinfo (handle, RTLD_DI_LINKMAP, &dlinfo_map) == 0 ) {
450
+ message += " from: " + std::string (dlinfo_map->l_name );
451
+ }
452
+ #endif
453
+ debug_trace_message (message, " " );
454
+ }
448
455
allDrivers.emplace_back ();
449
456
allDrivers.rbegin ()->handle = handle;
450
457
allDrivers.rbegin ()->name = name;
You can’t perform that action at this time.
0 commit comments