Package ghidra.program.model.lang
Class ParameterPieces
java.lang.Object
ghidra.program.model.lang.ParameterPieces
Basic elements of a parameter: address, data-type, properties
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignAddressFromPieces
(ArrayList<Varnode> pieces, boolean mostToLeast, boolean onePieceJoin, Language language) Generate a parameter address given the list of Varnodes making up the parameter.getVariableStorage
(Program program) mergeSequence
(ArrayList<Varnode> seq, Language language) Assuming the given list of Varnodes go from most significant to least significant, merge any contiguous elements in the list.void
Swap data-type markup between this and another parameter Swap any data-type and flags, but leave the storage address intact.
-
Field Details
-
address
-
type
-
joinPieces
-
isThisPointer
public boolean isThisPointer -
isIndirect
public boolean isIndirect
-
-
Constructor Details
-
ParameterPieces
public ParameterPieces()
-
-
Method Details
-
swapMarkup
Swap data-type markup between this and another parameter Swap any data-type and flags, but leave the storage address intact. This assumes the two parameters are the same size.- Parameters:
op
- is the other parameter to swap with this.
-
getVariableStorage
-
mergeSequence
Assuming the given list of Varnodes go from most significant to least significant, merge any contiguous elements in the list. Merges in a register space are only allowed if the bigger Varnode exists as a formal register.- Parameters:
seq
- is the given list of Varnodeslanguage
- is the Language associated with the calling convention.- Returns:
- the merged list (which may be the original list)
-
assignAddressFromPieces
public void assignAddressFromPieces(ArrayList<Varnode> pieces, boolean mostToLeast, boolean onePieceJoin, Language language) Generate a parameter address given the list of Varnodes making up the parameter.- Parameters:
pieces
- is the given list of VarnodesmostToLeast
- is true if the list is ordered most significant to leastonePieceJoin
- is true if the address should be considered a join of one piecelanguage
- is the Language associated with the calling convention
-