mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
finalizing HighVariable from symbols
This commit is contained in:
parent
cbbfc9ca18
commit
cfc1177ac1
5 changed files with 30 additions and 14 deletions
|
@ -99,6 +99,8 @@ void HighVariable::updateType(void) const
|
|||
Varnode *vn;
|
||||
|
||||
if ((highflags&HighVariable::typedirty)==0) return; // Type is up to date
|
||||
highflags &= ~HighVariable::typedirty; // Mark type as clean
|
||||
if ((highflags & type_finalized)!=0) return; // Type has been finalized
|
||||
vn = getTypeRepresentative();
|
||||
|
||||
type = vn->getType();
|
||||
|
@ -106,7 +108,6 @@ void HighVariable::updateType(void) const
|
|||
flags &= ~Varnode::typelock;
|
||||
if (vn->isTypeLock())
|
||||
flags |= Varnode::typelock;
|
||||
highflags &= ~HighVariable::typedirty; // Mark type as clean
|
||||
}
|
||||
|
||||
/// Compare two Varnode objects based just on their storage address
|
||||
|
@ -198,6 +199,16 @@ void HighVariable::remove(Varnode *vn)
|
|||
}
|
||||
}
|
||||
|
||||
/// The data-type its dirtying mechanism is disabled. The data-type will not change, unless
|
||||
/// this method is called again.
|
||||
/// \param tp is the data-type to set
|
||||
void HighVariable::finalizeDatatype(Datatype *tp)
|
||||
|
||||
{
|
||||
type = tp;
|
||||
highflags |= type_finalized;
|
||||
}
|
||||
|
||||
/// The lists of members are merged and the other HighVariable is deleted.
|
||||
/// \param tv2 is the other HighVariable to merge into \b this
|
||||
/// \param isspeculative is \b true to keep the new members in separate \e merge classes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue