diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-09 14:20:58 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-09 14:20:58 -0400 |
commit | 5fd83771641d15c418f747bd343ba6738d3875f7 (patch) | |
tree | 5abf0f78f680d9837dbd93d4d4c3933bb7509599 /system_cmds/gcore.tproj/dyld.h | |
download | apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.gz apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.zst apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.zip |
Import macOS userland
adv_cmds-176
basic_cmds-55
bootstrap_cmds-116.100.1
developer_cmds-66
diskdev_cmds-667.40.1
doc_cmds-53.60.1
file_cmds-321.40.3
mail_cmds-35
misc_cmds-34
network_cmds-606.40.1
patch_cmds-17
remote_cmds-63
shell_cmds-216.60.1
system_cmds-880.60.2
text_cmds-106
Diffstat (limited to 'system_cmds/gcore.tproj/dyld.h')
-rw-r--r-- | system_cmds/gcore.tproj/dyld.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/system_cmds/gcore.tproj/dyld.h b/system_cmds/gcore.tproj/dyld.h new file mode 100644 index 0000000..02ded2a --- /dev/null +++ b/system_cmds/gcore.tproj/dyld.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2016 Apple Inc. All rights reserved. + */ + +#include "options.h" +#include "corefile.h" +#include "utils.h" + +#include <mach-o/dyld_images.h> +#include <mach-o/dyld_process_info.h> +#include <uuid/uuid.h> + +#ifndef _DYLD_H +#define _DYLD_H + +struct libent { + const char *le_filename; // (points into le_pathname!) + char *le_pathname; + uuid_t le_uuid; + uint64_t le_mhaddr; // address in target process + const native_mach_header_t *le_mh; // copy mapped into this address space + struct vm_range le_vr; // vmaddr, vmsize bounds in target process + mach_vm_offset_t le_objoff; // offset from le_mhaddr to first __TEXT seg +}; + +extern const struct libent *libent_lookup_byuuid(const uuid_t); +extern const struct libent *libent_lookup_first_bytype(uint32_t); +extern const struct libent *libent_insert(const char *, const uuid_t, uint64_t, const native_mach_header_t *, const struct vm_range *, mach_vm_offset_t); +extern bool libent_build_nametable(task_t, dyld_process_info); + +extern dyld_process_info get_task_dyld_info(task_t); +extern bool get_sc_uuid(dyld_process_info, uuid_t); +extern void free_task_dyld_info(dyld_process_info); + +#endif /* _DYLD_H */ |