use of com.google.security.zynamics.binnavi.debug.models.processmanager.TargetProcessThread in project binnavi by google.
the class CRegisterViewSynchronizer method updateGui.
/**
* Updates the GUI according to the state of the debugger.
*/
private void updateGui() {
final IDebugger activeDebugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();
final TargetProcessThread activeThread = activeDebugger == null ? null : activeDebugger.getProcessManager().getActiveThread();
m_registerView.setEnabled(activeThread != null && activeDebugger != null && activeDebugger.isConnected());
}
use of com.google.security.zynamics.binnavi.debug.models.processmanager.TargetProcessThread in project binnavi by google.
the class CRegisterViewSynchronizer method synchronizeDebugger.
/**
*
*
* @param oldDebugger
* @param activeDebugger
*/
private void synchronizeDebugger(final IDebugger oldDebugger, final IDebugger activeDebugger) {
TargetProcessThread oldThread = null;
if (oldDebugger != null) {
oldDebugger.getProcessManager().removeListener(m_processListener);
oldThread = oldDebugger.getProcessManager().getActiveThread();
}
if (activeDebugger != null) {
final TargetInformation targetInformation = activeDebugger.getProcessManager().getTargetInformation();
if (targetInformation != null) {
m_dataProvider.setRegisterDescription(targetInformation.getRegisters());
}
activeDebugger.getProcessManager().addListener(m_processListener);
synchronizeThread(oldThread, activeDebugger.getProcessManager().getActiveThread());
}
}
use of com.google.security.zynamics.binnavi.debug.models.processmanager.TargetProcessThread in project binnavi by google.
the class CThreadInformationTableRenderer method getTableCellRendererComponent.
@Override
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
final TargetProcessThread module = ((CThreadInformationTable) table).getModel().getThreads().get(row);
final Color color = m_colorGenerator.getColor(module);
setBackground(color == null ? Color.WHITE : color);
return this;
}
use of com.google.security.zynamics.binnavi.debug.models.processmanager.TargetProcessThread in project binnavi by google.
the class CThreadPanelSynchronizer method updateGui.
/**
* Re-populates the thread box with all the threads of the currently selected debugger.
*/
private void updateGui() {
m_tidBox.removeAllItems();
final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();
if (debugger == null) {
m_tidBox.setEnabled(false);
} else {
final List<TargetProcessThread> threads = debugger.getProcessManager().getThreads();
for (final TargetProcessThread thread : threads) {
m_tidBox.addItem(thread);
}
if (!threads.isEmpty()) {
m_tidBox.setSelectedIndex(0);
}
m_tidBox.setEnabled(true);
}
}
use of com.google.security.zynamics.binnavi.debug.models.processmanager.TargetProcessThread in project binnavi by google.
the class CMemorySectionPanelSynchronizer method synchronizeDebugger.
/**
* Keeps the memory section box synchronized with the currently active debugger of the debug GUI
* perspective.
*
* @param oldDebugger The previously active debugger.
* @param newDebugger The currently active debugger.
*/
private void synchronizeDebugger(final IDebugger oldDebugger, final IDebugger newDebugger) {
TargetProcessThread oldThread = null;
if (oldDebugger != null) {
oldDebugger.getProcessManager().removeListener(processManagerListener);
oldThread = oldDebugger.getProcessManager().getActiveThread();
}
if (newDebugger != null) {
newDebugger.getProcessManager().addListener(processManagerListener);
final TargetInformation targetInformation = newDebugger.getProcessManager().getTargetInformation();
if (targetInformation != null) {
updateMemoryBox();
}
synchronizeThreads(oldThread, newDebugger.getProcessManager().getActiveThread());
}
updateGui();
}
Aggregations