Class FunctionDescription
java.lang.Object
ghidra.features.bsim.query.description.FunctionDescription
- All Implemented Interfaces:
Comparable<FunctionDescription>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic Map<Long, FunctionDescription> Create a map from addresses to functionsbooleandiffForUpdate(FunctionDescription.Update res, FunctionDescription fromDB) Update the boolean fields in -res- to true, for every field in -this- that needs to be updated from -fromDB-booleanstatic List<FunctionDescription.Update> generateUpdates(Iterator<FunctionDescription> iter, Map<Long, FunctionDescription> addrMap, List<FunctionDescription> badList) Match new functions to old functions via the address, test if there is an update between the two functions, generate an update record if there is, return the list of updateslongintgetFlags()getId()longinthashCode()printRaw()static FunctionDescriptionrestoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory, DescriptionManager man, ExecutableRecord erec) voidvoidvoidtoString()
-
Constructor Details
-
FunctionDescription
-
-
Method Details
-
setSignatureRecord
-
getFunctionName
-
getExecutableRecord
-
getSignatureRecord
-
getCallgraphRecord
-
getId
-
getVectorId
public long getVectorId() -
getAddress
public long getAddress() -
getFlags
public int getFlags() -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<FunctionDescription>
-
sortCallgraph
public void sortCallgraph() -
printRaw
-
saveXml
- Throws:
IOException
-
diffForUpdate
Update the boolean fields in -res- to true, for every field in -this- that needs to be updated from -fromDB-- Parameters:
res- stores the boolean results for which fields to updatefromDB- is the metadata to compare with -this- to decided if updates are necessary- Returns:
- true if one or more updates is necessary
-
restoreXml
public static FunctionDescription restoreXml(XmlPullParser parser, LSHVectorFactory vectorFactory, DescriptionManager man, ExecutableRecord erec) throws LSHException - Throws:
LSHException
-
createAddressToFunctionMap
public static Map<Long,FunctionDescription> createAddressToFunctionMap(Iterator<FunctionDescription> iter) Create a map from addresses to functions- Parameters:
iter- is the list of functions to map- Returns:
- the Map
-
generateUpdates
public static List<FunctionDescription.Update> generateUpdates(Iterator<FunctionDescription> iter, Map<Long, FunctionDescription> addrMap, List<FunctionDescription> badList) Match new functions to old functions via the address, test if there is an update between the two functions, generate an update record if there is, return the list of updates- Parameters:
iter- is the list of NEW functionsaddrMap- is a map from address to OLD functionsbadList- is a container for new functions that could not be mapped to old- Returns:
- the list of Update records
-