Created
May 7, 2011 00:31
-
-
Save darconeous/960073 to your computer and use it in GitHub Desktop.
Example using struct dyld_all_image_infos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example using struct dyld_all_image_infos */ | |
#include <stdio.h> | |
#include <dlfcn.h> | |
#include <mach-o/dyld_images.h> | |
#include <mach-o/dyld.h> | |
#include <mach-o/dyld_priv.h> | |
int | |
main(void) | |
{ | |
int i; | |
const struct dyld_all_image_infos *dyld_all_image_infos; | |
dyld_all_image_infos = _dyld_get_all_image_infos(); | |
for(i=0;i<dyld_all_image_infos->infoArrayCount;i++) { | |
printf("image: %s %d\n", | |
dyld_all_image_infos->infoArray[i].imageFilePath, | |
(int)dyld_all_image_infos->infoArray[i].imageFileModDate | |
); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment