Ghidra Decompiler Analysis Engine
|
All paths from a (putative) switch variable to the CPUI_BRANCHIND. More...
#include <jumptable.hh>
Public Member Functions | |
void | set (const PathMeld &op2) |
Copy paths from another container. More... | |
void | set (const vector< PcodeOpNode > &path) |
Initialize this to be a single path. More... | |
void | set (PcodeOp *op, Varnode *vn) |
Initialize this container to a single node "path". More... | |
void | append (const PathMeld &op2) |
Append a new set of paths to this set of paths. More... | |
void | clear (void) |
Clear this to be an empty container. | |
void | meld (vector< PcodeOpNode > &path) |
Meld a new path into this container. More... | |
void | markPaths (bool val, int4 startVarnode) |
Mark PcodeOps paths from the given start. More... | |
PcodeOp * | getEarliestOp (int4 pos) const |
Find earliest PcodeOp that has a specific common Varnode as input. More... | |
All paths from a (putative) switch variable to the CPUI_BRANCHIND.
This is a container for intersecting paths during the construction of a JumpModel. It contains every PcodeOp from some starting Varnode through all paths to a specific BRANCHIND. The paths can split and rejoin. This also keeps track of Varnodes that are present on all paths, as these are the potential switch variables for the model.
void PathMeld::append | ( | const PathMeld & | op2 | ) |
Append a new set of paths to this set of paths.
The new paths must all start at the common end-point of the paths in this container. The new set of melded paths start at the original common start point for this container, flow through this old common end-point, and end at the new common end-point.
op2 | is the set of paths to be appended |
PcodeOp * PathMeld::getEarliestOp | ( | int4 | pos | ) | const |
Find earliest PcodeOp that has a specific common Varnode as input.
The Varnode is specified by an index into sequence of Varnodes common to all paths in this PathMeld. We find the earliest (as in executed first) PcodeOp, within this PathMeld that uses the Varnode as input.
pos | is the index of the Varnode |
void PathMeld::markPaths | ( | bool | val, |
int4 | startVarnode | ||
) |
void PathMeld::meld | ( | vector< PcodeOpNode > & | path | ) |
Meld a new path into this container.
Add the new path, recalculating the set of Varnodes common to all paths. Paths are trimmed to ensure that any path that splits from the common intersection must eventually rejoin.
path | is the new path of PcodeOpNode edges to meld, in reverse execution order |
void PathMeld::set | ( | const PathMeld & | op2 | ) |
Copy paths from another container.
op2 | is the path container to copy from |
void PathMeld::set | ( | const vector< PcodeOpNode > & | path | ) |
Initialize this to be a single path.
This container is initialized to hold a single data-flow path.
path | is the list of PcodeOpNode edges in the path (in reverse execution order) |