Change the path "/proc/self/fd/bin" used to find dll/so for the candidate process to "/proc/[pid]/fd/bin"
When debugging, the library loaded in the location of "/proc/self/fd/bin" cannot be accessed by the debugger, so symbol loading fails.
To avoid this failure, change finding path to "/proc/[pid]/fd/bin".
throw std::ios_base::failure("Fail to open /proc/self");
}
- appRootPath = std::string("/proc/self/fd/") + std::to_string(rootFD);
- appNIRootPath = std::string("/proc/self/fd/") + std::to_string(niRootFD);
+ std::string fdPath = "/proc/" + std::to_string(getpid()) + "/fd/";
+ appRootPath = fdPath + std::to_string(rootFD);
+ appNIRootPath = fdPath + std::to_string(niRootFD);
+
updateAppRelatedPath(appRootPath, appNIRootPath);
// Set native library searching path