Package ghidra.program.model.pcode
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ghidra.program.model.pcode.PcodeBlock
PcodeBlock.BlockEdge
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(Address addr)
Is the given address in the range of instructions represented by this basic blockjava.util.Iterator<PcodeOp>
getIterator()
Address
getStart()
Address
getStop()
protected void
insertAfter(java.util.Iterator<PcodeOp> iter, PcodeOp op)
Insert a new PcodeOp after a specific point in the list of PcodeOpsprotected void
insertBefore(java.util.Iterator<PcodeOp> iter, PcodeOp op)
Insert a new PcodeOp before a specific point in the list of PcodeOpsprotected void
insertEnd(PcodeOp op)
Insert a PcodeOp at the end of the blockprotected void
remove(PcodeOp op)
Remove a PcodeOp from the blockvoid
restoreXmlBody(XmlPullParser parser, BlockMap resolver)
Restore the any additional information beyond header and edges from XMLvoid
saveXmlBody(java.io.Writer writer)
Serialize information about the block to XML, other than header and edge info-
Methods inherited from class ghidra.program.model.pcode.PcodeBlock
addInEdge, calcDepth, getFalseOut, getFrontLeaf, getIn, getIndex, getInRevIndex, getInSize, getOut, getOutRevIndex, getOutSize, getParent, getTrueOut, getType, nameToType, restoreNextInEdge, restoreNextInEdge, restoreXml, restoreXmlEdges, restoreXmlHeader, saveXml, saveXmlEdges, saveXmlHeader, setIndex, toString, typeToName
-
-
-
-
Method Detail
-
getStart
public Address getStart()
- Overrides:
getStart
in classPcodeBlock
- Returns:
- the first Address covered by this block
-
getStop
public Address getStop()
- Overrides:
getStop
in classPcodeBlock
- 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(java.util.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 beforeop
- is the new PcodeOp to insert
-
insertAfter
protected void insertAfter(java.util.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 afterop
- 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 java.util.Iterator<PcodeOp> getIterator()
- Returns:
- an iterator over the PcodeOps in this basic block
-
saveXmlBody
public void saveXmlBody(java.io.Writer writer) throws java.io.IOException
Description copied from class:PcodeBlock
Serialize information about the block to XML, other than header and edge info- Overrides:
saveXmlBody
in classPcodeBlock
- Parameters:
writer
- is where to serialize to- Throws:
java.io.IOException
- if there is a problem with the stream
-
restoreXmlBody
public void restoreXmlBody(XmlPullParser parser, BlockMap resolver) throws PcodeXMLException
Description copied from class:PcodeBlock
Restore the any additional information beyond header and edges from XML- Overrides:
restoreXmlBody
in classPcodeBlock
- Parameters:
parser
- is the XML parserresolver
- is for looking up edge references- Throws:
PcodeXMLException
- for invalid XML descriptions
-
-