use of com.google.security.zynamics.binnavi.debug.connection.packets.parsers.MessageParserException in project binnavi by google.
the class SingleStepParser method parseSuccess.
@Override
public SingleStepReply parseSuccess(final int packetId, final int argumentCount) throws IOException {
final long tid = parseThreadId();
final RelocatedAddress address = new RelocatedAddress(parseAddress());
try {
final RegisterValues registerValues = RegisterValuesParser.parse(parseData());
return new SingleStepReply(packetId, 0, tid, address, registerValues);
} catch (final MessageParserException e) {
return new SingleStepReply(packetId, PARSER_ERROR, tid, address, null);
}
}
use of com.google.security.zynamics.binnavi.debug.connection.packets.parsers.MessageParserException in project binnavi by google.
the class StepBreakpointHitParser method parseSuccess.
@Override
public StepBreakpointHitReply parseSuccess(final int packetId, final int argumentCount) throws IOException {
final long tid = parseThreadId();
final byte[] data = parseData();
try {
final RegisterValues registerValues = RegisterValuesParser.parse(data);
return new StepBreakpointHitReply(packetId, 0, tid, registerValues);
} catch (final MessageParserException e) {
return new StepBreakpointHitReply(packetId, PARSER_ERROR, tid, null);
}
}
use of com.google.security.zynamics.binnavi.debug.connection.packets.parsers.MessageParserException in project binnavi by google.
the class CDebuggerSynchronizerTest method testRegisterValues_Malformed.
@Test
public void testRegisterValues_Malformed() {
mockDebugger.getProcessManager().addThread(new TargetProcessThread(123, ThreadState.RUNNING));
NaviLogger.setLevel(Level.OFF);
try {
debuggerSynchronizer.receivedEvent(new RegistersReply(0, 0, RegisterValuesParser.parse("Hannes".getBytes())));
fail();
} catch (final MessageParserException exception) {
CUtilityFunctions.logException(exception);
} finally {
NaviLogger.setLevel(Level.SEVERE);
}
}
Aggregations