| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 kern_return_t kr = task_info(mach_task_self(), | 76 kern_return_t kr = task_info(mach_task_self(), |
| 77 TASK_DYLD_INFO, | 77 TASK_DYLD_INFO, |
| 78 reinterpret_cast<task_info_t>(&dyld_info), | 78 reinterpret_cast<task_info_t>(&dyld_info), |
| 79 &count); | 79 &count); |
| 80 ASSERT_EQ(KERN_SUCCESS, kr); | 80 ASSERT_EQ(KERN_SUCCESS, kr); |
| 81 | 81 |
| 82 EXPECT_EQ(reinterpret_cast<mach_vm_address_t>(self_image_infos), | 82 EXPECT_EQ(reinterpret_cast<mach_vm_address_t>(self_image_infos), |
| 83 dyld_info.all_image_info_addr); | 83 dyld_info.all_image_info_addr); |
| 84 EXPECT_GT(dyld_info.all_image_info_size, 1u); | 84 EXPECT_GT(dyld_info.all_image_info_size, 1u); |
| 85 | 85 |
| 86 // This field is only present in the Mac OS X 10.7 SDK (at build time) and | 86 // This field is only present in the OS X 10.7 SDK (at build time) and kernel |
| 87 // kernel (at run time). | 87 // (at run time). |
| 88 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 | 88 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 |
| 89 if (MacOSXMinorVersion() >= 7) { | 89 if (MacOSXMinorVersion() >= 7) { |
| 90 #if !defined(ARCH_CPU_64_BITS) | 90 #if !defined(ARCH_CPU_64_BITS) |
| 91 EXPECT_EQ(TASK_DYLD_ALL_IMAGE_INFO_32, dyld_info.all_image_info_format); | 91 EXPECT_EQ(TASK_DYLD_ALL_IMAGE_INFO_32, dyld_info.all_image_info_format); |
| 92 #else | 92 #else |
| 93 EXPECT_EQ(TASK_DYLD_ALL_IMAGE_INFO_64, dyld_info.all_image_info_format); | 93 EXPECT_EQ(TASK_DYLD_ALL_IMAGE_INFO_64, dyld_info.all_image_info_format); |
| 94 #endif | 94 #endif |
| 95 } | 95 } |
| 96 #endif | 96 #endif |
| 97 | 97 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 sizeof(self_uuid_info->imageUUID))) | 319 sizeof(self_uuid_info->imageUUID))) |
| 320 << "index " << index; | 320 << "index " << index; |
| 321 } | 321 } |
| 322 } | 322 } |
| 323 #endif | 323 #endif |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace | 326 } // namespace |
| 327 } // namespace test | 327 } // namespace test |
| 328 } // namespace crashpad | 328 } // namespace crashpad |
| OLD | NEW |