mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +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) {
|
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) {
|
private void bytesChanged(TraceAddressSpace space, TraceAddressSnapRange range) {
|
||||||
|
@ -390,13 +396,6 @@ public class DebuggerWatchesProvider extends ComponentProviderAdapter
|
||||||
changeDebouncer.addListener(__ -> doCheckDepsAndReevaluate());
|
changeDebouncer.addListener(__ -> doCheckDepsAndReevaluate());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addChanged(AddressSetView toAdd) {
|
|
||||||
synchronized (changed) {
|
|
||||||
changed.add(toAdd);
|
|
||||||
changeDebouncer.contact(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addChanged(AddressRange toAdd) {
|
private void addChanged(AddressRange toAdd) {
|
||||||
synchronized (changed) {
|
synchronized (changed) {
|
||||||
changed.add(toAdd);
|
changed.add(toAdd);
|
||||||
|
|
|
@ -133,7 +133,14 @@ public class DefaultWatchRow implements WatchRow {
|
||||||
}
|
}
|
||||||
// Do not accidentally hang the Swing thread on evaluation
|
// Do not accidentally hang the Swing thread on evaluation
|
||||||
WatchValue fullValue = compiled.evaluate(executor);
|
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) {
|
synchronized (lock) {
|
||||||
if (executor != provider.asyncWatchExecutor) {
|
if (executor != provider.asyncWatchExecutor) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@ -42,9 +42,10 @@ public class RangeCursorTableHeaderRenderer<N extends Number & Comparable<N>>
|
||||||
setSavedTable(null);
|
setSavedTable(null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
int count = model.getColumnCount();
|
int count = savedTable.getColumnCount();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
if (model.getColumn(i) == col) {
|
int j = savedTable.convertColumnIndexToModel(i);
|
||||||
|
if (model.getColumn(j) == col) {
|
||||||
return false;
|
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.*;
|
||||||
import ghidra.app.plugin.core.terminal.vt.VtHandler.*;
|
import ghidra.app.plugin.core.terminal.vt.VtHandler.*;
|
||||||
import ghidra.app.services.ClipboardService;
|
import ghidra.app.services.ClipboardService;
|
||||||
import ghidra.util.ColorUtils;
|
import ghidra.util.*;
|
||||||
import ghidra.util.Msg;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A VT100 terminal emulator in a panel.
|
* 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
|
* 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.
|
* prevented key strokes from causing this, we've not prevented mouse clicks from doing it.
|
||||||
* Next best thing is to just move it back.
|
* 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) {
|
if (trigger == EventTrigger.GUI_ACTION) {
|
||||||
placeCursor(false);
|
Swing.runLater(() -> placeCursor(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@ -31,8 +31,8 @@ public interface RowObjectTableModel<T> extends TableModel {
|
||||||
public static TableModel unwrap(TableModel m) {
|
public static TableModel unwrap(TableModel m) {
|
||||||
|
|
||||||
TableModel model = m;
|
TableModel model = m;
|
||||||
while (model instanceof WrappingTableModel) {
|
while (model instanceof WrappingTableModel wrapper) {
|
||||||
model = ((WrappingTableModel) model).getWrappedModel();
|
model = wrapper.getWrappedModel();
|
||||||
}
|
}
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue