Search in sources :

Example 1 with ThreadListener

use of com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener in project binnavi by google.

the class TargetProcessThread method setRegisterValues.

/**
   * Sets the currently known register values of the thread.
   *
   * @param registerValues The new register values.
   */
public void setRegisterValues(final List<RegisterValue> registerValues) {
    Preconditions.checkNotNull(registerValues, "IE00764: Register values argument can not be null");
    this.registerValues = ImmutableList.<RegisterValue>copyOf(registerValues);
    for (final ThreadListener listener : listeners) {
        try {
            listener.registersChanged(this);
        } catch (final Exception exception) {
            CUtilityFunctions.logException(exception);
        }
    }
}
Also used : ThreadListener(com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener)

Example 2 with ThreadListener

use of com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener in project binnavi by google.

the class TargetProcessThread method setState.

/**
   * Sets the current state of the thread.
   *
   * @param state The current state of the thread.
   */
public void setState(final ThreadState state) {
    Preconditions.checkNotNull(state, "IE00765: Thread state can not be null");
    if (threadState == state) {
        return;
    }
    if (state == ThreadState.RUNNING) {
        relocatedAddress = null;
    }
    threadState = state;
    for (final ThreadListener listener : listeners) {
        try {
            listener.stateChanged(this);
        } catch (final Exception exception) {
            CUtilityFunctions.logException(exception);
        }
    }
}
Also used : ThreadListener(com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener)

Example 3 with ThreadListener

use of com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener 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);
        }
    }
}
Also used : ThreadListener(com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener) RelocatedAddress(com.google.security.zynamics.binnavi.disassembly.RelocatedAddress)

Aggregations

ThreadListener (com.google.security.zynamics.binnavi.debug.models.processmanager.interfaces.ThreadListener)3 RelocatedAddress (com.google.security.zynamics.binnavi.disassembly.RelocatedAddress)1