Index: util/mac/process_types/dyld_images.proctype |
diff --git a/util/mac/process_types/dyld_images.proctype b/util/mac/process_types/dyld_images.proctype |
new file mode 100644 |
index 0000000000000000000000000000000000000000..643f54c0cc244671e666b18a966211193ea1c5a4 |
--- /dev/null |
+++ b/util/mac/process_types/dyld_images.proctype |
@@ -0,0 +1,103 @@ |
+// Copyright 2014 The Crashpad Authors. All rights reserved. |
+// |
+// Licensed under the Apache License, Version 2.0 (the "License"); |
+// you may not use this file except in compliance with the License. |
+// You may obtain a copy of the License at |
+// |
+// http://www.apache.org/licenses/LICENSE-2.0 |
+// |
+// Unless required by applicable law or agreed to in writing, software |
+// distributed under the License is distributed on an "AS IS" BASIS, |
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
+// See the License for the specific language governing permissions and |
+// limitations under the License. |
+ |
+// This file corresponds to the system’s <mach-o/dyld_images.h>. |
+// |
+// This file is intended to be included multiple times in the same translation |
+// unit, so #include guards are intentionally absent. |
+// |
+// This file is included by util/mac/process_types.h and |
+// util/mac/process_types.cc to produce process type struct definitions and |
+// accessors. |
+ |
+PROCESS_TYPE_STRUCT_BEGIN(dyld_image_info) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, imageLoadAddress) // const mach_header* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, imageFilePath) // const char* |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, imageFileModDate) |
+PROCESS_TYPE_STRUCT_END(dyld_image_info) |
+ |
+PROCESS_TYPE_STRUCT_BEGIN(dyld_uuid_info) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, imageLoadAddress) // const mach_header* |
+ PROCESS_TYPE_STRUCT_MEMBER(uuid_t, imageUUID) |
+PROCESS_TYPE_STRUCT_END(dyld_uuid_info) |
+ |
+// dyld_all_image_infos is variable-length. Its length dictated by its |version| |
+// field which is always present. A custom implementation of the flavored |
+// ReadSpecificInto function that understands how to map this field to the |
+// structure’s actual size is provided in util/mac/process_types/custom.cc. No |
+// implementation of ReadArrayInto is provided because dyld_all_image_infos |
+// structs are singletons in a process and are never present in arrays, so the |
+// functionality is unnecessary. |
+ |
+#if !defined(PROCESS_TYPE_STRUCT_IMPLEMENT_INTERNAL_READ_INTO) && \ |
+ !defined(PROCESS_TYPE_STRUCT_IMPLEMENT_ARRAY) |
+ |
+PROCESS_TYPE_STRUCT_BEGIN(dyld_all_image_infos) |
+ PROCESS_TYPE_STRUCT_MEMBER(uint32_t, version) |
+ |
+ // Version 1 (Mac OS X 10.4) |
+ PROCESS_TYPE_STRUCT_MEMBER(uint32_t, infoArrayCount) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, infoArray) // const dyld_image_info* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, notification) // function pointer |
+ PROCESS_TYPE_STRUCT_MEMBER(bool, processDetachedFromSharedRegion) |
+ |
+ // Version 2 (Mac OS X 10.6) |
+ PROCESS_TYPE_STRUCT_MEMBER(bool, libSystemInitialized) |
+ |
+ // const mach_header* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, dyldImageLoadAddress) |
+ |
+ // Version 3 (Mac OS X 10.6) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, jitInfo) // void* |
+ |
+ // Version 5 (Mac OS X 10.6) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, dyldVersion) // const char* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, errorMessage) // const char* |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, terminationFlags) |
+ |
+ // Version 6 (Mac OS X 10.6) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, coreSymbolicationShmPage) // void* |
+ |
+ // Version 7 (Mac OS X 10.6) |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, systemOrderFlag) |
+ |
+ // Version 8 (Mac OS X 10.7) |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, uuidArrayCount) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, uuidArray) // const dyld_uuid_info* |
+ |
+ // Version 9 (Mac OS X 10.7) |
+ // dyld_all_image_infos* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, dyldAllImageInfosAddress) |
+ |
+ // Version 10 (Mac OS X 10.7) |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, initialImageCount) |
+ |
+ // Version 11 (Mac OS X 10.7) |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, errorKind) |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, errorClientOfDylibPath) // const char* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, errorTargetDylibPath) // const char* |
+ PROCESS_TYPE_STRUCT_MEMBER(Pointer, errorSymbol) // const char* |
+ |
+ // Version 12 (Mac OS X 10.7) |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, sharedCacheSlide) |
+ |
+ // Version 13 (Mac OS X 10.9) |
+ PROCESS_TYPE_STRUCT_MEMBER(uint8_t, sharedCacheUUID, [16]) |
+ |
+ // Version 14 (Mac OS X 10.9) |
+ PROCESS_TYPE_STRUCT_MEMBER(UIntPtr, reserved, [16]) |
+PROCESS_TYPE_STRUCT_END(dyld_all_image_infos) |
+ |
+#endif // ! PROCESS_TYPE_STRUCT_IMPLEMENT_INTERNAL_READ_INTO && |
+ // ! PROCESS_TYPE_STRUCT_IMPLEMENT_ARRAY |