use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger 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.debugger.interfaces.IDebugger in project binnavi by google.
the class CRefreshAction method actionPerformed.
@Override
public void actionPerformed(final ActionEvent event) {
final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();
if (debugger != null) {
CMemorySelectionFunctions.refreshMemory(m_parent, debugger, m_rangeProvider.getAddress(), m_rangeProvider.getSize());
final IAddress stackAddress = m_stackRangeProvider.getAddress();
final int size = m_stackRangeProvider.getSize();
if (stackAddress != null && size != 0) {
CMemorySelectionFunctions.refreshMemory(m_parent, debugger, stackAddress, size);
}
}
}
use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger in project binnavi by google.
the class CMemorySectionPanelSynchronizer method dispose.
/**
* Frees allocated resources.
*/
public void dispose() {
memorySectionBox.removeItemListener(memoryBoxListener);
debugPerspectiveModel.removeListener(debugListener);
final IDebugger activeDebugger = debugPerspectiveModel.getCurrentSelectedDebugger();
if (activeDebugger != null) {
synchronizeThreads(activeDebugger.getProcessManager().getActiveThread(), null);
}
synchronizeDebugger(debugPerspectiveModel.getCurrentSelectedDebugger(), null);
}
use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger in project binnavi by google.
the class CMemoryViewerSynchronizer method resizeData.
/**
* Adjusts size, base offset, and current offset of the hex view depending on a given address and
* the memory sections known to the debugger.
*
* @param address The memory address to consider.
*
* @return True, if the hex view was adjusted. False, if the address is not in any known memory
* section.
*/
private boolean resizeData(final IAddress address) {
if (address == null) {
return true;
}
final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();
if (debugger != null) {
final MemorySection section = ProcessHelpers.getSectionWith(debugger.getProcessManager().getMemoryMap(), address);
if (section == null) {
// No section with the given memory address
m_debugPerspectiveModel.setActiveMemoryAddress(null, false);
return false;
} else {
m_hexView.setBaseAddress(section.getStart().toLong());
m_provider.setMemorySize(section.getSize());
m_hexView.gotoOffset(address.toLong());
updateGui();
return true;
}
}
return true;
}
use of com.google.security.zynamics.binnavi.debug.debugger.interfaces.IDebugger in project binnavi by google.
the class CMemoryViewerSynchronizer method updateGui.
/**
* Updates the GUI depending on the state of the active debugger.
*/
private void updateGui() {
final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();
final TargetProcessThread thread = debugger == null ? null : debugger.getProcessManager().getActiveThread();
final boolean connected = debugger != null && debugger.isConnected();
final boolean suspended = connected && thread != null;
m_hexView.setEnabled(connected && suspended && m_provider.getDataLength() != 0);
if (connected) {
m_hexView.setDefinitionStatus(DefinitionStatus.DEFINED);
} else {
// m_hexView.setDefinitionStatus(DefinitionStatus.UNDEFINED);
m_provider.setMemorySize(0);
m_hexView.setBaseAddress(0);
m_hexView.uncolorizeAll();
}
}
Aggregations