]>
Commit | Line | Data |
---|---|---|
cf37c299 A |
1 | /* |
2 | * Copyright (c) 2016 Apple Inc. All rights reserved. | |
3 | */ | |
4 | ||
5 | #include "options.h" | |
6 | #include "corefile.h" | |
887d5eed | 7 | #include "utils.h" |
cf37c299 A |
8 | |
9 | #include <mach-o/dyld_images.h> | |
10 | #include <mach-o/dyld_process_info.h> | |
11 | #include <uuid/uuid.h> | |
12 | ||
13 | #ifndef _DYLD_H | |
14 | #define _DYLD_H | |
15 | ||
16 | struct libent { | |
17 | const char *le_filename; // (points into le_pathname!) | |
18 | char *le_pathname; | |
19 | uuid_t le_uuid; | |
20 | uint64_t le_mhaddr; // address in target process | |
887d5eed A |
21 | const native_mach_header_t *le_mh; // copy mapped into this address space |
22 | struct vm_range le_vr; // vmaddr, vmsize bounds in target process | |
23 | mach_vm_offset_t le_objoff; // offset from le_mhaddr to first __TEXT seg | |
cf37c299 A |
24 | }; |
25 | ||
26 | extern const struct libent *libent_lookup_byuuid(const uuid_t); | |
27 | extern const struct libent *libent_lookup_first_bytype(uint32_t); | |
887d5eed | 28 | 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); |
cf37c299 A |
29 | extern bool libent_build_nametable(task_t, dyld_process_info); |
30 | ||
31 | extern dyld_process_info get_task_dyld_info(task_t); | |
32 | extern bool get_sc_uuid(dyld_process_info, uuid_t); | |
33 | extern void free_task_dyld_info(dyld_process_info); | |
34 | ||
cf37c299 | 35 | #endif /* _DYLD_H */ |