Skip to content

Instantly share code, notes, and snippets.

@darconeous
Created May 7, 2011 00:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save darconeous/960073 to your computer and use it in GitHub Desktop.
Save darconeous/960073 to your computer and use it in GitHub Desktop.
Example using struct dyld_all_image_infos
/* 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