use of com.google.security.zynamics.binnavi.disassembly.RelocatedAddress in project binnavi by google.
the class BreakpointSetParser method parseSuccess.
@Override
public BreakpointSetReply parseSuccess(final int packetId, final int argumentCount) throws IOException {
final int counter = parseInteger();
final List<Pair<RelocatedAddress, Integer>> addresses = new ArrayList<>();
for (int i = 0; i < counter; i++) {
final RelocatedAddress address = new RelocatedAddress(parseAddress());
final int error = parseInteger();
addresses.add(new Pair<RelocatedAddress, Integer>(address, error));
}
return new BreakpointSetReply(packetId, 0, addresses);
}
use of com.google.security.zynamics.binnavi.disassembly.RelocatedAddress in project binnavi by google.
the class EchoBreakpointRemovedParser method parseSuccess.
@Override
public EchoBreakpointsRemovedReply parseSuccess(final int packetId, final int argumentCount) throws IOException {
final int counter = parseInteger();
final List<Pair<RelocatedAddress, Integer>> addresses = new ArrayList<>();
for (int i = 0; i < counter; i++) {
final RelocatedAddress address = new RelocatedAddress(parseAddress());
final int error = parseInteger();
addresses.add(new Pair<RelocatedAddress, Integer>(address, error));
}
return new EchoBreakpointsRemovedReply(packetId, 0, addresses);
}
use of com.google.security.zynamics.binnavi.disassembly.RelocatedAddress in project binnavi by google.
the class EchoBreakpointSetParser method parseSuccess.
@Override
public EchoBreakpointSetReply parseSuccess(final int packetId, final int argumentCount) throws IOException {
final int counter = parseInteger();
final List<Pair<RelocatedAddress, Integer>> addresses = new ArrayList<>();
for (int i = 0; i < counter; i++) {
final RelocatedAddress address = new RelocatedAddress(parseAddress());
final int error = parseInteger();
addresses.add(new Pair<RelocatedAddress, Integer>(address, error));
}
return new EchoBreakpointSetReply(packetId, 0, addresses);
}
use of com.google.security.zynamics.binnavi.disassembly.RelocatedAddress in project binnavi by google.
the class MemoryModuleParser method parseModule.
/**
* Parses a single module information message.
*
* @param node The xml node which contains the module item.
* @return The memory module object created from the information in the message.
* @throws MessageParserException Thrown if parsing the message failed.
*/
public static MemoryModule parseModule(final Node node) throws MessageParserException {
try {
final String name = getAttribute(node, "name");
final String path = getAttribute(node, "path");
final RelocatedAddress baseAddress = new RelocatedAddress(new CAddress(new BigInteger(getAttribute(node, "address"))));
final long size = Long.valueOf(getAttribute(node, "size"));
return new MemoryModule(name, path, baseAddress, size);
} catch (final Exception exception) {
throw new MessageParserException(exception.getLocalizedMessage());
}
}
use of com.google.security.zynamics.binnavi.disassembly.RelocatedAddress in project binnavi by google.
the class TargetProcessThread method setCurrentAddress.
/**
* Sets the current value of the instruction pointer of the thread. The parameter can be null to
* imply that the thread resumed.
*
* @param address The new value of the instruction pointer or null.
*/
public void setCurrentAddress(final RelocatedAddress address) {
Preconditions.checkNotNull(address, "IE00763: Address argument can not be null");
final RelocatedAddress oldAddress = relocatedAddress;
relocatedAddress = address;
for (final ThreadListener listener : listeners) {
try {
listener.instructionPointerChanged(this, oldAddress);
} catch (final Exception exception) {
CUtilityFunctions.logException(exception);
}
}
}
Aggregations