mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 01:39:21 +02:00
Merge remote-tracking branch 'origin/GP-0_ryanmkurtz_warnings'
This commit is contained in:
commit
5fe25f1cfd
506 changed files with 2589 additions and 1517 deletions
|
@ -24,6 +24,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getShort(byte[])
|
||||
*/
|
||||
@Override
|
||||
public final short getShort(byte[] b) {
|
||||
return getShort(b, 0);
|
||||
}
|
||||
|
@ -31,6 +32,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getShort(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public short getShort(byte[] b, int offset) {
|
||||
return (short) (((b[offset] & 0xff) << 8) | (b[offset + 1] & 0xff));
|
||||
}
|
||||
|
@ -38,6 +40,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getInt(byte[])
|
||||
*/
|
||||
@Override
|
||||
public final int getInt(byte[] b) {
|
||||
return getInt(b, 0);
|
||||
}
|
||||
|
@ -45,6 +48,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getInt(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public int getInt(byte[] b, int offset) {
|
||||
int v = b[offset];
|
||||
for (int i = 1; i < 4; i++) {
|
||||
|
@ -56,6 +60,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getLong(byte[])
|
||||
*/
|
||||
@Override
|
||||
public final long getLong(byte[] b) {
|
||||
return getLong(b, 0);
|
||||
}
|
||||
|
@ -63,6 +68,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getLong(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public long getLong(byte[] b, int offset) {
|
||||
long v = b[offset];
|
||||
for (int i = 1; i < 8; i++) {
|
||||
|
@ -74,6 +80,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#getValue(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public long getValue(byte[] b, int size) {
|
||||
return getValue(b, 0, size);
|
||||
}
|
||||
|
@ -81,6 +88,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#getValue(byte[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public long getValue(byte[] b, int offset, int size) {
|
||||
if (size > 8) {
|
||||
throw new IndexOutOfBoundsException("size exceeds sizeof long: " + size);
|
||||
|
@ -95,6 +103,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(short, byte[])
|
||||
*/
|
||||
@Override
|
||||
public final void getBytes(short value, byte[] b) {
|
||||
getBytes(value, b, 0);
|
||||
}
|
||||
|
@ -102,6 +111,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(short, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(short value, byte[] b, int offset) {
|
||||
b[offset] = (byte) (value >> 8);
|
||||
b[offset + 1] = (byte) (value & 0xff);
|
||||
|
@ -110,6 +120,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(int, byte[])
|
||||
*/
|
||||
@Override
|
||||
public final void getBytes(int value, byte[] b) {
|
||||
getBytes(value, b, 0);
|
||||
}
|
||||
|
@ -117,6 +128,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(int, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(int value, byte[] b, int offset) {
|
||||
b[offset + 3] = (byte) (value);
|
||||
for (int i = 2; i >= 0; i--) {
|
||||
|
@ -128,6 +140,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(long, byte[])
|
||||
*/
|
||||
@Override
|
||||
public final void getBytes(long value, byte[] b) {
|
||||
getBytes(value, 8, b, 0);
|
||||
}
|
||||
|
@ -135,6 +148,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(long, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(long value, byte[] b, int offset) {
|
||||
getBytes(value, 8, b, offset);
|
||||
}
|
||||
|
@ -142,6 +156,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#getBytes(long, int, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(long value, int size, byte[] b, int offset) {
|
||||
for (int i = size - 1; i >= 0; i--) {
|
||||
b[offset + i] = (byte) value;
|
||||
|
@ -152,6 +167,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#putInt(byte[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public final void putInt(byte[] b, int offset, int value) {
|
||||
getBytes(value, b, offset);
|
||||
}
|
||||
|
@ -159,6 +175,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#putInt(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public final void putInt(byte[] b, int value) {
|
||||
getBytes(value, b);
|
||||
}
|
||||
|
@ -166,6 +183,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#putLong(byte[], int, long)
|
||||
*/
|
||||
@Override
|
||||
public final void putLong(byte[] b, int offset, long value) {
|
||||
getBytes(value, b, offset);
|
||||
}
|
||||
|
@ -173,6 +191,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#putLong(byte[], long)
|
||||
*/
|
||||
@Override
|
||||
public final void putLong(byte[] b, long value) {
|
||||
getBytes(value, b);
|
||||
}
|
||||
|
@ -180,6 +199,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#putShort(byte[], int, short)
|
||||
*/
|
||||
@Override
|
||||
public final void putShort(byte[] b, int offset, short value) {
|
||||
getBytes(value, b, offset);
|
||||
}
|
||||
|
@ -187,6 +207,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#putShort(byte[], short)
|
||||
*/
|
||||
@Override
|
||||
public final void putShort(byte[] b, short value) {
|
||||
getBytes(value, b);
|
||||
}
|
||||
|
@ -194,6 +215,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#getBytes(int)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getBytes(int value) {
|
||||
byte[] bytes = new byte[4];
|
||||
getBytes(value, bytes);
|
||||
|
@ -203,6 +225,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#getBytes(long)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getBytes(long value) {
|
||||
byte[] bytes = new byte[8];
|
||||
getBytes(value, bytes);
|
||||
|
@ -212,6 +235,7 @@ public class GDataConverterBE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter.util.DataConverter#getBytes(short)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getBytes(short value) {
|
||||
byte[] bytes = new byte[2];
|
||||
getBytes(value, bytes);
|
||||
|
|
|
@ -23,6 +23,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getShort(byte[])
|
||||
*/
|
||||
@Override
|
||||
public final short getShort(byte[] b) {
|
||||
return getShort(b, 0);
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getShort(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public short getShort(byte[] b, int offset) {
|
||||
return (short) (((b[offset + 1] & 0xff) << 8) | (b[offset] & 0xff));
|
||||
}
|
||||
|
@ -37,6 +39,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getInt(byte[])
|
||||
*/
|
||||
@Override
|
||||
public final int getInt(byte[] b) {
|
||||
return getInt(b, 0);
|
||||
}
|
||||
|
@ -44,6 +47,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getInt(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public int getInt(byte[] b, int offset) {
|
||||
int v = b[offset + 3];
|
||||
for (int i = 2; i >= 0; i--) {
|
||||
|
@ -55,6 +59,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getLong(byte[])
|
||||
*/
|
||||
@Override
|
||||
public final long getLong(byte[] b) {
|
||||
return getLong(b, 0);
|
||||
}
|
||||
|
@ -62,6 +67,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getLong(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public long getLong(byte[] b, int offset) {
|
||||
long v = b[offset + 7];
|
||||
for (int i = 6; i >= 0; i--) {
|
||||
|
@ -73,6 +79,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#getValue(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public long getValue(byte[] b, int size) {
|
||||
return getValue(b, 0, size);
|
||||
}
|
||||
|
@ -80,6 +87,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#getValue(byte[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public long getValue(byte[] b, int offset, int size) {
|
||||
if (size > 8) {
|
||||
throw new IndexOutOfBoundsException("size exceeds sizeof long: " + size);
|
||||
|
@ -94,6 +102,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(short, byte[])
|
||||
*/
|
||||
@Override
|
||||
public final void getBytes(short value, byte[] b) {
|
||||
getBytes(value, b, 0);
|
||||
}
|
||||
|
@ -101,6 +110,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(short, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(short value, byte[] b, int offset) {
|
||||
b[offset + 1] = (byte) (value >> 8);
|
||||
b[offset] = (byte) (value & 0xff);
|
||||
|
@ -109,6 +119,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(int, byte[])
|
||||
*/
|
||||
@Override
|
||||
public final void getBytes(int value, byte[] b) {
|
||||
getBytes(value, b, 0);
|
||||
}
|
||||
|
@ -116,6 +127,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(int, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(int value, byte[] b, int offset) {
|
||||
b[offset] = (byte) (value);
|
||||
for (int i = 1; i < 4; i++) {
|
||||
|
@ -127,6 +139,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(long, byte[])
|
||||
*/
|
||||
@Override
|
||||
public final void getBytes(long value, byte[] b) {
|
||||
getBytes(value, 8, b, 0);
|
||||
}
|
||||
|
@ -134,6 +147,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see GDataConverter#getBytes(long, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(long value, byte[] b, int offset) {
|
||||
getBytes(value, 8, b, offset);
|
||||
}
|
||||
|
@ -141,6 +155,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#getBytes(long, int, byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public void getBytes(long value, int size, byte[] b, int offset) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
b[offset + i] = (byte) value;
|
||||
|
@ -151,6 +166,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#putInt(byte[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public final void putInt(byte[] b, int offset, int value) {
|
||||
getBytes(value, b, offset);
|
||||
}
|
||||
|
@ -158,6 +174,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#putInt(byte[], int)
|
||||
*/
|
||||
@Override
|
||||
public final void putInt(byte[] b, int value) {
|
||||
getBytes(value, b);
|
||||
}
|
||||
|
@ -165,6 +182,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#putLong(byte[], int, long)
|
||||
*/
|
||||
@Override
|
||||
public final void putLong(byte[] b, int offset, long value) {
|
||||
getBytes(value, b, offset);
|
||||
}
|
||||
|
@ -172,6 +190,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#putLong(byte[], long)
|
||||
*/
|
||||
@Override
|
||||
public final void putLong(byte[] b, long value) {
|
||||
getBytes(value, b);
|
||||
}
|
||||
|
@ -179,6 +198,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#putShort(byte[], int, short)
|
||||
*/
|
||||
@Override
|
||||
public final void putShort(byte[] b, int offset, short value) {
|
||||
getBytes(value, b, offset);
|
||||
}
|
||||
|
@ -186,6 +206,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#putShort(byte[], short)
|
||||
*/
|
||||
@Override
|
||||
public final void putShort(byte[] b, short value) {
|
||||
getBytes(value, b);
|
||||
}
|
||||
|
@ -193,6 +214,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#getBytes(int)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getBytes(int value) {
|
||||
byte[] bytes = new byte[4];
|
||||
getBytes(value, bytes);
|
||||
|
@ -202,6 +224,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#getBytes(long)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getBytes(long value) {
|
||||
byte[] bytes = new byte[8];
|
||||
getBytes(value, bytes);
|
||||
|
@ -211,6 +234,7 @@ public class GDataConverterLE implements GDataConverter {
|
|||
/**
|
||||
* @see ghidra.util.GDataConverter#getBytes(short)
|
||||
*/
|
||||
@Override
|
||||
public byte[] getBytes(short value) {
|
||||
byte[] bytes = new byte[2];
|
||||
getBytes(value, bytes);
|
||||
|
|
|
@ -98,6 +98,7 @@ public abstract class AbstractIsfWriter implements Closeable {
|
|||
gson.toJson(object, writer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
if (writer != null) {
|
||||
writer.flush();
|
||||
|
|
|
@ -233,7 +233,8 @@ public enum BackgroundUtils {
|
|||
}
|
||||
|
||||
protected void executeBackground(Runnable command) {
|
||||
BackgroundCommand cmd = new BackgroundCommand(name, opts.contains(TaskOpt.HAS_PROGRESS),
|
||||
BackgroundCommand<DomainObject> cmd =
|
||||
new BackgroundCommand<>(name, opts.contains(TaskOpt.HAS_PROGRESS),
|
||||
opts.contains(TaskOpt.CAN_CANCEL), opts.contains(TaskOpt.IS_MODAL)) {
|
||||
@Override
|
||||
public boolean applyTo(DomainObject obj, TaskMonitor monitor) {
|
||||
|
|
|
@ -49,10 +49,13 @@ public interface TraceObjectMemoryRegion extends TraceMemoryRegion, TraceObjectI
|
|||
|
||||
void setRange(Lifespan lifespan, AddressRange range);
|
||||
|
||||
@Override
|
||||
AddressRange getRange(long snap);
|
||||
|
||||
@Override
|
||||
Address getMinAddress(long snap);
|
||||
|
||||
@Override
|
||||
Address getMaxAddress(long snap);
|
||||
|
||||
void setFlags(Lifespan lifespan, Collection<TraceMemoryFlag> flags);
|
||||
|
@ -61,5 +64,6 @@ public interface TraceObjectMemoryRegion extends TraceMemoryRegion, TraceObjectI
|
|||
|
||||
void clearFlags(Lifespan lifespan, Collection<TraceMemoryFlag> flags);
|
||||
|
||||
@Override
|
||||
Set<TraceMemoryFlag> getFlags(long snap);
|
||||
}
|
||||
|
|
|
@ -186,6 +186,7 @@ public interface Rectangle2D<X, Y, R extends Rectangle2D<X, Y, R>> extends Bound
|
|||
* @param shape the other (presumably-inner) rectangle
|
||||
* @return true if this rectangle encloses the other
|
||||
*/
|
||||
@Override
|
||||
default boolean encloses(R shape) {
|
||||
return encloses(this, shape);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public abstract class SampleGraphLayoutProvider
|
|||
public abstract VisualGraphLayout<SampleVertex, SampleEdge> getLayout(SampleGraph g,
|
||||
TaskMonitor monitor) throws CancelledException;
|
||||
|
||||
@Override
|
||||
protected void initVertexLocations(SampleGraph g, Layout<SampleVertex, SampleEdge> layout) {
|
||||
Collection<SampleVertex> vertices = g.getVertices();
|
||||
for (SampleVertex v : vertices) {
|
||||
|
|
|
@ -145,6 +145,7 @@ public class MultiChoiceBSimValueEditor implements BSimValueEditor {
|
|||
return component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasValidValues() {
|
||||
return isValid;
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ public class StringBSimValueEditor implements BSimValueEditor {
|
|||
return textField;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasValidValues() {
|
||||
return isValid;
|
||||
}
|
||||
|
|
|
@ -93,6 +93,7 @@ public class BSimSearchDialog extends AbstractBSimSearchDialog {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JPanel buildServerPanel() {
|
||||
JPanel panel = super.buildServerPanel();
|
||||
panel.add(new JLabel("Function(s): "));
|
||||
|
@ -100,6 +101,7 @@ public class BSimSearchDialog extends AbstractBSimSearchDialog {
|
|||
return panel;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JPanel buildCenterPanel() {
|
||||
filterPanel = new BSimFilterPanel(this::filterPanelChanged);
|
||||
return createTitledPanel("Filters:", filterPanel, true);
|
||||
|
|
|
@ -32,6 +32,7 @@ public abstract class IDElasticResolution {
|
|||
idString = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve(ElasticDatabase database,ExecutableRecord exe) throws ElasticException {
|
||||
if (idString == null)
|
||||
idString = database.recoverExternalFunctionId(exeName, funcName, exe.getArchitecture());
|
||||
|
|
|
@ -41,6 +41,7 @@ public class AdjustVectorIndex extends BSimQuery<ResponseAdjustIndex> {
|
|||
/* (non-Javadoc)
|
||||
* @see ghidra.query.protocol.QueryResponseRecord#buildResponseTemplate()
|
||||
*/
|
||||
@Override
|
||||
public void buildResponseTemplate() {
|
||||
if (response == null)
|
||||
response = adjustresponse = new ResponseAdjustIndex();
|
||||
|
|
|
@ -27,6 +27,7 @@ public class ChildAtom extends FilterAtom {
|
|||
public String name = null; // Name of the child function
|
||||
public String exename = null; // Name of the executable (or library) containing the child (or null)
|
||||
|
||||
@Override
|
||||
public void saveXml(Writer fwrite) throws IOException {
|
||||
fwrite.append("<childatom");
|
||||
type.saveXml(fwrite);
|
||||
|
@ -49,6 +50,7 @@ public class ChildAtom extends FilterAtom {
|
|||
name = parser.end(el).getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FilterAtom clone() {
|
||||
ChildAtom newatom = new ChildAtom();
|
||||
newatom.type = type;
|
||||
|
@ -58,6 +60,7 @@ public class ChildAtom extends FilterAtom {
|
|||
return newatom;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInfoString() {
|
||||
if (name == null)
|
||||
return null;
|
||||
|
|
|
@ -21,6 +21,7 @@ import ghidra.app.cmd.label.RenameLabelCmd;
|
|||
import ghidra.app.script.GhidraScript;
|
||||
import ghidra.framework.cmd.CompoundCmd;
|
||||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.symbol.*;
|
||||
|
||||
public class AutoRenameLabelsScript extends GhidraScript {
|
||||
|
@ -45,7 +46,7 @@ public class AutoRenameLabelsScript extends GhidraScript {
|
|||
|
||||
SymbolTable symbolTable = currentProgram.getSymbolTable();
|
||||
AddressIterator it = view.getAddresses(true);
|
||||
CompoundCmd cmd = new CompoundCmd("Auto Rename Labels");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Auto Rename Labels");
|
||||
while (it.hasNext()) {
|
||||
Address address = it.next();
|
||||
Symbol primary = symbolTable.getPrimarySymbol(address);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -20,6 +19,7 @@ import ghidra.program.model.mem.Memory;
|
|||
|
||||
public class GenerateMaskedBitStringScript extends GhidraScript {
|
||||
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
Memory mem = currentProgram.getMemory();
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ import java.util.Iterator;
|
|||
|
||||
public class ReportDisassemblyErrors extends GhidraScript {
|
||||
|
||||
public void run() throws Exception {
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
Program prog = currentProgram;
|
||||
Iterator<Bookmark> bookmarkIter = prog.getBookmarkManager().getBookmarksIterator("Error");
|
||||
int count = 0;
|
||||
|
|
|
@ -83,7 +83,7 @@ public class SetEquateScript extends GhidraScript {
|
|||
// looking for was found
|
||||
|
||||
// Sets the equate to the user defined name and execute
|
||||
Command cmd =
|
||||
Command<Program> cmd =
|
||||
new SetEquateCmd(equateName, tempValue.getAddress(), i, scalarValue);
|
||||
state.getTool().execute(cmd, currentProgram);
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import ghidra.app.script.GhidraScript;
|
|||
|
||||
public class TurnOffStackAnalysis extends GhidraScript {
|
||||
|
||||
@Override
|
||||
public void run() throws Exception {
|
||||
|
||||
setAnalysisOption(currentProgram, "Stack", "false");
|
||||
|
|
|
@ -32,6 +32,7 @@ public abstract class AbstractBinaryFormatAnalyzer extends AbstractAnalyzer {
|
|||
this.command = command;
|
||||
}
|
||||
|
||||
@Override
|
||||
final public boolean added(Program program, AddressSetView set, TaskMonitor monitor,
|
||||
MessageLog log) throws CancelledException {
|
||||
|
||||
|
@ -48,10 +49,12 @@ public abstract class AbstractBinaryFormatAnalyzer extends AbstractAnalyzer {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
final public boolean canAnalyze(Program program) {
|
||||
return command.canApply(program);
|
||||
}
|
||||
|
||||
@Override
|
||||
final public boolean getDefaultEnablement(Program program) {
|
||||
return command.canApply(program);
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ public class MoveBlockTask extends ProgramTask {
|
|||
throw new RollbackException(statusMessage, cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
|
|
@ -406,6 +406,7 @@ class UserDefinedPropertyMerger extends AbstractListingMerger {
|
|||
this.currentAddress = addr;
|
||||
try {
|
||||
final ChangeListener changeListener = new ChangeListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
conflictOption = conflictPanel.getSelectedOptions();
|
||||
if (conflictOption == ASK_USER) {
|
||||
|
@ -425,12 +426,14 @@ class UserDefinedPropertyMerger extends AbstractListingMerger {
|
|||
}
|
||||
};
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setupConflictsPanel(listingPanel, UserDefinedPropertyMerger.this.propertyName,
|
||||
UserDefinedPropertyMerger.this.currentAddress, changeListener);
|
||||
}
|
||||
});
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
listingPanel.clearAllBackgrounds();
|
||||
listingPanel.paintAllBackgrounds(new AddressSet(addr, addr));
|
||||
|
|
|
@ -86,6 +86,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
/* (non-Javadoc)
|
||||
* @see ghidra.app.merge.MergeResolver#apply()
|
||||
*/
|
||||
@Override
|
||||
public void apply() {
|
||||
conflictOption = mergePanel.getSelectedOption();
|
||||
|
||||
|
@ -99,6 +100,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
/* (non-Javadoc)
|
||||
* @see ghidra.app.merge.MergeResolver#cancel()
|
||||
*/
|
||||
@Override
|
||||
public void cancel() {
|
||||
conflictOption = CANCELED;
|
||||
}
|
||||
|
@ -106,6 +108,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
/* (non-Javadoc)
|
||||
* @see ghidra.app.merge.MergeResolver#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Merge Property Lists";
|
||||
}
|
||||
|
@ -113,6 +116,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
/* (non-Javadoc)
|
||||
* @see ghidra.app.merge.MergeResolver#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Property List Merger";
|
||||
}
|
||||
|
@ -120,6 +124,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
/* (non-Javadoc)
|
||||
* @see ghidra.app.merge.MergeResolver#merge(ghidra.util.task.TaskMonitor)
|
||||
*/
|
||||
@Override
|
||||
public void merge(TaskMonitor monitor) {
|
||||
|
||||
mergeManager.setInProgress(PROPERTY_LIST_PHASE);
|
||||
|
@ -457,6 +462,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
final int totalNumConflicts) {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mergePanel == null) {
|
||||
mergePanel = new PropertyListMergePanel(mergeManager, totalNumConflicts);
|
||||
|
@ -478,6 +484,7 @@ public class PropertyListMergeManager implements MergeResolver {
|
|||
// and continue.
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[][] getPhases() {
|
||||
return new String[][] { PROPERTY_LIST_PHASE };
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -79,6 +78,7 @@ class PropertyListMergePanel extends JPanel {
|
|||
|
||||
private ConflictPanel createConflictPanel() {
|
||||
ChangeListener changeListener = new ChangeListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
mergeManager.clearStatusText();
|
||||
mergeManager.setApplyEnabled(true);
|
||||
|
|
|
@ -187,6 +187,7 @@ public class ModuleAlgorithmPlugin extends ProgramPlugin implements BlockModelSe
|
|||
/**
|
||||
* @see ghidra.app.services.BlockModelServiceListener#modelAdded(java.lang.String, int)
|
||||
*/
|
||||
@Override
|
||||
public void modelAdded(String modeName, int modelType) {
|
||||
if (modelType == BlockModelService.SUBROUTINE_MODEL) {
|
||||
updateSubroutineActions();
|
||||
|
@ -196,6 +197,7 @@ public class ModuleAlgorithmPlugin extends ProgramPlugin implements BlockModelSe
|
|||
/**
|
||||
* @see ghidra.app.services.BlockModelServiceListener#modelRemoved(java.lang.String, int)
|
||||
*/
|
||||
@Override
|
||||
public void modelRemoved(String modeName, int modelType) {
|
||||
if (modelType == BlockModelService.SUBROUTINE_MODEL) {
|
||||
updateSubroutineActions();
|
||||
|
|
|
@ -34,6 +34,7 @@ public class AnalysisTaskList {
|
|||
|
||||
private static Comparator<AnalysisScheduler> priorityComparator =
|
||||
new Comparator<AnalysisScheduler>() {
|
||||
@Override
|
||||
public int compare(AnalysisScheduler as1, AnalysisScheduler as2) {
|
||||
Analyzer a1 = as1.getAnalyzer();
|
||||
Analyzer a2 = as2.getAnalyzer();
|
||||
|
|
|
@ -449,6 +449,7 @@ public class ConstantPropagationAnalyzer extends AbstractAnalyzer {
|
|||
* @return - set of addresses actually flowed to
|
||||
* @throws CancelledException
|
||||
*/
|
||||
@Override
|
||||
public AddressSetView analyzeLocation(final Program program, Address start, AddressSetView set,
|
||||
final TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ public class ObjectiveC2_MessageAnalyzer extends AbstractAnalyzer {
|
|||
setPriority(AnalysisPriority.FORMAT_ANALYSIS.after());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
|
||||
throws CancelledException {
|
||||
AddressIterator iterator = set.getAddresses(true);
|
||||
|
@ -63,6 +64,7 @@ public class ObjectiveC2_MessageAnalyzer extends AbstractAnalyzer {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAnalyze(Program program) {
|
||||
return ObjectiveC2_Constants.isObjectiveC2(program);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -56,10 +55,12 @@ public class UpdateAlignmentAction extends ToggleDockingAction implements Addres
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void alignmentChanged() {
|
||||
setSelected(model.getAlignment() == alignment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void alignmentPermissionChanged() {
|
||||
setSelected(model.getAlignment() == alignment);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -33,6 +32,7 @@ public abstract class PostAnalysisValidator implements ConditionTester, Extensio
|
|||
return program;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final ConditionResult run(TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
if (!program.addConsumer(this)) {
|
||||
|
|
|
@ -113,7 +113,7 @@ public class ClearPlugin extends Plugin {
|
|||
}
|
||||
|
||||
CodeUnit cu = program.getListing().getCodeUnitContaining(location.getAddress());
|
||||
Command cmd = new ClearCmd(cu, options);
|
||||
Command<Program> cmd = new ClearCmd(cu, options);
|
||||
tool.execute(cmd, program);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ import ghidra.app.plugin.ProgramPlugin;
|
|||
import ghidra.app.plugin.core.navigation.NavigationOptions;
|
||||
import ghidra.app.services.*;
|
||||
import ghidra.framework.cmd.Command;
|
||||
import ghidra.framework.model.DomainObjectChangedEvent;
|
||||
import ghidra.framework.model.DomainObjectListener;
|
||||
import ghidra.framework.model.*;
|
||||
import ghidra.framework.options.SaveState;
|
||||
import ghidra.framework.plugintool.PluginInfo;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
|
@ -191,7 +190,7 @@ public class ColorizingPlugin extends ProgramPlugin implements DomainObjectListe
|
|||
return;
|
||||
}
|
||||
|
||||
Command command = null;
|
||||
Command<DomainObject> command = null;
|
||||
ProgramSelection selection = listingContext.getSelection();
|
||||
if (selection != null && !selection.isEmpty()) {
|
||||
command = new SetColorCommand(color, service, selection);
|
||||
|
|
|
@ -134,6 +134,7 @@ public class CodeCompletion implements Comparable<CodeCompletion> {
|
|||
return "CodeCompletion: '" + getDescription() + "' (" + getInsertion() + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(CodeCompletion that) {
|
||||
return this.description.compareToIgnoreCase(that.description);
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ class CreateArrayAction extends ListingContextAction {
|
|||
int maxNoConflictElements = getMaxNoConflictElements(struct, comp.getComponentIndex(), dt);
|
||||
int numElements = getNumElements(dt, maxNoConflictElements, maxElements);
|
||||
|
||||
Command cmd = new CreateArrayInStructureCmd(addr, numElements, dt, compPath);
|
||||
Command<Program> cmd = new CreateArrayInStructureCmd(addr, numElements, dt, compPath);
|
||||
if (!tool.execute(cmd, program)) {
|
||||
tool.setStatusInfo(cmd.getStatusMsg());
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ class CreateArrayAction extends ListingContextAction {
|
|||
// Arrays currently use aligned-length only
|
||||
int numElements = length / dt.getAlignedLength();
|
||||
|
||||
Command cmd = new CreateArrayInStructureCmd(from.getAddress(), numElements, dt,
|
||||
Command<Program> cmd = new CreateArrayInStructureCmd(from.getAddress(), numElements, dt,
|
||||
from.getComponentPath());
|
||||
if (!tool.execute(cmd, program)) {
|
||||
tool.setStatusInfo(cmd.getStatusMsg());
|
||||
|
|
|
@ -26,8 +26,7 @@ import ghidra.framework.cmd.BackgroundCommand;
|
|||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.data.CycleGroup;
|
||||
import ghidra.program.model.data.DataType;
|
||||
import ghidra.program.model.listing.Data;
|
||||
import ghidra.program.model.listing.Listing;
|
||||
import ghidra.program.model.listing.*;
|
||||
import ghidra.program.util.*;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
|
@ -83,7 +82,7 @@ public class CycleGroupAction extends ListingContextAction {
|
|||
|
||||
// Handle selection case
|
||||
if (selection != null && !selection.isEmpty()) {
|
||||
BackgroundCommand cmd = null;
|
||||
BackgroundCommand<Program> cmd = null;
|
||||
DataType dt = null;
|
||||
Address addr = selection.getMinAddress();
|
||||
Data data = listing.getDataContaining(addr);
|
||||
|
|
|
@ -356,6 +356,7 @@ public class DataSettingsDialog extends AbstractSettingsDialog {
|
|||
return settingsDefinition.getSuggestedValues(sampleSelectionSettings);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applySettings() throws CancelledException {
|
||||
int txId = program.startTransaction(getTitle());
|
||||
try {
|
||||
|
|
|
@ -89,6 +89,7 @@ class RenameDataFieldDialog extends DialogComponentProvider {
|
|||
|
||||
setFocusComponent(recentChoices);
|
||||
recentChoices.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
okCallback();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -115,6 +114,7 @@ public class CopyAction extends DockingAction {
|
|||
Transferable contents = new GTreeNodeTransferable(dragNDropHandler, list);
|
||||
|
||||
clipboard.setContents(contents, new ClipboardOwner() {
|
||||
@Override
|
||||
public void lostOwnership(Clipboard currentClipboard, Transferable transferable) {
|
||||
// we don't care
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -32,14 +31,17 @@ public class CenterVerticalIcon implements Icon {
|
|||
verticalOffset = (height - icon.getIconHeight()) / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth() {
|
||||
return icon.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintIcon(Component c, Graphics g, int x, int y) {
|
||||
icon.paintIcon(c, g, x, y + verticalOffset);
|
||||
}
|
||||
|
|
|
@ -42,10 +42,12 @@ public class DataDropOnBrowserHandler implements ProgramDropProvider {
|
|||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataFlavor[] getDataFlavors() {
|
||||
return ACCEPTABLE_FLAVORS;
|
||||
}
|
||||
|
@ -53,6 +55,7 @@ public class DataDropOnBrowserHandler implements ProgramDropProvider {
|
|||
/**
|
||||
* @see ghidra.app.util.ProgramDropProvider#isDropOk(java.lang.Object, java.awt.dnd.DropTargetDragEvent)
|
||||
*/
|
||||
@Override
|
||||
public boolean isDropOk(Object contextObj, DropTargetDragEvent evt) {
|
||||
curService = null;
|
||||
|
||||
|
@ -74,6 +77,7 @@ public class DataDropOnBrowserHandler implements ProgramDropProvider {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(Object contextObj, Object data, DataFlavor flavor) {
|
||||
if (curService != null) {
|
||||
DataType dt = (DataType)data;
|
||||
|
|
|
@ -51,7 +51,8 @@ class DataTypeComponentPreview implements Preview {
|
|||
this.parentPreview = parent;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@Override
|
||||
public String getName() {
|
||||
String fieldName = dtc.getFieldName();
|
||||
if (fieldName == null) {
|
||||
fieldName = dtc.getDefaultFieldName();
|
||||
|
@ -62,7 +63,8 @@ class DataTypeComponentPreview implements Preview {
|
|||
return parentPreview.getName()+"."+fieldName;
|
||||
}
|
||||
|
||||
public String getPreview(Memory memory, Address addr) {
|
||||
@Override
|
||||
public String getPreview(Memory memory, Address addr) {
|
||||
try {
|
||||
if (parentPreview != null) {
|
||||
addr = addr.add(parentPreview.dtc.getOffset());
|
||||
|
@ -77,6 +79,7 @@ class DataTypeComponentPreview implements Preview {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType getDataType() {
|
||||
if (parentPreview != null) {
|
||||
return parentPreview.getDataType();
|
||||
|
@ -89,7 +92,8 @@ class DataTypeComponentPreview implements Preview {
|
|||
return getName();
|
||||
}
|
||||
|
||||
public int compareTo(Preview p) {
|
||||
@Override
|
||||
public int compareTo(Preview p) {
|
||||
if (p instanceof DataTypeComponentPreview) {
|
||||
DataTypeComponentPreview that = (DataTypeComponentPreview)p;
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ public class EquateTablePlugin extends ProgramPlugin implements DomainObjectList
|
|||
}
|
||||
|
||||
if (isValid(oldEquate, newEquateName)) {
|
||||
Command cmd = new RenameEquatesCmd(oldEquateName, newEquateName);
|
||||
Command<Program> cmd = new RenameEquatesCmd(oldEquateName, newEquateName);
|
||||
tool.execute(cmd, currentProgram);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -16,6 +15,9 @@
|
|||
*/
|
||||
package ghidra.app.plugin.core.fallthrough;
|
||||
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
import ghidra.app.cmd.refs.ClearFallThroughCmd;
|
||||
import ghidra.app.cmd.refs.SetFallThroughCmd;
|
||||
import ghidra.app.util.viewer.field.BrowserCodeUnitFormat;
|
||||
|
@ -24,9 +26,6 @@ import ghidra.framework.plugintool.PluginTool;
|
|||
import ghidra.program.model.address.*;
|
||||
import ghidra.program.model.listing.*;
|
||||
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
/**
|
||||
* This class is really a model for the FallThroughDialog state. However, it is used as a
|
||||
* convenience for executing the auto-override and clear-fallthrough actions.
|
||||
|
@ -188,7 +187,7 @@ class FallThroughModel implements ChangeListener {
|
|||
* @param currentSelection
|
||||
*/
|
||||
void autoOverride(AddressSetView view) {
|
||||
CompoundCmd cmd = new CompoundCmd("Auto-Override");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Auto-Override");
|
||||
AddressRangeIterator iter = view.getAddressRanges();
|
||||
while (iter.hasNext()) {
|
||||
override(iter.next(), cmd);
|
||||
|
@ -201,7 +200,7 @@ class FallThroughModel implements ChangeListener {
|
|||
}
|
||||
|
||||
void clearOverride(AddressSetView view) {
|
||||
CompoundCmd cmd = new CompoundCmd("Clear FallThroughs");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Clear FallThroughs");
|
||||
InstructionIterator it = program.getListing().getInstructions(view, true);
|
||||
while(it.hasNext()) {
|
||||
Instruction inst = it.next();
|
||||
|
@ -226,7 +225,7 @@ class FallThroughModel implements ChangeListener {
|
|||
return program;
|
||||
}
|
||||
|
||||
private void override(AddressRange range, CompoundCmd cmd) {
|
||||
private void override(AddressRange range, CompoundCmd<Program> cmd) {
|
||||
Address min = range.getMinAddress();
|
||||
Address max = range.getMaxAddress();
|
||||
Listing listing = program.getListing();
|
||||
|
@ -249,13 +248,14 @@ class FallThroughModel implements ChangeListener {
|
|||
}
|
||||
}
|
||||
|
||||
private void setFallThrough(Address addr, CompoundCmd cmd) {
|
||||
private void setFallThrough(Address addr, CompoundCmd<Program> cmd) {
|
||||
Instruction inst = program.getListing().getInstructionAfter(addr);
|
||||
if (inst != null) {
|
||||
cmd.add(new SetFallThroughCmd(addr, inst.getMinAddress()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
// do nothing - just a placeholder so that we don't have to check for null listener
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class AddVarArgsAction extends ListingContextAction {
|
|||
|
||||
Function function = functionPlugin.getFunction(context);
|
||||
if ((function != null) && (!function.hasVarArgs())) {
|
||||
Command command = new SetFunctionVarArgsCommand(function, true);
|
||||
Command<Program> command = new SetFunctionVarArgsCommand(function, true);
|
||||
|
||||
PluginTool tool = functionPlugin.getTool();
|
||||
Program program = context.getProgram();
|
||||
|
|
|
@ -103,7 +103,7 @@ class AnalyzeStackRefsAction extends ListingContextAction {
|
|||
|
||||
doParameterAnalysis = options.getBoolean("Create Param Variables", doParameterAnalysis);
|
||||
|
||||
BackgroundCommand cmd = null;
|
||||
BackgroundCommand<Program> cmd = null;
|
||||
if (doNewStackAnalysis) {
|
||||
cmd = new NewFunctionStackAnalysisCmd(funcSet, doParameterAnalysis, doLocalAnalysis,
|
||||
true);
|
||||
|
|
|
@ -95,7 +95,7 @@ public class CreateExternalFunctionAction extends ProgramContextAction {
|
|||
|
||||
@Override
|
||||
protected void actionPerformed(ProgramActionContext context) {
|
||||
CompoundCmd compoundCmd = null;
|
||||
CompoundCmd<Program> compoundCmd = null;
|
||||
CreateExternalFunctionCmd cmd = null;
|
||||
if (context instanceof ListingActionContext) {
|
||||
ListingActionContext listingContext = (ListingActionContext) context;
|
||||
|
@ -107,7 +107,7 @@ public class CreateExternalFunctionAction extends ProgramContextAction {
|
|||
CreateExternalFunctionCmd extFuncCmd = new CreateExternalFunctionCmd(s);
|
||||
if (cmd != null) {
|
||||
if (compoundCmd == null) {
|
||||
compoundCmd = new CompoundCmd("Create External Functions");
|
||||
compoundCmd = new CompoundCmd<>("Create External Functions");
|
||||
compoundCmd.add(cmd);
|
||||
}
|
||||
compoundCmd.add(extFuncCmd);
|
||||
|
|
|
@ -139,7 +139,7 @@ class CreateFunctionAction extends ListingContextAction {
|
|||
funcPlugin.getTool().clearStatusInfo();
|
||||
}
|
||||
|
||||
BackgroundCommand cmd;
|
||||
BackgroundCommand<Program> cmd;
|
||||
if (createThunk) {
|
||||
cmd = getCreateThunkFunctionCmd(context.getProgram(), entry, body);
|
||||
if (cmd == null) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -16,6 +15,7 @@
|
|||
*/
|
||||
package ghidra.app.plugin.core.function;
|
||||
|
||||
import docking.action.MenuData;
|
||||
import ghidra.app.cmd.function.SetFunctionVarArgsCommand;
|
||||
import ghidra.app.context.ListingActionContext;
|
||||
import ghidra.app.context.ListingContextAction;
|
||||
|
@ -25,7 +25,6 @@ import ghidra.program.model.listing.Function;
|
|||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.util.*;
|
||||
import ghidra.util.HelpLocation;
|
||||
import docking.action.MenuData;
|
||||
|
||||
/**
|
||||
* Action that changes a Function so that it has VarArgs (a variable argument list).
|
||||
|
@ -62,7 +61,7 @@ public class DeleteVarArgsAction extends ListingContextAction {
|
|||
public void actionPerformed(ListingActionContext context) {
|
||||
Function function = functionPlugin.getFunction(context);
|
||||
if ((function != null) && (function.hasVarArgs())) {
|
||||
Command command = new SetFunctionVarArgsCommand(function, false);
|
||||
Command<Program> command = new SetFunctionVarArgsCommand(function, false);
|
||||
|
||||
PluginTool tool = functionPlugin.getTool();
|
||||
Program program = context.getProgram();
|
||||
|
|
|
@ -84,7 +84,7 @@ public class EditFunctionPurgeAction extends ListingContextAction {
|
|||
int newFunctionPurgeSize = numberInputDialog.getValue();
|
||||
|
||||
if (newFunctionPurgeSize != currentFunctionPurgeSize) {
|
||||
Command command = new SetFunctionPurgeCommand(function, newFunctionPurgeSize);
|
||||
Command<Program> command = new SetFunctionPurgeCommand(function, newFunctionPurgeSize);
|
||||
|
||||
PluginTool tool = functionPlugin.getTool();
|
||||
Program program = function.getProgram();
|
||||
|
|
|
@ -38,6 +38,7 @@ public class ExternalEntryFunctionAnalyzer extends AbstractAnalyzer {
|
|||
* Called when a function has been added.
|
||||
* Looks at address for call reference
|
||||
*/
|
||||
@Override
|
||||
public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) {
|
||||
|
||||
AddressSet funcStarts = new AddressSet();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -38,7 +37,7 @@ public class X86FunctionPurgeAnalyzer extends AbstractAnalyzer {
|
|||
|
||||
@Override
|
||||
public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) {
|
||||
BackgroundCommand cmd;
|
||||
BackgroundCommand<Program> cmd;
|
||||
|
||||
cmd = new FunctionPurgeAnalysisCmd(set);
|
||||
|
||||
|
|
|
@ -20,8 +20,7 @@ import java.util.Set;
|
|||
import ghidra.app.cmd.function.RemoveFunctionTagCmd;
|
||||
import ghidra.framework.cmd.Command;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.program.model.listing.Function;
|
||||
import ghidra.program.model.listing.FunctionTag;
|
||||
import ghidra.program.model.listing.*;
|
||||
|
||||
/**
|
||||
* Displays a list of tags that have been assigned to the current function
|
||||
|
@ -73,7 +72,8 @@ public class TargetTagsPanel extends TagListPanel {
|
|||
public void removeSelectedTags() {
|
||||
Set<FunctionTag> selectedTags = getSelectedTags();
|
||||
for (FunctionTag tag : selectedTags) {
|
||||
Command cmd = new RemoveFunctionTagCmd(tag.getName(), function.getEntryPoint());
|
||||
Command<Program> cmd =
|
||||
new RemoveFunctionTagCmd(tag.getName(), function.getEntryPoint());
|
||||
tool.execute(cmd, program);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,8 @@ public class LabelMgrPlugin extends Plugin {
|
|||
protected void removeLabelCallback(ListingActionContext context) {
|
||||
Symbol s = getSymbol(context);
|
||||
if (s != null) {
|
||||
Command cmd = new DeleteLabelCmd(s.getAddress(), s.getName(), s.getParentNamespace());
|
||||
Command<Program> cmd =
|
||||
new DeleteLabelCmd(s.getAddress(), s.getName(), s.getParentNamespace());
|
||||
|
||||
if (!tool.execute(cmd, context.getProgram())) {
|
||||
tool.setStatusInfo(cmd.getStatusMsg());
|
||||
|
|
|
@ -94,7 +94,7 @@ public class OperandLabelDialog extends DialogComponentProvider {
|
|||
Address symAddr = sym.getAddress();
|
||||
Reference ref = refMgr.getReference(addr, symAddr, opIndex);
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Set Label");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Set Label");
|
||||
Namespace scope = null;
|
||||
|
||||
Symbol newSym = findSymbol(symTable, currentLabel, symAddr);
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
*/
|
||||
package ghidra.app.plugin.core.module;
|
||||
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingAction;
|
||||
import docking.action.MenuData;
|
||||
import ghidra.app.CorePluginPackage;
|
||||
import ghidra.app.cmd.module.RenameCmd;
|
||||
import ghidra.app.context.ListingActionContext;
|
||||
|
@ -26,8 +31,9 @@ import ghidra.app.services.ProgramTreeService;
|
|||
import ghidra.framework.cmd.CompoundCmd;
|
||||
import ghidra.framework.plugintool.PluginInfo;
|
||||
import ghidra.framework.plugintool.PluginTool;
|
||||
import ghidra.framework.plugintool.util.*;
|
||||
import ghidra.framework.plugintool.util.PluginStatus;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.listing.ProgramFragment;
|
||||
import ghidra.program.model.symbol.Symbol;
|
||||
import ghidra.program.model.symbol.SymbolTable;
|
||||
|
@ -35,12 +41,6 @@ import ghidra.program.util.LabelFieldLocation;
|
|||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.util.HelpLocation;
|
||||
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import docking.ActionContext;
|
||||
import docking.action.DockingAction;
|
||||
import docking.action.MenuData;
|
||||
|
||||
/**
|
||||
* Plugin provides the following Fragment rename actions:
|
||||
* 1. Automatically rename selected Program Fragments to match the
|
||||
|
@ -113,7 +113,7 @@ public class AutoRenamePlugin extends ProgramPlugin {
|
|||
if (obj instanceof ProgramNode) {
|
||||
ProgramNode node = (ProgramNode) obj;
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Auto Rename Fragment(s)");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Auto Rename Fragment(s)");
|
||||
SymbolTable symTable = currentProgram.getSymbolTable();
|
||||
|
||||
// Find selected Fragments
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -68,21 +67,24 @@ public class GroupTransferable implements Transferable {
|
|||
/**
|
||||
* Return all data flavors that this class supports.
|
||||
*/
|
||||
public synchronized DataFlavor []getTransferDataFlavors() {
|
||||
@Override
|
||||
public synchronized DataFlavor []getTransferDataFlavors() {
|
||||
return flavors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the specified data flavor is supported.
|
||||
*/
|
||||
public boolean isDataFlavorSupported(DataFlavor f) {
|
||||
@Override
|
||||
public boolean isDataFlavorSupported(DataFlavor f) {
|
||||
return flavorList.contains(f);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the transfer data with the given data flavor.
|
||||
*/
|
||||
public synchronized Object getTransferData(DataFlavor f)
|
||||
@Override
|
||||
public synchronized Object getTransferData(DataFlavor f)
|
||||
throws UnsupportedFlavorException, IOException {
|
||||
|
||||
if (f.equals(localGroupFlavor)) {
|
||||
|
|
|
@ -24,6 +24,7 @@ import ghidra.app.context.ListingActionContext;
|
|||
import ghidra.app.context.ListingContextAction;
|
||||
import ghidra.framework.cmd.Command;
|
||||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.listing.Program;
|
||||
import ghidra.program.model.symbol.Reference;
|
||||
import ghidra.program.model.symbol.ReferenceManager;
|
||||
import ghidra.program.util.*;
|
||||
|
@ -58,7 +59,7 @@ public class DeleteReferencesAction extends ListingContextAction {
|
|||
if (loc instanceof OperandFieldLocation) {
|
||||
opIndex = ((OperandFieldLocation) loc).getOperandIndex();
|
||||
}
|
||||
Command cmd = new RemoveAllReferencesCmd(loc.getAddress(), opIndex);
|
||||
Command<Program> cmd = new RemoveAllReferencesCmd(loc.getAddress(), opIndex);
|
||||
plugin.getTool().execute(cmd, context.getProgram());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -91,6 +90,7 @@ abstract class EditReferencePanel extends JPanel {
|
|||
@Override
|
||||
public void requestFocus() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
|
||||
kfm.focusNextComponent(EditReferencePanel.this);
|
||||
|
|
|
@ -173,13 +173,13 @@ class EditReferencesModel extends AbstractSortedTableModel<Reference> {
|
|||
|
||||
case REF_TYPE_COL:
|
||||
if (ref.getReferenceType() != value) {
|
||||
Command cmd = new EditRefTypeCmd(ref, (RefType) value);
|
||||
Command<Program> cmd = new EditRefTypeCmd(ref, (RefType) value);
|
||||
plugin.getTool().execute(cmd, cu.getProgram());
|
||||
}
|
||||
break;
|
||||
|
||||
case IS_PRIMARY_COL:
|
||||
Command cmd = new SetPrimaryRefCmd(ref, ((Boolean) value).booleanValue());
|
||||
Command<Program> cmd = new SetPrimaryRefCmd(ref, ((Boolean) value).booleanValue());
|
||||
plugin.getTool().execute(cmd, cu.getProgram());
|
||||
break;
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter {
|
|||
private void deleteExternalProgram() {
|
||||
ExternalManager externalManager = program.getExternalManager();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
CompoundCmd cmd = new CompoundCmd("Delete External Program Name");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Delete External Program Name");
|
||||
for (String externalName : getSelectedExternalNames()) {
|
||||
boolean hasLocations = externalManager.getExternalLocations(externalName).hasNext();
|
||||
if (hasLocations) {
|
||||
|
@ -251,7 +251,8 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter {
|
|||
ExternalManager externalManager = program.getExternalManager();
|
||||
String externalLibraryPath = externalManager.getExternalLibraryPath(externalName);
|
||||
if (!pathName.equals(externalLibraryPath)) {
|
||||
Command cmd = new SetExternalNameCmd(externalName, domainFile.getPathname());
|
||||
Command<Program> cmd =
|
||||
new SetExternalNameCmd(externalName, domainFile.getPathname());
|
||||
getTool().execute(cmd, program);
|
||||
}
|
||||
});
|
||||
|
@ -260,7 +261,7 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter {
|
|||
}
|
||||
|
||||
private void clearExternalAssociation() {
|
||||
CompoundCmd cmd = new CompoundCmd("Clear External Program Associations");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Clear External Program Associations");
|
||||
for (String externalName : getSelectedExternalNames()) {
|
||||
cmd.add(new ClearExternalNameCmd(externalName));
|
||||
}
|
||||
|
@ -435,7 +436,8 @@ public class ExternalReferencesProvider extends ComponentProviderAdapter {
|
|||
|
||||
rowToHighlightDuringNextReload = newName;
|
||||
String oldName = path.getName();
|
||||
Command cmd = new UpdateExternalNameCmd(oldName, newName, SourceType.USER_DEFINED);
|
||||
Command<Program> cmd =
|
||||
new UpdateExternalNameCmd(oldName, newName, SourceType.USER_DEFINED);
|
||||
if (!tool.execute(cmd, program)) {
|
||||
tool.setStatusInfo(cmd.getStatusMsg());
|
||||
}
|
||||
|
|
|
@ -525,25 +525,27 @@ public class ReferencesPlugin extends Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
BackgroundCommand cmd =
|
||||
BackgroundCommand<Program> cmd =
|
||||
new AddMemRefsCmd(cuAddr, set, rt, SourceType.USER_DEFINED, opIndex);
|
||||
tool.executeBackgroundCommand(cmd, cu.getProgram());
|
||||
}
|
||||
|
||||
boolean addDefaultReference(Program program, Address fromAddr, int opIndex, Address toAddr,
|
||||
RefType refType) {
|
||||
Command cmd =
|
||||
Command<Program> cmd =
|
||||
new AddMemRefCmd(fromAddr, toAddr, refType, SourceType.USER_DEFINED, opIndex, true);
|
||||
return tool.execute(cmd, program);
|
||||
}
|
||||
|
||||
boolean addDefaultReference(Program program, Address fromAddr, int opIndex, int stackOffset) {
|
||||
Command cmd = new AddStackRefCmd(fromAddr, opIndex, stackOffset, SourceType.USER_DEFINED);
|
||||
Command<Program> cmd =
|
||||
new AddStackRefCmd(fromAddr, opIndex, stackOffset, SourceType.USER_DEFINED);
|
||||
return tool.execute(cmd, program);
|
||||
}
|
||||
|
||||
boolean addDefaultReference(Program program, Address fromAddr, int opIndex, Register reg) {
|
||||
Command cmd = new AddRegisterRefCmd(fromAddr, opIndex, reg, SourceType.USER_DEFINED);
|
||||
Command<Program> cmd =
|
||||
new AddRegisterRefCmd(fromAddr, opIndex, reg, SourceType.USER_DEFINED);
|
||||
return tool.execute(cmd, program);
|
||||
}
|
||||
|
||||
|
@ -559,7 +561,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
* Remove specified set of references
|
||||
*/
|
||||
void deleteReferences(Program program, Reference[] refs) {
|
||||
CompoundCmd cmd = new CompoundCmd("Remove Reference(s)");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Remove Reference(s)");
|
||||
for (Reference ref : refs) {
|
||||
cmd.add(new RemoveReferenceCmd(ref));
|
||||
}
|
||||
|
@ -573,7 +575,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
*/
|
||||
boolean updateReference(Reference editRef, CodeUnit fromCodeUnit, Address toAddr,
|
||||
boolean isOffsetRef, long offset, RefType refType) {
|
||||
CompoundCmd cmd = new CompoundCmd("Update Memory Reference");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Update Memory Reference");
|
||||
int opIndex = editRef.getOperandIndex();
|
||||
cmd.add(new RemoveReferenceCmd(editRef));
|
||||
if (isOffsetRef) {
|
||||
|
@ -610,7 +612,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
return false;
|
||||
}
|
||||
|
||||
Command cmd;
|
||||
Command<Program> cmd;
|
||||
if (isOffsetRef) {
|
||||
cmd = new AddOffsetMemRefCmd(fromAddr, toAddr, false, refType, SourceType.USER_DEFINED,
|
||||
opIndex, offset);
|
||||
|
@ -632,7 +634,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
return false;
|
||||
}
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Update Register Reference");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Update Register Reference");
|
||||
cmd.add(new RemoveReferenceCmd(editRef));
|
||||
cmd.add(new AddRegisterRefCmd(fromAddr, editRef.getOperandIndex(), reg, refType,
|
||||
SourceType.USER_DEFINED));
|
||||
|
@ -670,7 +672,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
return false;
|
||||
}
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Update Stack Reference");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Update Stack Reference");
|
||||
cmd.add(new RemoveReferenceCmd(editRef));
|
||||
cmd.add(new AddStackRefCmd(fromAddr, editRef.getOperandIndex(), stackOffset, refType,
|
||||
SourceType.USER_DEFINED));
|
||||
|
@ -699,7 +701,8 @@ public class ReferencesPlugin extends Plugin {
|
|||
return tool.execute(cmd, p);
|
||||
}
|
||||
|
||||
private void buildAddExtRefCmd(CompoundCmd cmd, Program p, Address fromAddr, int opIndex,
|
||||
private void buildAddExtRefCmd(CompoundCmd<Program> cmd, Program p, Address fromAddr,
|
||||
int opIndex,
|
||||
String extName, String path, Address addr, String label, RefType refType) {
|
||||
|
||||
cmd.add(new SetExternalRefCmd(fromAddr, opIndex, extName, label, addr, refType,
|
||||
|
@ -721,7 +724,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
ExternalLocation oldExtLoc = editRef.getExternalLocation();
|
||||
String oldExtName = oldExtLoc.getLibraryName();
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Update External Reference");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Update External Reference");
|
||||
|
||||
// TODO: Add RefType entry to External Reference editor panel (assume unchanged to avoid merge conflict)
|
||||
|
||||
|
@ -790,7 +793,7 @@ public class ReferencesPlugin extends Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Add External Reference");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Add External Reference");
|
||||
buildAddExtRefCmd(cmd, p, fromCodeUnit.getMinAddress(), opIndex, extName, path, addr, label,
|
||||
refType);
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ public class RegisterPlugin extends ProgramPlugin {
|
|||
while (it.hasNext()) {
|
||||
AddressRange range = it.next();
|
||||
if (range.contains(addr)) {
|
||||
Command cmd = new SetRegisterCmd(register, range.getMinAddress(),
|
||||
Command<Program> cmd = new SetRegisterCmd(register, range.getMinAddress(),
|
||||
range.getMaxAddress(), null);
|
||||
if (!tool.execute(cmd, context.getProgram())) {
|
||||
Msg.showError(this, tool.getToolFrame(), "Register Context Error",
|
||||
|
@ -246,7 +246,7 @@ public class RegisterPlugin extends ProgramPlugin {
|
|||
RegisterFieldLocation location = (RegisterFieldLocation) context.getLocation();
|
||||
Register register = location.getRegister();
|
||||
Address addr = location.getAddress();
|
||||
Command cmd = new SetRegisterCmd(register, addr, addr, null);
|
||||
Command<Program> cmd = new SetRegisterCmd(register, addr, addr, null);
|
||||
if (!tool.execute(cmd, context.getProgram())) {
|
||||
Msg.showError(this, tool.getToolFrame(), "Register Context Error", cmd.getStatusMsg());
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ public class RegisterPlugin extends ProgramPlugin {
|
|||
return;
|
||||
}
|
||||
|
||||
CompoundCmd cmd = new CompoundCmd("Set Register Values");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Set Register Values");
|
||||
for (AddressRange range : addressSet) {
|
||||
SetRegisterCmd regCmd =
|
||||
new SetRegisterCmd(register, range.getMinAddress(), range.getMaxAddress(), value);
|
||||
|
|
|
@ -102,9 +102,9 @@ class RegisterValuesPanel extends JPanel {
|
|||
|
||||
private void updateValue(Address start, Address end, Address newStart, Address newEnd,
|
||||
BigInteger newValue) {
|
||||
CompoundCmd cmd = new CompoundCmd("Update Register Range");
|
||||
Command cmd1 = new SetRegisterCmd(selectedRegister, start, end, null);
|
||||
Command cmd2 = new SetRegisterCmd(selectedRegister, newStart, newEnd, newValue);
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Update Register Range");
|
||||
Command<Program> cmd1 = new SetRegisterCmd(selectedRegister, start, end, null);
|
||||
Command<Program> cmd2 = new SetRegisterCmd(selectedRegister, newStart, newEnd, newValue);
|
||||
cmd.add(cmd1);
|
||||
cmd.add(cmd2);
|
||||
tool.execute(cmd, currentProgram);
|
||||
|
@ -250,7 +250,7 @@ class RegisterValuesPanel extends JPanel {
|
|||
}
|
||||
|
||||
void deleteSelectedRanges() {
|
||||
CompoundCmd cmd = new CompoundCmd("Delete Register Value Ranges");
|
||||
CompoundCmd<Program> cmd = new CompoundCmd<>("Delete Register Value Ranges");
|
||||
int[] rows = table.getSelectedRows();
|
||||
boolean containsDefaultValues = false;
|
||||
for (int row : rows) {
|
||||
|
|
|
@ -128,6 +128,7 @@ public class StackEditorManagerPlugin extends Plugin
|
|||
return editorMgr.canCloseDomainObject(dObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void optionsChanged(ToolOptions options, String optionName, Object oldValue,
|
||||
Object newValue) {
|
||||
setOptions(options);
|
||||
|
@ -155,6 +156,7 @@ public class StackEditorManagerPlugin extends Plugin
|
|||
options.setBoolean(HEX_NUMBERS_OPTION_NAME, showNumbersInHex);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showStackNumbersInHex() {
|
||||
return showNumbersInHex;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,8 @@ public class SetExternalProgramAction extends SymbolTreeContextAction {
|
|||
String pathName = domainFile.toString();
|
||||
dialog.close();
|
||||
if (!pathName.equals(externalLibraryPath)) {
|
||||
Command cmd = new SetExternalNameCmd(externalName, domainFile.getPathname());
|
||||
Command<Program> cmd =
|
||||
new SetExternalNameCmd(externalName, domainFile.getPathname());
|
||||
plugin.getTool().execute(cmd, plugin.getProgram());
|
||||
}
|
||||
});
|
||||
|
|
|
@ -73,7 +73,7 @@ public class PropertyManagerProvider extends ComponentProviderAdapter {
|
|||
String propName = (String) model.getValueAt(row,
|
||||
PropertyManagerTableModel.PROPERTY_NAME_COLUMN);
|
||||
model.removeRow(row);
|
||||
Command cmd = new PropertyDeleteCmd(propName, restrictedView);
|
||||
Command<Program> cmd = new PropertyDeleteCmd(propName, restrictedView);
|
||||
PropertyManagerProvider.this.plugin.getTool().execute(cmd, currentProgram);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -70,6 +69,7 @@ class PropertyManagerTableModel extends AbstractTableModel {
|
|||
/*
|
||||
* @see javax.swing.table.TableModel#getColumnCount()
|
||||
*/
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return 1;
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ class PropertyManagerTableModel extends AbstractTableModel {
|
|||
/*
|
||||
* @see javax.swing.table.TableModel#getRowCount()
|
||||
*/
|
||||
@Override
|
||||
public synchronized int getRowCount() {
|
||||
if (propertyNames != null) {
|
||||
return propertyNames.length;
|
||||
|
@ -95,6 +96,7 @@ class PropertyManagerTableModel extends AbstractTableModel {
|
|||
/*
|
||||
* @see javax.swing.table.TableModel#getValueAt(int, int)
|
||||
*/
|
||||
@Override
|
||||
public synchronized Object getValueAt(int rowIndex, int columnIndex) {
|
||||
if (propertyNames != null && rowIndex < propertyNames.length) {
|
||||
return propertyNames[rowIndex];
|
||||
|
|
|
@ -226,6 +226,7 @@ public class Match implements Comparable<Match>
|
|||
/* (non-Javadoc)
|
||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int compareTo(Match m) {
|
||||
int val = getThisBeginning().compareTo( m.getThisBeginning() );
|
||||
if( val != 0 )
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -29,11 +28,13 @@ public abstract class AnalyzerAdapter extends AbstractAnalyzer {
|
|||
setPriority(priority);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
|
||||
throws CancelledException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getDefaultEnablement(Program program) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -66,6 +65,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner {
|
|||
/**
|
||||
* Return all data flavors that this class supports.
|
||||
*/
|
||||
@Override
|
||||
public synchronized DataFlavor[] getTransferDataFlavors() {
|
||||
return flavors;
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner {
|
|||
/**
|
||||
* Return whether the specified data flavor is supported.
|
||||
*/
|
||||
@Override
|
||||
public boolean isDataFlavorSupported(DataFlavor f) {
|
||||
return flavorList.contains(f);
|
||||
}
|
||||
|
@ -80,6 +81,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner {
|
|||
/**
|
||||
* Return the transfer data with the given data flavor.
|
||||
*/
|
||||
@Override
|
||||
public synchronized Object getTransferData(DataFlavor f) throws UnsupportedFlavorException,
|
||||
IOException {
|
||||
|
||||
|
@ -101,6 +103,7 @@ public class CodeUnitInfoTransferable implements Transferable, ClipboardOwner {
|
|||
* (non-Javadoc)
|
||||
* @see java.awt.datatransfer.ClipboardOwner#lostOwnership(java.awt.datatransfer.Clipboard, java.awt.datatransfer.Transferable)
|
||||
*/
|
||||
@Override
|
||||
public void lostOwnership(Clipboard clipboard, Transferable contents) {
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -77,6 +76,7 @@ public class AoutHeader implements StructConverter {
|
|||
return data_start;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(AoutHeader.class);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -45,6 +44,7 @@ public class CoffLineNumber implements StructConverter {
|
|||
return l_lnno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(CoffLineNumber.class);
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ public class CoffRelocation implements StructConverter {
|
|||
return r_type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
Structure struct = new StructureDataType(StructConverterUtil.parseName(CoffRelocation.class), 0);
|
||||
struct.add(DWORD, "r_vaddr", null);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -77,6 +76,7 @@ public class CoffSymbolAuxArray implements CoffSymbolAux {
|
|||
return unused;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ public class CoffSymbolAuxBeginningOfBlock implements CoffSymbolAux {
|
|||
return unused3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -35,6 +34,7 @@ class CoffSymbolAuxDefault implements CoffSymbolAux {
|
|||
return bytes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -47,6 +46,7 @@ public class CoffSymbolAuxEndOfBlock implements CoffSymbolAux {
|
|||
return unused2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -53,6 +52,7 @@ public class CoffSymbolAuxEndOfStruct implements CoffSymbolAux {
|
|||
return unused2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -41,6 +40,7 @@ public class CoffSymbolAuxFilename implements CoffSymbolAux {
|
|||
return unused;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -59,6 +58,7 @@ public class CoffSymbolAuxFunction implements CoffSymbolAux {
|
|||
return unused;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -53,6 +52,7 @@ public class CoffSymbolAuxName implements CoffSymbolAux {
|
|||
return unused2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -53,6 +52,7 @@ public class CoffSymbolAuxSection implements CoffSymbolAux {
|
|||
return unused;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -59,6 +58,7 @@ public class CoffSymbolAuxTagName implements CoffSymbolAux {
|
|||
return unused3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(this);
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ public final class SecondLinkerMember implements StructConverter {
|
|||
return new ArrayList<String>(stringTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
String name = StructConverterUtil.parseName(SecondLinkerMember.class);
|
||||
String uniqueName = name + "_" + numberOfMembers + "_" + numberOfSymbols;
|
||||
|
|
|
@ -70,6 +70,7 @@ public class DWARFExpressionException extends Exception {
|
|||
return step;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return super.getMessage() + (expr != null ? "\n" + expr.toString(step, false, false) : "");
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -58,7 +57,8 @@ public class GnuVerdaux implements StructConverter {
|
|||
/**
|
||||
* @see ghidra.app.util.bin.StructConverter#toDataType()
|
||||
*/
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
StructureDataType struct = new StructureDataType("Elf_Verdaux", 0);
|
||||
struct.add(DWORD, "vna_name", "Version or dependency names");
|
||||
struct.add(DWORD, "vna_next", "Offset in bytes to next verdaux entry");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -93,7 +92,8 @@ public class GnuVerdef implements StructConverter {
|
|||
/**
|
||||
* @see ghidra.app.util.bin.StructConverter#toDataType()
|
||||
*/
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
StructureDataType struct = new StructureDataType("Elf_Verdef", 0);
|
||||
struct.add( WORD, "vd_version", "Version revision");
|
||||
struct.add( WORD, "vd_flags", "Version information");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -79,7 +78,8 @@ public class GnuVernaux implements StructConverter {
|
|||
/**
|
||||
* @see ghidra.app.util.bin.StructConverter#toDataType()
|
||||
*/
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
StructureDataType struct = new StructureDataType("Elf_Verdef", 0);
|
||||
struct.add(DWORD, "vna_hash", "Hash value of dependency name");
|
||||
struct.add( WORD, "vna_flags", "Dependency specific information");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -79,7 +78,8 @@ public class GnuVerneed implements StructConverter {
|
|||
/**
|
||||
* @see ghidra.app.util.bin.StructConverter#toDataType()
|
||||
*/
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
StructureDataType struct = new StructureDataType("Elf_Verneed", 0);
|
||||
struct.add( WORD, "vd_version", "Version of structure");
|
||||
struct.add( WORD, "vd_cnt", "Number of associated aux entries");
|
||||
|
|
|
@ -199,6 +199,7 @@ public class GoMethod implements StructureMarkup<GoMethod> {
|
|||
return funcAddr.equals(method.getTfn());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return type.getMethodPrototypeString(method.getName(), getMethodFuncType());
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -74,6 +73,7 @@ public class AppleSingleDouble implements StructConverter {
|
|||
return entryList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
String name = StructConverterUtil.parseName(AppleSingleDouble.class);
|
||||
Structure struct = new StructureDataType(name, 0);
|
||||
|
|
|
@ -73,6 +73,7 @@ public class EntryDescriptor implements StructConverter {
|
|||
return _entry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(EntryDescriptor.class);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -75,6 +74,7 @@ public class CFragResource implements StructConverter {
|
|||
return _members;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(CFragResource.class);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -131,6 +130,7 @@ public class CFragResourceMember implements StructConverter {
|
|||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
String structName = StructConverterUtil.parseName(CFragResourceMember.class);
|
||||
Structure struct = new StructureDataType(structName, 0);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -40,6 +39,7 @@ public class CFragUsage1Union implements StructConverter {
|
|||
return appStackSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(getClass());
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public class CFragUsage2Union implements StructConverter {
|
|||
return appSubdirID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(getClass());
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public class CFragWhere1Union implements StructConverter {
|
|||
return spaceID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(getClass());
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ public class CFragWhere2Union implements StructConverter {
|
|||
return reserved;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(getClass());
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -98,6 +97,7 @@ public class ReferenceListEntry implements StructConverter {
|
|||
return handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
String name = StructConverterUtil.parseName(ReferenceListEntry.class);
|
||||
Structure struct = new StructureDataType(name, 0);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -102,6 +101,7 @@ public class ResourceHeader extends Entry implements StructConverter {
|
|||
return _map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
return StructConverterUtil.toDataType(ResourceHeader.class);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -100,6 +99,7 @@ public class ResourceType implements StructConverter {
|
|||
return _referenceList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
String name = StructConverterUtil.parseName(ResourceType.class);
|
||||
Structure struct = new StructureDataType(name, 0);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue