]> git.saurik.com Git - apple/system_cmds.git/blob - gcore.tproj/dyld.h
system_cmds-735.20.1.tar.gz
[apple/system_cmds.git] / gcore.tproj / dyld.h
1 /*
2 * Copyright (c) 2016 Apple Inc. All rights reserved.
3 */
4
5 #include "options.h"
6 #include "corefile.h"
7
8 #include <mach-o/dyld_images.h>
9 #include <mach-o/dyld_process_info.h>
10 #include <uuid/uuid.h>
11
12 #ifndef _DYLD_H
13 #define _DYLD_H
14
15 struct libent {
16 const char *le_filename; // (points into le_pathname!)
17 char *le_pathname;
18 uuid_t le_uuid;
19 uint64_t le_mhaddr; // address in target process
20 const native_mach_header_t *le_mh; // cached copy in this address space
21 };
22
23 extern const struct libent *libent_lookup_byuuid(const uuid_t);
24 extern const struct libent *libent_lookup_first_bytype(uint32_t);
25 extern const struct libent *libent_insert(const char *, const uuid_t, uint64_t, const native_mach_header_t *);
26 extern bool libent_build_nametable(task_t, dyld_process_info);
27
28 extern dyld_process_info get_task_dyld_info(task_t);
29 extern bool get_sc_uuid(dyld_process_info, uuid_t);
30 extern void free_task_dyld_info(dyld_process_info);
31
32
33 #endif /* _DYLD_H */