|
Ghidra 11.4.2
Ghidra internal decompiler documentation.
|
Helper class for resolving cross-references while deserializing BlockGraph objects. More...
#include <block.hh>
Public Member Functions | |
| void | sortList (void) |
| Sort the list of FlowBlock objects. | |
| FlowBlock * | findLevelBlock (int4 index) const |
| Find the FlowBlock matching the given index. | |
| FlowBlock * | createBlock (const string &name) |
| Create a FlowBlock of the named type. | |
Private Member Functions | |
| FlowBlock * | resolveBlock (FlowBlock::block_type bt) |
| Construct a FlowBlock of the given type. | |
Static Private Member Functions | |
| static FlowBlock * | findBlock (const vector< FlowBlock * > &list, int4 ind) |
| Locate a FlowBlock with a given index. | |
Private Attributes | |
| vector< FlowBlock * > | sortlist |
| The list of deserialized FlowBlock objects. | |
Helper class for resolving cross-references while deserializing BlockGraph objects.
FlowBlock objects are serialized with their associated index value and edges are serialized with the indices of the FlowBlock end-points. During deserialization, this class maintains a list of FlowBlock objects sorted by index and then looks up the FlowBlock matching a given index as edges specify them.
| FlowBlock * ghidra::BlockMap::createBlock | ( | const string & | name | ) |
Create a FlowBlock of the named type.
Given the name of a block (deserialized from a <bhead> tag), build the corresponding type of block.
| name | is the name of the block type |
References ghidra::FlowBlock::nameToType(), resolveBlock(), and sortlist.
Referenced by ghidra::BlockGraph::decodeBody().
|
staticprivate |
Locate a FlowBlock with a given index.
Given a list of FlowBlock objects sorted by index, use binary search to find the FlowBlock with matching index
References ghidra::FlowBlock::getIndex().
Referenced by findLevelBlock().
|
inline |
Find the FlowBlock matching the given index.
| index | is the given index |
References findBlock(), and sortlist.
Referenced by ghidra::BlockEdge::decode().
|
private |
Construct a FlowBlock of the given type.
| bt | is the block_type |
Referenced by createBlock().