GP-1882: Fix (nowhere) label on DebuggerMemoryBytesProvider

This commit is contained in:
Dan 2022-04-05 13:55:54 -04:00
parent 996b892109
commit 051c8fd597
4 changed files with 10 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before After
Before After

View file

@ -196,6 +196,7 @@ public class DebuggerLocationLabel extends JLabel {
} }
public void updateLabel() { public void updateLabel() {
setText(computeLocationString()); String label = computeLocationString();
setText(label);
} }
} }

View file

@ -285,6 +285,13 @@ public class DebuggerMemoryBytesProvider extends ProgramByteViewerComponentProvi
locationLabel.updateLabel(); locationLabel.updateLabel();
} }
@Override
public boolean goTo(Program gotoProgram, ProgramLocation location) {
boolean result = super.goTo(gotoProgram, location);
locationLabel.goToAddress(location == null ? null : location.getAddress());
return result;
}
protected DebuggerCoordinates adjustCoordinates(DebuggerCoordinates coordinates) { protected DebuggerCoordinates adjustCoordinates(DebuggerCoordinates coordinates) {
if (followsCurrentThread) { if (followsCurrentThread) {
return coordinates; return coordinates;

View file

@ -44,7 +44,7 @@ import ghidra.app.plugin.core.debug.DebuggerCoordinates;
import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerGUITest; import ghidra.app.plugin.core.debug.gui.AbstractGhidraHeadedDebuggerGUITest;
import ghidra.app.plugin.core.debug.gui.DebuggerResources; import ghidra.app.plugin.core.debug.gui.DebuggerResources;
import ghidra.app.plugin.core.debug.gui.DebuggerResources.AbstractFollowsCurrentThreadAction; import ghidra.app.plugin.core.debug.gui.DebuggerResources.AbstractFollowsCurrentThreadAction;
import ghidra.app.plugin.core.debug.gui.action.*; import ghidra.app.plugin.core.debug.gui.action.DebuggerGoToDialog;
import ghidra.app.plugin.core.debug.gui.listing.DebuggerListingPlugin; import ghidra.app.plugin.core.debug.gui.listing.DebuggerListingPlugin;
import ghidra.app.services.TraceRecorder; import ghidra.app.services.TraceRecorder;
import ghidra.async.SwingExecutorService; import ghidra.async.SwingExecutorService;