Class ParameterPieces

java.lang.Object
ghidra.program.model.lang.ParameterPieces

public class ParameterPieces extends Object
Basic elements of a parameter: address, data-type, properties
  • Field Details

    • address

      public Address address
    • type

      public DataType type
    • joinPieces

      public Varnode[] joinPieces
    • isThisPointer

      public boolean isThisPointer
    • hiddenReturnPtr

      public boolean hiddenReturnPtr
    • isIndirect

      public boolean isIndirect
  • Constructor Details

    • ParameterPieces

      public ParameterPieces()
  • Method Details

    • swapMarkup

      public void swapMarkup(ParameterPieces op)
      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

      public VariableStorage getVariableStorage(Program program)
    • mergeSequence

      public static ArrayList<Varnode> 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. Merges in a register space are only allowed if the bigger Varnode exists as a formal register.
      Parameters:
      seq - is the given list of Varnodes
      language - 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 Varnodes
      mostToLeast - is true if the list is ordered most significant to least
      onePieceJoin - is true if the address should be considered a join of one piece
      language - is the Language associated with the calling convention