* Support for DW_AT_byte_size in DIECompoundType.

* Fixed several instances of attributes with dynamic values not being handled
  correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31052 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-06-14 17:16:08 +00:00
parent f5334fd1a3
commit c2e9f2a697
2 changed files with 29 additions and 30 deletions

View File

@ -360,6 +360,14 @@ DIECompoundType::DIECompoundType()
}
status_t
DIECompoundType::AddAttribute_byte_size(uint16 attributeName,
const AttributeValue& value)
{
return SetDynamicAttributeValue(fByteSize, value);
}
// #pragma mark - DIEClassBaseType
@ -373,8 +381,6 @@ DIEClassBaseType::DIEClassBaseType()
DIEArrayType::DIEArrayType()
:
fBitStride(0),
fByteSize(0),
fOrdering(DW_ORD_row_major)
{
}
@ -422,8 +428,7 @@ status_t
DIEArrayType::AddAttribute_bit_stride(uint16 attributeName,
const AttributeValue& value)
{
fBitStride = value.constant;
return B_OK;
return SetDynamicAttributeValue(fBitStride, value);
}
@ -431,8 +436,7 @@ status_t
DIEArrayType::AddAttribute_stride_size(uint16 attributeName,
const AttributeValue& value)
{
fBitStride = value.constant;
return B_OK;
return SetDynamicAttributeValue(fBitStride, value);
}
@ -440,8 +444,7 @@ status_t
DIEArrayType::AddAttribute_byte_size(uint16 attributeName,
const AttributeValue& value)
{
fByteSize = value.constant;
return B_OK;
return SetDynamicAttributeValue(fByteSize, value);
}
@ -871,10 +874,7 @@ DIEAccessDeclaration::Tag() const
DIEBaseType::DIEBaseType()
:
fEncoding(0),
fEndianity(0),
fByteSize(0),
fBitSize(0),
fBitOffset(0)
fEndianity(0)
{
}
@ -899,8 +899,7 @@ status_t
DIEBaseType::AddAttribute_byte_size(uint16 attributeName,
const AttributeValue& value)
{
fByteSize = value.constant;
return B_OK;
return SetDynamicAttributeValue(fByteSize, value);
}
@ -908,8 +907,7 @@ status_t
DIEBaseType::AddAttribute_bit_size(uint16 attributeName,
const AttributeValue& value)
{
fBitSize = value.constant;
return B_OK;
return SetDynamicAttributeValue(fBitSize, value);
}
@ -917,8 +915,7 @@ status_t
DIEBaseType::AddAttribute_bit_offset(uint16 attributeName,
const AttributeValue& value)
{
fBitOffset = value.constant;
return B_OK;
return SetDynamicAttributeValue(fBitOffset, value);
}
@ -1379,9 +1376,8 @@ DIECondition::Tag() const
DIESharedType::DIESharedType()
:
fBlockSize(DWARF_ADDRESS_MAX)
{
fBlockSize.SetTo(DWARF_ADDRESS_MAX);
}
@ -1396,8 +1392,7 @@ status_t
DIESharedType::AddAttribute_count(uint16 attributeName,
const AttributeValue& value)
{
fBlockSize = value.constant;
return B_OK;
return SetDynamicAttributeValue(fBlockSize, value);
}

View File

@ -291,11 +291,15 @@ class DIECompoundType : public DIEDeclaredType {
public:
DIECompoundType();
virtual status_t AddAttribute_byte_size(uint16 attributeName,
const AttributeValue& value);
// TODO: !interface
// TODO:
// DW_AT_byte_size // !interface
// DW_AT_specification // !interface
protected:
DynamicAttributeValue fByteSize;
};
@ -335,10 +339,10 @@ public:
// DW_AT_specification
private:
uint64 fBitStride;
dwarf_addr_t fByteSize;
uint8 fOrdering;
DynamicAttributeValue fBitStride;
DynamicAttributeValue fByteSize;
DebugInfoEntryList fDimensions;
uint8 fOrdering;
};
@ -628,11 +632,11 @@ public:
// DW_AT_small
private:
DynamicAttributeValue fByteSize;
DynamicAttributeValue fBitOffset;
DynamicAttributeValue fBitSize;
uint8 fEncoding;
uint8 fEndianity;
uint16 fByteSize;
uint16 fBitSize;
uint16 fBitOffset;
};
@ -890,7 +894,7 @@ public:
const AttributeValue& value);
private:
uint64 fBlockSize;
DynamicAttributeValue fBlockSize;
DeclarationLocation fDeclarationLocation;
};