I'm pretty new to Apple world, so sorry for newbie question.
I got a process id of a running process on my macos, and then using vmmap tried to get some information about the loaded dylibs in that process,
% vmmap 2081 | grep dylib
...
...
...
__DATA 7ffa5b08c410-7ffa5b08c418 [ 8 8 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
__DATA 7ffa5b08c418-7ffa5b08c8d0 [ 1208 1208 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
__DATA 7ffa5b08dc78-7ffa5b08dd58 [ 224 224 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
__DATA 7ffa5b08dd58-7ffa5b08dee8 [ 400 400 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
__DATA 7ffa5b08dee8-7ffa5b08df58 [ 112 112 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
__DATA 7ffa5b08df60-7ffa5b08e5a0 [ 1600 1600 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
__DATA 7ffa5b093280-7ffa5b093288 [ 8 8 0K 0K] rw-/rw- SM=COW /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
...
...
...
But when I check the path for those dylibs I cannot find them, below is the few random that I tried,
% ls /System/Library/PrivateFrameworks/FontServices.framework/libXTFontStaticRegistryData.dylib
ls: /System/Library/PrivateFrameworks/FontServices.framework/libXTFontStaticRegistryData.dylib: No such file or directory
% ls /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
ls: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib: No such file or directory
- Is there any better way to get the loaded libraries in a running process, or an executable?
- How can I get the actual path of those dylib files(mostly OS related, not any library that I wrote)?
Thanks