mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
HighSymbol support for isThis and isHidden properties
This commit is contained in:
parent
db139d2b81
commit
bcc0f7fe38
3 changed files with 73 additions and 3 deletions
|
@ -362,6 +362,8 @@ void Symbol::saveXmlHeader(ostream &s) const
|
|||
a_v_b(s,"hiddenretparm",true);
|
||||
if ((dispflags&isolate)!=0)
|
||||
a_v_b(s,"merge",false);
|
||||
if ((dispflags&is_this_ptr)!=0)
|
||||
a_v_b(s,"thisptr",true);
|
||||
int4 format = getDisplayFormat();
|
||||
if (format != 0) {
|
||||
s << " format=\"";
|
||||
|
@ -461,6 +463,10 @@ void Symbol::restoreXmlHeader(const Element *el)
|
|||
if (xml_readbool(el->getAttributeValue(i)))
|
||||
flags |= Varnode::typelock;
|
||||
}
|
||||
else if (attName == "thisptr") {
|
||||
if (xml_readbool(el->getAttributeValue(i)))
|
||||
dispflags |= is_this_ptr;
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
if (attName == "volatile") {
|
||||
|
|
|
@ -183,7 +183,8 @@ public:
|
|||
force_char = 5, ///< Force integer to be printed as a character constant
|
||||
size_typelock = 8, ///< Only the size of the symbol is typelocked
|
||||
isolate = 16, ///< Symbol should not speculatively merge automatically
|
||||
merge_problems = 32 ///< Set if some SymbolEntrys did not get merged
|
||||
merge_problems = 32, ///< Set if some SymbolEntrys did not get merged
|
||||
is_this_ptr = 64 ///< We are the "this" symbol for a class method
|
||||
};
|
||||
|
||||
Symbol(Scope *sc,const string &nm,Datatype *ct); ///< Construct given a name and data-type
|
||||
|
@ -198,6 +199,7 @@ public:
|
|||
bool isTypeLocked(void) const { return ((flags&Varnode::typelock)!=0); } ///< Is the Symbol type-locked
|
||||
bool isNameLocked(void) const { return ((flags&Varnode::namelock)!=0); } ///< Is the Symbol name-locked
|
||||
bool isSizeTypeLocked(void) const { return ((dispflags & size_typelock)!=0); } ///< Is the Symbol size type-locked
|
||||
bool isThisPointer(void) const { return ((dispflags & is_this_ptr)!=0); } ///< Is \b this the "this" pointer
|
||||
bool isIndirectStorage(void) const { return ((flags&Varnode::indirectstorage)!=0); } ///< Is storage really a pointer to the true Symbol
|
||||
bool isHiddenReturn(void) const { return ((flags&Varnode::hiddenretparm)!=0); } ///< Is this a reference to the function return value
|
||||
bool isNameUndefined(void) const; ///< Does \b this have an undefined name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue