Merge remote-tracking branch 'origin/GP-3783_VariableGroupCheck'

This commit is contained in:
Ryan Kurtz 2023-08-30 07:03:22 -04:00
commit f491369ac5
3 changed files with 18 additions and 6 deletions

View file

@ -207,6 +207,7 @@ public:
void clearMark(void) const { flags &= ~Varnode::mark; } ///< Clear the mark on this variable
bool isMark(void) const { return ((flags&Varnode::mark)!=0); } ///< Return \b true if \b this is marked
bool isUnmerged(void) const { return ((highflags&unmerged)!=0); } ///< Return \b true if \b this has merge problems
bool isSameGroup(const HighVariable *op2) const; ///< Is \b this part of the same VariableGroup as \b op2
/// \brief Determine if \b this HighVariable has an associated cover.
///
@ -297,5 +298,16 @@ inline const Cover &HighVariable::getCover(void) const
return piece->getCover();
}
/// Test if the two HighVariables should be pieces of the same symbol.
/// \param op2 is the other HighVariable to compare with \b this
/// \return \b true if they share the same underlying VariableGroup
inline bool HighVariable::isSameGroup(const HighVariable *op2) const
{
if (piece == (VariablePiece *)0 || op2->piece == (VariablePiece *)0)
return false;
return piece->getGroup() == op2->piece->getGroup();
}
} // End namespace ghidra
#endif