1 /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-
3 * Copyright (c) 2016 Apple Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
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
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.
22 * @APPLE_LICENSE_HEADER_END@
25 #ifndef _DYLD_PROCESS_INFO_INTERNAL_H_
26 #define _DYLD_PROCESS_INFO_INTERNAL_H_
35 struct dyld_all_image_infos_32
{
37 uint32_t infoArrayCount
;
39 uint32_t notification
;
40 bool processDetachedFromSharedRegion
;
41 bool libSystemInitialized
;
42 uint32_t dyldImageLoadAddress
;
45 uint32_t errorMessage
;
46 uint32_t terminationFlags
;
47 uint32_t coreSymbolicationShmPage
;
48 uint32_t systemOrderFlag
;
49 uint32_t uuidArrayCount
;
51 uint32_t dyldAllImageInfosAddress
;
52 uint32_t initialImageCount
;
54 uint32_t errorClientOfDylibPath
;
55 uint32_t errorTargetDylibPath
;
57 uint32_t sharedCacheSlide
;
58 uint8_t sharedCacheUUID
[16];
59 uint32_t sharedCacheBaseAddress
;
60 uint64_t infoArrayChangeTimestamp
;
62 uint32_t notifyMachPorts
[8];
64 uint32_t compact_dyld_image_info_addr
;
65 uint32_t compact_dyld_image_info_size
;
68 struct dyld_all_image_infos_64
{
70 uint32_t infoArrayCount
;
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
;
79 uint64_t errorMessage
;
80 uint64_t terminationFlags
;
81 uint64_t coreSymbolicationShmPage
;
82 uint64_t systemOrderFlag
;
83 uint64_t uuidArrayCount
;
85 uint64_t dyldAllImageInfosAddress
;
86 uint64_t initialImageCount
;
88 uint64_t errorClientOfDylibPath
;
89 uint64_t errorTargetDylibPath
;
91 uint64_t sharedCacheSlide
;
92 uint8_t sharedCacheUUID
[16];
93 uint64_t sharedCacheBaseAddress
;
94 uint64_t infoArrayChangeTimestamp
;
96 uint32_t notifyMachPorts
[8];
98 uint64_t compact_dyld_image_info_addr
;
99 uint64_t compact_dyld_image_info_size
;
102 struct dyld_image_info_32
{
103 uint32_t imageLoadAddress
;
104 uint32_t imageFilePath
;
105 uint32_t imageFileModDate
;
107 struct dyld_image_info_64
{
108 uint64_t imageLoadAddress
;
109 uint64_t imageFilePath
;
110 uint64_t imageFileModDate
;
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
119 struct dyld_process_info_image_entry
{
121 uint64_t loadAddress
;
122 uint32_t pathStringOffset
;
126 struct dyld_process_info_notify_header
{
127 mach_msg_header_t header
;
130 uint32_t imagesOffset
;
131 uint32_t stringsOffset
;
138 #endif // _DYLD_PROCESS_INFO_INTERNAL_H_