Class PcodeBlockBasic

java.lang.Object
ghidra.program.model.pcode.PcodeBlock
ghidra.program.model.pcode.PcodeBlockBasic

public class PcodeBlockBasic extends PcodeBlock
A basic block constructed from PcodeOps
  • Method Details

    • getStart

      public Address getStart()
      Overrides:
      getStart in class PcodeBlock
      Returns:
      the first Address covered by this block
    • getStop

      public Address getStop()
      Overrides:
      getStop in class PcodeBlock
      Returns:
      the last Address covered by this block
    • contains

      public boolean contains(Address addr)
      Is the given address in the range of instructions represented by this basic block
      Parameters:
      addr - is the Address
      Returns:
      true if the Address is contained
    • insertBefore

      protected void insertBefore(Iterator<PcodeOp> iter, PcodeOp op)
      Insert a new PcodeOp before a specific point in the list of PcodeOps
      Parameters:
      iter - points to the PcodeOp to insert before
      op - is the new PcodeOp to insert
    • insertAfter

      protected void insertAfter(Iterator<PcodeOp> iter, PcodeOp op)
      Insert a new PcodeOp after a specific point in the list of PcodeOps
      Parameters:
      iter - points to the PcodeOp to insert after
      op - is the new PcodeOp to insert
    • insertEnd

      protected void insertEnd(PcodeOp op)
      Insert a PcodeOp at the end of the block
      Parameters:
      op - is the PcodeOp to insert
    • remove

      protected void remove(PcodeOp op)
      Remove a PcodeOp from the block
      Parameters:
      op - is the PcodeOp to remove
    • getIterator

      public Iterator<PcodeOp> getIterator()
      Returns:
      an iterator over the PcodeOps in this basic block
    • encodeBody

      protected void encodeBody(Encoder encoder) throws IOException
      Description copied from class: PcodeBlock
      Encode information about the block to stream, other than header and edge info
      Overrides:
      encodeBody in class PcodeBlock
      Parameters:
      encoder - is the stream encoder
      Throws:
      IOException - for errors writing to the underlying stream
    • decodeBody

      protected void decodeBody(Decoder decoder, BlockMap resolver) throws DecoderException
      Description copied from class: PcodeBlock
      Restore the any additional information beyond header and edges from stream
      Overrides:
      decodeBody in class PcodeBlock
      Parameters:
      decoder - is the stream decoder
      resolver - is for looking up edge references
      Throws:
      DecoderException - for invalid encoding
    • getFirstOp

      public PcodeOp getFirstOp()
      Returns:
      the first PcodeOp in this block (or null if the block is empty)
    • getLastOp

      public PcodeOp getLastOp()
      Returns:
      the last PcodeOp in this block (or null if the block is empty)