]> git.saurik.com Git - apple/dyld.git/blob - src/dyld_process_info_internal.h
dyld-551.4.tar.gz
[apple/dyld.git] / src / dyld_process_info_internal.h
1 /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-
2 *
3 * Copyright (c) 2016 Apple Inc. All rights reserved.
4 *
5 * @APPLE_LICENSE_HEADER_START@
6 *
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. Please obtain a copy of the License at
11 * http://www.opensource.apple.com/apsl/ and read it before using this
12 * file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
19 * Please see the License for the specific language governing rights and
20 * limitations under the License.
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24
25 #ifndef _DYLD_PROCESS_INFO_INTERNAL_H_
26 #define _DYLD_PROCESS_INFO_INTERNAL_H_
27
28
29 #include <stdlib.h>
30 #include <string.h>
31 #include <limits.h>
32 #include <stdio.h>
33
34
35 struct dyld_all_image_infos_32 {
36 uint32_t version;
37 uint32_t infoArrayCount;
38 uint32_t infoArray;
39 uint32_t notification;
40 bool processDetachedFromSharedRegion;
41 bool libSystemInitialized;
42 uint32_t dyldImageLoadAddress;
43 uint32_t jitInfo;
44 uint32_t dyldVersion;
45 uint32_t errorMessage;
46 uint32_t terminationFlags;
47 uint32_t coreSymbolicationShmPage;
48 uint32_t systemOrderFlag;
49 uint32_t uuidArrayCount;
50 uint32_t uuidArray;
51 uint32_t dyldAllImageInfosAddress;
52 uint32_t initialImageCount;
53 uint32_t errorKind;
54 uint32_t errorClientOfDylibPath;
55 uint32_t errorTargetDylibPath;
56 uint32_t errorSymbol;
57 uint32_t sharedCacheSlide;
58 uint8_t sharedCacheUUID[16];
59 uint32_t sharedCacheBaseAddress;
60 uint64_t infoArrayChangeTimestamp;
61 uint32_t dyldPath;
62 uint32_t notifyMachPorts[8];
63 uint32_t reserved[5];
64 uint32_t compact_dyld_image_info_addr;
65 uint32_t compact_dyld_image_info_size;
66 };
67
68 struct dyld_all_image_infos_64 {
69 uint32_t version;
70 uint32_t infoArrayCount;
71 uint64_t infoArray;
72 uint64_t notification;
73 bool processDetachedFromSharedRegion;
74 bool libSystemInitialized;
75 uint32_t paddingToMakeTheSizeCorrectOn32bitAndDoesntAffect64b; // NOT PART OF DYLD_ALL_IMAGE_INFOS!
76 uint64_t dyldImageLoadAddress;
77 uint64_t jitInfo;
78 uint64_t dyldVersion;
79 uint64_t errorMessage;
80 uint64_t terminationFlags;
81 uint64_t coreSymbolicationShmPage;
82 uint64_t systemOrderFlag;
83 uint64_t uuidArrayCount;
84 uint64_t uuidArray;
85 uint64_t dyldAllImageInfosAddress;
86 uint64_t initialImageCount;
87 uint64_t errorKind;
88 uint64_t errorClientOfDylibPath;
89 uint64_t errorTargetDylibPath;
90 uint64_t errorSymbol;
91 uint64_t sharedCacheSlide;
92 uint8_t sharedCacheUUID[16];
93 uint64_t sharedCacheBaseAddress;
94 uint64_t infoArrayChangeTimestamp;
95 uint64_t dyldPath;
96 uint32_t notifyMachPorts[8];
97 uint64_t reserved[9];
98 uint64_t compact_dyld_image_info_addr;
99 uint64_t compact_dyld_image_info_size;
100 };
101
102 struct dyld_image_info_32 {
103 uint32_t imageLoadAddress;
104 uint32_t imageFilePath;
105 uint32_t imageFileModDate;
106 };
107 struct dyld_image_info_64 {
108 uint64_t imageLoadAddress;
109 uint64_t imageFilePath;
110 uint64_t imageFileModDate;
111 };
112
113 #define DYLD_PROCESS_INFO_NOTIFY_MAX_BUFFER_SIZE (32*1024)
114 #define DYLD_PROCESS_INFO_NOTIFY_LOAD_ID 0x1000
115 #define DYLD_PROCESS_INFO_NOTIFY_UNLOAD_ID 0x2000
116 #define DYLD_PROCESS_INFO_NOTIFY_MAIN_ID 0x3000
117
118
119 struct dyld_process_info_image_entry {
120 uuid_t uuid;
121 uint64_t loadAddress;
122 uint32_t pathStringOffset;
123 uint32_t pathLength;
124 };
125
126 struct dyld_process_info_notify_header {
127 mach_msg_header_t header;
128 uint32_t version;
129 uint32_t imageCount;
130 uint32_t imagesOffset;
131 uint32_t stringsOffset;
132 uint64_t timestamp;
133 };
134
135
136
137
138 #endif // _DYLD_PROCESS_INFO_INTERNAL_H_
139
140