Search in sources :

Example 16 with StandardEnvironment

use of com.google.security.zynamics.reil.translators.StandardEnvironment in project binnavi by google.

the class ReilTranslatorTest method testStos.

@Test
public void testStos() throws InternalTranslationException {
    final ReilGraph g = m_translator.translate(new StandardEnvironment(), new MockInstruction("stosb", new ArrayList<MockOperandTree>()));
    System.out.println(g.getNodes().get(0).getInstructions());
    System.out.println(g.getNodes().get(1).getInstructions());
    System.out.println(g.getNodes().get(2).getInstructions());
    System.out.println(g.getNodes().get(3).getInstructions());
    System.out.println(g.getEdges());
    assertEquals(4, g.nodeCount());
    assertEquals(4, g.edgeCount());
}
Also used : ReilGraph(com.google.security.zynamics.reil.ReilGraph) MockInstruction(com.google.security.zynamics.zylib.disassembly.MockInstruction) ArrayList(java.util.ArrayList) StandardEnvironment(com.google.security.zynamics.reil.translators.StandardEnvironment) Test(org.junit.Test)

Aggregations

StandardEnvironment (com.google.security.zynamics.reil.translators.StandardEnvironment)16 Test (org.junit.Test)10 ArrayList (java.util.ArrayList)7 INaviInstruction (com.google.security.zynamics.binnavi.disassembly.INaviInstruction)5 ReilTranslator (com.google.security.zynamics.reil.translators.ReilTranslator)5 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)4 ReilGraph (com.google.security.zynamics.reil.ReilGraph)4 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)3 ReilFunction (com.google.security.zynamics.reil.ReilFunction)3 ReilInstruction (com.google.security.zynamics.reil.ReilInstruction)3 MockCodeContainer (com.google.security.zynamics.zylib.disassembly.MockCodeContainer)3 MockInstruction (com.google.security.zynamics.zylib.disassembly.MockInstruction)3 HashSet (java.util.HashSet)3 CCodeNode (com.google.security.zynamics.binnavi.disassembly.CCodeNode)2 RegisterSetLatticeElement (com.google.security.zynamics.reil.algorithms.mono2.registertracking.RegisterSetLatticeElement)2 RegisterTrackingOptions (com.google.security.zynamics.reil.algorithms.mono2.registertracking.RegisterTrackingOptions)2 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)2 MockBlockContainer (com.google.security.zynamics.zylib.disassembly.MockBlockContainer)2 MockCodeNodeData (com.google.security.zynamics.binnavi.Database.MockClasses.MockCodeNodeData)1 MockCodeNodeProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockCodeNodeProvider)1