Debugger: Fix handling of contained type attribute.
The DIEs generated by gcc sometimes pass a modified type for DIEPointerToMember's containing type. As such, we need to resolve the passed in type down to its base type before verifying that it's indeed a compound type.
This commit is contained in:
@@ -1431,7 +1431,12 @@ status_t
|
|||||||
DIEPointerToMemberType::AddAttribute_containing_type(uint16 attributeName,
|
DIEPointerToMemberType::AddAttribute_containing_type(uint16 attributeName,
|
||||||
const AttributeValue& value)
|
const AttributeValue& value)
|
||||||
{
|
{
|
||||||
fContainingType = dynamic_cast<DIECompoundType*>(value.reference);
|
DebugInfoEntry* type = value.reference;
|
||||||
|
DIEModifiedType* modifiedType;
|
||||||
|
while ((modifiedType = dynamic_cast<DIEModifiedType*>(type)) != NULL)
|
||||||
|
type = modifiedType->GetType();
|
||||||
|
|
||||||
|
fContainingType = dynamic_cast<DIECompoundType*>(type);
|
||||||
return fContainingType != NULL ? B_OK : B_BAD_DATA;
|
return fContainingType != NULL ? B_OK : B_BAD_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user