use of com.google.security.zynamics.reil.algorithms.mono2.common.instructiongraph.ReilInstructionGraphEdge in project binnavi by google.
the class CReilInstructionGraph method createInstructionEdge.
/**
* Creates an instruction graph edge between the source node and the destination node and returns
* the resulting yfiles edge.
*
* @param sourceNode The source node of the edge to be created.
* @param destinationNode The destination node of the edge to be created.
* @param isTrueEdge Boolean parameter to determine if the edge is a conditional true edge.
*
* @return The yfiles edge which has been created and inserted in the graph.
*/
private Edge createInstructionEdge(final Node sourceNode, final Node destinationNode, final boolean isTrueEdge) {
final ReilInstruction reilInstruction = m_nodesMap.get(destinationNode).getReilInstruction();
boolean isExitEdge = false;
if (reilInstruction != null) {
final IAddress reilInstructionAddress = reilInstruction.getAddress();
if ((reilInstructionAddress.toLong() & 0xFF) == 0) {
isExitEdge = true;
}
}
final Edge edge = m_internalGraph.createEdge(sourceNode, destinationNode);
m_edgesMap.put(edge, new ReilInstructionGraphEdge(isTrueEdge, isExitEdge));
return edge;
}
Aggregations