Created by: Louis-Ye
If the kernel enables mechanisms like remapping sections in the module at runtime (i.e., hugepage_text, related issue #2566 (closed)), the full_path of the module_data_t provided in drmgr_register_module_load_event callback could be invalid, since the original module file could already be deleted. This leads to the failure of finding PC for a particular function in memtrace func-tracing feature, given drsym_lookup_symbol depends on loading the original module file by path. This PR is a partial fix to make function tracing feature works under scenarios like hugepage_text by using dr_get_proc_address before calling drsym_lookup_symbol. This way, we can still catch the target function if its name is in the dynamic symbol table. However, if a target function is not in the dynamic symbol table and the kernel is running with features like hugepage_text, then the function tracing feature would still fail to trace this target function.
Fixes #3048 (closed)