mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-2291 Support for unions through partial containers
This commit is contained in:
parent
d3efd60d54
commit
cb9c12894e
21 changed files with 678 additions and 182 deletions
|
@ -39,6 +39,8 @@ ResolvedUnion::ResolvedUnion(Datatype *parent)
|
|||
ResolvedUnion::ResolvedUnion(Datatype *parent,int4 fldNum,TypeFactory &typegrp)
|
||||
|
||||
{
|
||||
if (parent->getMetatype() == TYPE_PARTIALUNION)
|
||||
parent = ((TypePartialUnion *)parent)->getParentUnion();
|
||||
baseType = parent;
|
||||
fieldNum = fldNum;
|
||||
lock = false;
|
||||
|
@ -67,6 +69,8 @@ ResolveEdge::ResolveEdge(const Datatype *parent,const PcodeOp *op,int4 slot)
|
|||
typeId = ((TypePointer *)parent)->getPtrTo()->getId(); // Strip pointer
|
||||
encoding += 0x1000; // Encode the fact that a pointer is getting accessed
|
||||
}
|
||||
else if (parent->getMetatype() == TYPE_PARTIALUNION)
|
||||
typeId = ((TypePartialUnion *)parent)->getParentUnion()->getId();
|
||||
else
|
||||
typeId = parent->getId();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue