Fix incorrect handling of DW_FORM_flag_present.
This form implicitly indicates a flag value of true without a corresponding byte in the datastream. As such, we were introducing off by one errors when parsing one.
This commit is contained in:
@@ -1257,7 +1257,7 @@ DwarfFile::_ParseEntryAttributes(DataReader& dataReader,
|
|||||||
value = dataReader.ReadUnsignedLEB128(0);
|
value = dataReader.ReadUnsignedLEB128(0);
|
||||||
break;
|
break;
|
||||||
case DW_FORM_flag_present:
|
case DW_FORM_flag_present:
|
||||||
attributeValue.SetToFlag(dataReader.Read<uint8>(0) != 0);
|
attributeValue.SetToFlag(true);
|
||||||
break;
|
break;
|
||||||
case DW_FORM_ref_sig8:
|
case DW_FORM_ref_sig8:
|
||||||
value = dataReader.Read<uint64>(0);
|
value = dataReader.Read<uint64>(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user