mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
e08184f5db
5 changed files with 30 additions and 20 deletions
|
@ -251,7 +251,13 @@ public class DebuggerWatchesProvider extends ComponentProviderAdapter
|
|||
}
|
||||
|
||||
private void objectRestored(DomainObjectChangeRecord rec) {
|
||||
addChanged(current.getView().getMemory());
|
||||
for (AddressSpace space : current.getTrace()
|
||||
.getBaseAddressFactory()
|
||||
.getAllAddressSpaces()) {
|
||||
if (space.isRegisterSpace() || space.isMemorySpace()) {
|
||||
addChanged(new AddressRangeImpl(space.getMinAddress(), space.getMaxAddress()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void bytesChanged(TraceAddressSpace space, TraceAddressSnapRange range) {
|
||||
|
@ -390,13 +396,6 @@ public class DebuggerWatchesProvider extends ComponentProviderAdapter
|
|||
changeDebouncer.addListener(__ -> doCheckDepsAndReevaluate());
|
||||
}
|
||||
|
||||
private void addChanged(AddressSetView toAdd) {
|
||||
synchronized (changed) {
|
||||
changed.add(toAdd);
|
||||
changeDebouncer.contact(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void addChanged(AddressRange toAdd) {
|
||||
synchronized (changed) {
|
||||
changed.add(toAdd);
|
||||
|
|
|
@ -133,7 +133,14 @@ public class DefaultWatchRow implements WatchRow {
|
|||
}
|
||||
// Do not accidentally hang the Swing thread on evaluation
|
||||
WatchValue fullValue = compiled.evaluate(executor);
|
||||
byte[] prevValue = prevExec == null ? null : compiled.evaluate(prevExec);
|
||||
byte[] prevValue;
|
||||
try {
|
||||
prevValue = prevExec == null ? null : compiled.evaluate(prevExec);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Msg.trace(this, "Error in evaluating previous value. Ignoring.", e);
|
||||
prevValue = null;
|
||||
}
|
||||
synchronized (lock) {
|
||||
if (executor != provider.asyncWatchExecutor) {
|
||||
return;
|
||||
|
|
|
@ -42,9 +42,10 @@ public class RangeCursorTableHeaderRenderer<N extends Number & Comparable<N>>
|
|||
setSavedTable(null);
|
||||
return true;
|
||||
}
|
||||
int count = model.getColumnCount();
|
||||
int count = savedTable.getColumnCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (model.getColumn(i) == col) {
|
||||
int j = savedTable.convertColumnIndexToModel(i);
|
||||
if (model.getColumn(j) == col) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,8 +39,7 @@ import ghidra.app.plugin.core.terminal.TerminalFinder.TextTerminalFinder;
|
|||
import ghidra.app.plugin.core.terminal.vt.*;
|
||||
import ghidra.app.plugin.core.terminal.vt.VtHandler.*;
|
||||
import ghidra.app.services.ClipboardService;
|
||||
import ghidra.util.ColorUtils;
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.*;
|
||||
|
||||
/**
|
||||
* A VT100 terminal emulator in a panel.
|
||||
|
@ -466,9 +465,13 @@ public class TerminalPanel extends JPanel implements FieldLocationListener, Fiel
|
|||
* Prevent the user from doing this. Cursor location is controlled by pty. While we've
|
||||
* prevented key strokes from causing this, we've not prevented mouse clicks from doing it.
|
||||
* Next best thing is to just move it back.
|
||||
*
|
||||
* NOTE: We schedule the cursor re-placement for later, because the FieldPanel may be about
|
||||
* to scroll to the cursor. If we re-place immediately, it will likely scroll to the bottom
|
||||
* of the terminal. This is especially annoying when the user is trying to make a selection.
|
||||
*/
|
||||
if (trigger == EventTrigger.GUI_ACTION) {
|
||||
placeCursor(false);
|
||||
Swing.runLater(() -> placeCursor(false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ public interface RowObjectTableModel<T> extends TableModel {
|
|||
public static TableModel unwrap(TableModel m) {
|
||||
|
||||
TableModel model = m;
|
||||
while (model instanceof WrappingTableModel) {
|
||||
model = ((WrappingTableModel) model).getWrappedModel();
|
||||
while (model instanceof WrappingTableModel wrapper) {
|
||||
model = wrapper.getWrappedModel();
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue