Родитель
0383adbcb9
Коммит
2161b2a159
|
@ -157,10 +157,6 @@ plcrash_error_t plcrash_async_mobject_init (plcrash_async_mobject_t *mobj, mach_
|
|||
|
||||
/* Save the task-relative address */
|
||||
mobj->task_address = task_addr;
|
||||
|
||||
/* Save the task reference */
|
||||
mobj->task = task;
|
||||
mach_port_mod_refs(mach_task_self(), mobj->task, MACH_PORT_RIGHT_SEND, 1);
|
||||
|
||||
return PLCRASH_ESUCCESS;
|
||||
}
|
||||
|
@ -184,14 +180,6 @@ pl_vm_address_t plcrash_async_mobject_length (plcrash_async_mobject_t *mobj) {
|
|||
return mobj->length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a borrowed reference to the backing task for this mapping.
|
||||
*
|
||||
* @param mobj An initialized memory object.
|
||||
*/
|
||||
task_t plcrash_async_mobject_task (plcrash_async_mobject_t *mobj) {
|
||||
return mobj->task;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify that @a length bytes starting at local @a address is within @a mobj's mapped range.
|
||||
|
@ -351,9 +339,6 @@ void plcrash_async_mobject_free (plcrash_async_mobject_t *mobj) {
|
|||
kern_return_t kt;
|
||||
if ((kt = vm_deallocate(mach_task_self(), mobj->address, mobj->length)) != KERN_SUCCESS)
|
||||
PLCF_DEBUG("vm_deallocate() failure: %d", kt);
|
||||
|
||||
/* Decrement our task refcount */
|
||||
mach_port_mod_refs(mach_task_self(), mobj->task, MACH_PORT_RIGHT_SEND, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,9 +39,6 @@
|
|||
* An async-accessible memory mapped object.
|
||||
*/
|
||||
typedef struct plcrash_async_mobject {
|
||||
/** The task from which the memory was mapped */
|
||||
task_t task;
|
||||
|
||||
/** The in-memory address at which the target address has been mapped. This address is offset
|
||||
* from the actual starting address, to account for the rounding of mappings to whole pages. */
|
||||
uintptr_t address;
|
||||
|
@ -67,8 +64,6 @@ plcrash_error_t plcrash_async_mobject_init (plcrash_async_mobject_t *mobj, mach_
|
|||
pl_vm_address_t plcrash_async_mobject_base_address (plcrash_async_mobject_t *mobj);
|
||||
pl_vm_address_t plcrash_async_mobject_length (plcrash_async_mobject_t *mobj);
|
||||
|
||||
task_t plcrash_async_mobject_task (plcrash_async_mobject_t *mobj);
|
||||
|
||||
bool plcrash_async_mobject_verify_local_pointer (plcrash_async_mobject_t *mobj, uintptr_t address, pl_vm_off_t offset, size_t length);
|
||||
void *plcrash_async_mobject_remap_address (plcrash_async_mobject_t *mobj, pl_vm_address_t address, pl_vm_off_t offset, size_t length);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче