carb::extras::getLibraryFilename

Defined in carb/extras/Library.h

inline std::string carb::extras::getLibraryFilename(const void *symbolAddress)

Retrieves the path for a loaded library from an address or symbol within it.

Parameters

symbolAddress[in] The address of the symbol to find the library file name for. This may be a symbol returned from a previous call to getLibrarySymbol() or another known symbol in the library. This does not strictly need to be an exported symbol from the library, just an address within that library’s memory space.

Returns

A string containing the name and path of the library that the symbol belongs to if found. This path components in this string will always be delimited by ‘/’ and the string will always be UTF-8 encoded.

Returns

An empty string if the requested address is not a part of a loaded library.