Fix iterating over the MDXStateFeature entries on 32-bit hosts

On 32-bit hosts the new code for dumping version 5 of the MDRawMiscInfo
structure uses a 32-bit left shift to select flags corresponding to the
entries in the MDXStateFeature array. Since the array is made of 64
element this automatically skipped half of it.

Change-Id: Ic4e3beaf6c56083524b33da9a396c14eec0d2bd2
Reviewed-on: https://chromium-review.googlesource.com/396107
Reviewed-by: Ted Mielczarek <ted@mielczarek.org>
This commit is contained in:
Gabriele Svelto 2016-10-11 12:42:43 +02:00 committed by Ted Mielczarek
parent 6b2f69dd10
commit e6d1c032ba

View file

@ -3759,7 +3759,7 @@ void MinidumpMiscInfo::Print() {
printf(" xstate_data.enabled_features = 0x%" PRIx64 "\n",
misc_info_.xstate_data.enabled_features);
for (size_t i = 0; i < MD_MAXIMUM_XSTATE_FEATURES; i++) {
if (misc_info_.xstate_data.enabled_features & (1 << i)) {
if ((misc_info_.xstate_data.enabled_features >> i) & 1) {
printf(" xstate_data.features[%02zu] = { %d, %d }\n", i,
misc_info_.xstate_data.features[i].offset,
misc_info_.xstate_data.features[i].size);