Search in sources :

Example 6 with ReadMemoryReply

use of com.google.security.zynamics.binnavi.debug.connection.packets.replies.ReadMemoryReply in project binnavi by google.

the class CDebuggerSynchronizerTest method testMemorySucc.

@Test
public void testMemorySucc() {
    debuggerSynchronizer.receivedEvent(new ReadMemoryReply(0, 0, CommonTestObjects.BP_ADDRESS_123.getAddress().getAddress(), "Hannes".getBytes()));
    assertEquals(0, listener.exception);
    assertEquals("RECEIVED_MEMORY/00000123/6;", listener.events);
    assertTrue(mockDebugger.getProcessManager().getMemory().hasData(0x123, 6));
}
Also used : ReadMemoryReply(com.google.security.zynamics.binnavi.debug.connection.packets.replies.ReadMemoryReply) Test(org.junit.Test)

Example 7 with ReadMemoryReply

use of com.google.security.zynamics.binnavi.debug.connection.packets.replies.ReadMemoryReply in project binnavi by google.

the class CDebuggerSynchronizerTest method testMemoryErr.

@Test
public void testMemoryErr() {
    debuggerSynchronizer.receivedEvent(new ReadMemoryReply(0, 5, null, null));
    assertEquals(0, listener.exception);
    assertEquals("ERROR_READING_MEMORY/5;", listener.events);
    assertFalse(mockDebugger.getProcessManager().getMemory().hasData(CommonTestObjects.BP_ADDRESS_123.getAddress().getAddress().toLong(), 6));
}
Also used : ReadMemoryReply(com.google.security.zynamics.binnavi.debug.connection.packets.replies.ReadMemoryReply) Test(org.junit.Test)

Aggregations

ReadMemoryReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ReadMemoryReply)7 Test (org.junit.Test)6 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)4 MockDebugger (com.google.security.zynamics.binnavi.Debug.Debugger.MockDebugger)2 CDumpAllWaiter (com.google.security.zynamics.binnavi.Gui.Debug.MemoryPanel.Implementations.CDumpAllWaiter)2 EchoBreakpointSetReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.EchoBreakpointSetReply)2 EchoBreakpointsRemovedReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.EchoBreakpointsRemovedReply)2 ExceptionOccurredReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ExceptionOccurredReply)2 HaltReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.HaltReply)2 ListFilesReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ListFilesReply)2 ListProcessesReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ListProcessesReply)2 MemoryMapReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.MemoryMapReply)2 ModuleLoadedReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ModuleLoadedReply)2 ModuleUnloadedReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ModuleUnloadedReply)2 ProcessClosedReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ProcessClosedReply)2 RegistersReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.RegistersReply)2 RequestTargetReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.RequestTargetReply)2 ResumeReply (com.google.security.zynamics.binnavi.debug.connection.packets.replies.ResumeReply)2 MemoryMap (com.google.security.zynamics.binnavi.debug.models.processmanager.MemoryMap)2 MemoryModule (com.google.security.zynamics.binnavi.debug.models.processmanager.MemoryModule)2