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
[2];
63 uint32_t reserved
[11];
66 struct dyld_all_image_infos_64
{
68 uint32_t infoArrayCount
;
70 uint64_t notification
;
71 bool processDetachedFromSharedRegion
;
72 bool libSystemInitialized
;
73 uint32_t paddingToMakeTheSizeCorrectOn32bitAndDoesntAffect64b
; // NOT PART OF DYLD_ALL_IMAGE_INFOS!
74 uint64_t dyldImageLoadAddress
;
77 uint64_t errorMessage
;
78 uint64_t terminationFlags
;
79 uint64_t coreSymbolicationShmPage
;
80 uint64_t systemOrderFlag
;
81 uint64_t uuidArrayCount
;
83 uint64_t dyldAllImageInfosAddress
;
84 uint64_t initialImageCount
;
86 uint64_t errorClientOfDylibPath
;
87 uint64_t errorTargetDylibPath
;
89 uint64_t sharedCacheSlide
;
90 uint8_t sharedCacheUUID
[16];
91 uint64_t sharedCacheBaseAddress
;
92 uint64_t infoArrayChangeTimestamp
;
94 uint32_t notifyMachPorts
[2];
95 uint64_t reserved
[12];
98 struct dyld_image_info_32
{
99 uint32_t imageLoadAddress
;
100 uint32_t imageFilePath
;
101 uint32_t imageFileModDate
;
103 struct dyld_image_info_64
{
104 uint64_t imageLoadAddress
;
105 uint64_t imageFilePath
;
106 uint64_t imageFileModDate
;
109 #define DYLD_PROCESS_INFO_NOTIFY_MAX_BUFFER_SIZE (32*1024)
110 #define DYLD_PROCESS_INFO_NOTIFY_LOAD_ID 0x1000
111 #define DYLD_PROCESS_INFO_NOTIFY_UNLOAD_ID 0x2000
112 #define DYLD_PROCESS_INFO_NOTIFY_MAIN_ID 0x3000
115 struct dyld_process_info_image_entry
{
117 uint64_t loadAddress
;
118 uint32_t pathStringOffset
;
122 struct dyld_process_info_notify_header
{
123 mach_msg_header_t header
;
126 uint32_t imagesOffset
;
127 uint32_t stringsOffset
;
134 #endif // _DYLD_PROCESS_INFO_INTERNAL_H_