Search in sources :

Example 6 with TraceEvent

use of com.google.security.zynamics.binnavi.debug.models.trace.TraceEvent in project binnavi by google.

the class CEventValueTableModelTest method foo.

@Test
public void foo() {
    final CEventValueTableModel model = new CEventValueTableModel();
    final INaviModule mockModule = new MockModule();
    final TraceEvent event = new TraceEvent(77, new BreakpointAddress(mockModule, new UnrelocatedAddress(new CAddress(0x123))), TraceEventType.REGULAR_BREAKPOINT, Lists.newArrayList(new TraceRegister("eax", new CAddress(0x123), new byte[] { 05, 06, 07 })));
    assertEquals(0, model.getRowCount());
    model.setEvent(event);
    assertEquals(1, model.getRowCount());
    assertEquals("eax", model.getValueAt(0, 0));
    assertEquals("00000123", model.getValueAt(0, 1));
    assertEquals("05 06 07", model.getValueAt(0, 2));
}
Also used : INaviModule(com.google.security.zynamics.binnavi.disassembly.INaviModule) MockModule(com.google.security.zynamics.binnavi.disassembly.Modules.MockModule) UnrelocatedAddress(com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress) TraceRegister(com.google.security.zynamics.binnavi.debug.models.trace.TraceRegister) BreakpointAddress(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress) CEventValueTableModel(com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CEventValueTableModel) TraceEvent(com.google.security.zynamics.binnavi.debug.models.trace.TraceEvent) CAddress(com.google.security.zynamics.zylib.disassembly.CAddress) Test(org.junit.Test)

Aggregations

BreakpointAddress (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress)6 TraceEvent (com.google.security.zynamics.binnavi.debug.models.trace.TraceEvent)6 TraceRegister (com.google.security.zynamics.binnavi.debug.models.trace.TraceRegister)6 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)6 UnrelocatedAddress (com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress)6 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)5 Test (org.junit.Test)5 ITraceEvent (com.google.security.zynamics.binnavi.debug.models.trace.interfaces.ITraceEvent)4 MockModule (com.google.security.zynamics.binnavi.disassembly.Modules.MockModule)4 ArrayList (java.util.ArrayList)4 CTraceFilterCreator (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CTraceFilterCreator)3 TraceList (com.google.security.zynamics.binnavi.debug.models.trace.TraceList)3 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)1 CEventTableModel (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CEventTableModel)1 CEventValueTableModel (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CEventValueTableModel)1 TraceEventType (com.google.security.zynamics.binnavi.debug.models.trace.TraceEventType)1 INaviProject (com.google.security.zynamics.binnavi.disassembly.INaviProject)1 ExpensiveBaseTest (com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest)1 FilledList (com.google.security.zynamics.zylib.types.lists.FilledList)1 IFilledList (com.google.security.zynamics.zylib.types.lists.IFilledList)1