decompiler
1.0.0
|
A control-flow edge between blocks (FlowBlock) More...
#include <block.hh>
Public Member Functions | |
BlockEdge (void) | |
Constructor for use with decode. | |
BlockEdge (FlowBlock *pt, uint4 lab, int4 rev) | |
Constructor. | |
void | encode (Encoder &encoder) const |
Encode this edge to a stream. More... | |
void | decode (Decoder &decoder, BlockMap &resolver) |
Restore this edge from a stream. More... | |
Public Attributes | |
uint4 | label |
Label of the edge. | |
FlowBlock * | point |
Other end of the edge. | |
int4 | reverse_index |
Index for edge coming other way. | |
A control-flow edge between blocks (FlowBlock)
The edge is owned by the source block and can have FlowBlock::edge_flags labels applied to it. The point indicates the FlowBlock at the other end from the source block. NOTE: The control-flow direction of the edge can only be determined from context, whether the edge is in the incoming or outgoing edge list.
Restore this edge from a stream.
Parse an <edge> element
decoder | is the stream decoder |
resolver | is used to cross-reference the edge's FlowBlock endpoints |
References ghidra::Decoder::closeElement(), ghidra::BlockMap::findLevelBlock(), label, ghidra::Decoder::openElement(), point, ghidra::Decoder::readSignedInteger(), and reverse_index.
Referenced by BlockEdge(), ghidra::FlowBlock::decodeBody(), ghidra::FlowBlock::decodeNextInEdge(), and ghidra::BlockGraph::emit().
void ghidra::BlockEdge::encode | ( | Encoder & | encoder | ) | const |
Encode this edge to a stream.
The edge is saved assuming we already know what block we are in.
encoder | is the stream encoder |
References ghidra::Encoder::closeElement(), ghidra::FlowBlock::getIndex(), ghidra::Encoder::openElement(), point, reverse_index, and ghidra::Encoder::writeSignedInteger().
Referenced by BlockEdge(), ghidra::FlowBlock::decodeBody(), and ghidra::BlockGraph::encodeBody().