Skip to content

Commit

Permalink
some commented out code. objc test code
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Sep 17, 2011
1 parent 66c5b41 commit 555faca
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mach_inject_bundle_stub/load_bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,25 @@ load_bundle_executable(
const char *bundleExecutableFileSystemRepresentation )
{
assert( bundleExecutableFileSystemRepresentation );

/*
NSBundle* bundle = [NSBundle bundleWithPath:[NSString stringWithUTF8String:bundleExecutableFileSystemRepresentation]];
printf("FS rep %s\n", bundleExecutableFileSystemRepresentation);
if(![bundle load]) {
fprintf(stderr, "mach_inject: failed to load %s\n", bundleExecutableFileSystemRepresentation);
return err_load_bundle_NSObjectFileImageFailure;
}
else
fprintf(stderr, "mach_inject: loaded succesfull: %s\n", bundleExecutableFileSystemRepresentation);
*/

//fprintf(stderr, "FS rep %s\n", bundleExecutableFileSystemRepresentation);
void *image = dlopen(bundleExecutableFileSystemRepresentation, RTLD_NOW);
printf("OH shit load? %p\n", image);
//fprintf(stderr, "OH shit load? %p\n", image);
if (!image) {
dlerror();
return err_load_bundle_NSObjectFileImageFailure;
}

return 0;
}

0 comments on commit 555faca

Please sign in to comment.