#include "mach_inject.h"
#include <mach-o/dyld.h>
#include <mach-o/getsect.h>
#include <mach/mach.h>
#include <sys/stat.h>
#include <sys/errno.h>
#include <assert.h>
Go to the source code of this file.
Defines | |
| #define | COMPILE_TIME_ASSERT(exp) { switch (0) { case 0: case (exp):; } } |
| #define | ASSERT_CAST(CAST_TO, CAST_FROM) COMPILE_TIME_ASSERT( sizeof(CAST_TO)==sizeof(CAST_FROM) ) |
Functions | |
| mach_error_t | mach_inject (const mach_inject_entry threadEntry, const void *paramBlock, size_t paramSize, pid_t targetProcess, vm_size_t stackSize) |
| Starts executing threadEntry in a new thread in the process specified by targetProcess. | |
| mach_error_t | machImageForPointer (const void *pointer, const void **image, unsigned long *size) |
| Given a pointer, returns its Mach-O image and image size. | |
|
|
Definition at line 20 of file mach_inject.c. Referenced by mach_inject(), and machImageForPointer(). |
|
|
Definition at line 18 of file mach_inject.c. |
|
||||||||||||||||||||||||
|
Starts executing threadEntry in a new thread in the process specified by targetProcess.
Definition at line 32 of file mach_inject.c. References ASSERT_CAST, mach_inject_entry, and machImageForPointer(). |
|
||||||||||||||||
|
Given a pointer, returns its Mach-O image and image size.
Definition at line 161 of file mach_inject.c. References ASSERT_CAST, and err_threadEntry_image_not_found. Referenced by mach_inject(). |
1.3.4