diff options
author | SaeHie Park <saehie.park@gmail.com> | 2016-12-06 18:22:30 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-12-06 10:22:30 +0100 |
commit | e3da0c0b895790d2b0dc94e2ca69b66f9d4476e2 (patch) | |
tree | 0f231a01b027244ec0c5d5dff1da3e59db4d7078 /src/debug/inc/common.h | |
parent | 7baf52ee8d079fd41a306fcc3a195199f50f85d3 (diff) | |
download | coreclr-e3da0c0b895790d2b0dc94e2ca69b66f9d4476e2.tar.gz coreclr-e3da0c0b895790d2b0dc94e2ca69b66f9d4476e2.tar.bz2 coreclr-e3da0c0b895790d2b0dc94e2ca69b66f9d4476e2.zip |
[x86/Linux] Fix Dacp structure size mismatch (#8377)
Fix compile error for x86/Linux
- add __attribute__((__ms_struct__)) as "MSLAYOUT" for those structures
- Fix "Dacp structs cannot be modified due to backwards compatibility" error
Diffstat (limited to 'src/debug/inc/common.h')
-rw-r--r-- | src/debug/inc/common.h | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/debug/inc/common.h b/src/debug/inc/common.h index 77fe27a4b3..3bbf0a6f08 100644 --- a/src/debug/inc/common.h +++ b/src/debug/inc/common.h @@ -295,29 +295,7 @@ inline CORDB_ADDRESS ALIGN_ADDRESS( CORDB_ADDRESS val, CORDB_ADDRESS alignment ) return result; } -// -// Whenever a structure is marshalled between different platforms, we need to ensure the -// layout is the same in both cases. We tell GCC to use the MSVC-style packing with -// the following attribute. The main thing this appears to control is whether -// 8-byte values are aligned at 4-bytes (GCC default) or 8-bytes (MSVC default). -// This attribute affects only the immediate struct it is applied to, you must also apply -// it to any nested structs if you want their layout affected as well. You also must -// apply this to unions embedded in other structures, since it can influence the starting -// alignment. -// -// Note that there doesn't appear to be any disadvantage to applying this a little -// more agressively than necessary, so we generally use it on all classes / structures -// defined in a file that defines marshalled data types (eg. DacDbiStructures.h) -// The -mms-bitfields compiler option also does this for the whole file, but we don't -// want to go changing the layout of, for example, structures defined in OS header files -// so we explicitly opt-in with this attribute. -// -#ifdef __GNUC__ -#define MSLAYOUT __attribute__((__ms_struct__)) -#else -#define MSLAYOUT -#endif - +#include "dacprivate.h" // for MSLAYOUT #include "dumpcommon.h" #endif //DEBUGGER_COMMON_H |