snapshot/mac: align members of 64-bit dyld_all_image_infos properly in

32-bit mode.

TEST=snapshot_test (specifically MachOImageAnnotationsReader.CrashDyld)
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/984023005
This commit is contained in:
Mark Mentovai 2015-03-06 18:44:43 -05:00
parent 79177046d3
commit 64b87325b9
2 changed files with 8 additions and 1 deletions

View File

@ -55,6 +55,13 @@ PROCESS_TYPE_STRUCT_BEGIN(dyld_all_image_infos)
// Version 2 (Mac OS X 10.6)
PROCESS_TYPE_STRUCT_MEMBER(bool, libSystemInitialized)
// This field does not appear in the systems structure definition but is
// necessary to ensure that when building in 32-bit mode, the 64-bit version
// of the process_types structure matches the genuine 64-bit structure. This
// is required because the alignment constraints on 64-bit types are more
// stringent in 64-bit mode.
PROCESS_TYPE_STRUCT_MEMBER(Reserved64Only, alignment)
// const mach_header*
PROCESS_TYPE_STRUCT_MEMBER(Pointer, dyldImageLoadAddress)

View File

@ -26,7 +26,7 @@
// __VA_ARGS__, which is intended to set the alignment of the 64-bit types, is
// not used for that type alias.
#define DECLARE_PROCESS_TYPE_TRAITS_CLASS(traits_name, lp_bits, ...) \
namespace crashpad { \
namespace crashpad { \
namespace process_types { \
namespace internal { \
struct Traits##traits_name { \