mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-0 Completed cleanup of unused AbstractDataType DuplicateNameException
use
This commit is contained in:
parent
f080fb70a1
commit
52eed79cc8
9 changed files with 22 additions and 330 deletions
|
@ -18,8 +18,6 @@ package ghidra.app.util.bin.format.pe.rich;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.program.model.data.*;
|
import ghidra.program.model.data.*;
|
||||||
import ghidra.program.model.mem.MemBuffer;
|
import ghidra.program.model.mem.MemBuffer;
|
||||||
import ghidra.util.InvalidNameException;
|
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
class MSRichProductBuildNumberDataType extends DataTypeImpl {
|
class MSRichProductBuildNumberDataType extends DataTypeImpl {
|
||||||
|
|
||||||
|
@ -47,22 +45,6 @@ class MSRichProductBuildNumberDataType extends DataTypeImpl {
|
||||||
return clone(dtm);
|
return clone(dtm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setName(String name) throws InvalidNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMnemonic(Settings settings) {
|
public String getMnemonic(Settings settings) {
|
||||||
return "xordw";
|
return "xordw";
|
||||||
|
@ -101,28 +83,4 @@ class MSRichProductBuildNumberDataType extends DataTypeImpl {
|
||||||
return getClass() == dt.getClass();
|
return getClass() == dt.getClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeSizeChanged(DataType dt) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeDeleted(DataType dt) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeReplaced(DataType oldDt, DataType newDt) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeNameChanged(DataType dt, String oldName) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean dependsOn(DataType dt) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@ package ghidra.app.util.bin.format.pe.rich;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.program.model.data.*;
|
import ghidra.program.model.data.*;
|
||||||
import ghidra.program.model.mem.MemBuffer;
|
import ghidra.program.model.mem.MemBuffer;
|
||||||
import ghidra.util.InvalidNameException;
|
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
class MSRichProductIDDataType extends DataTypeImpl {
|
class MSRichProductIDDataType extends DataTypeImpl {
|
||||||
|
|
||||||
|
@ -47,22 +45,6 @@ class MSRichProductIDDataType extends DataTypeImpl {
|
||||||
return clone(dtm);
|
return clone(dtm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setName(String name) throws InvalidNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMnemonic(Settings settings) {
|
public String getMnemonic(Settings settings) {
|
||||||
return "Product ID";
|
return "Product ID";
|
||||||
|
@ -101,28 +83,4 @@ class MSRichProductIDDataType extends DataTypeImpl {
|
||||||
return getClass() == dt.getClass();
|
return getClass() == dt.getClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeSizeChanged(DataType dt) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeDeleted(DataType dt) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeReplaced(DataType oldDt, DataType newDt) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeNameChanged(DataType dt, String oldName) {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean dependsOn(DataType dt) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ import ghidra.docking.settings.Settings;
|
||||||
import ghidra.program.model.data.*;
|
import ghidra.program.model.data.*;
|
||||||
import ghidra.program.model.mem.MemBuffer;
|
import ghidra.program.model.mem.MemBuffer;
|
||||||
import ghidra.util.InvalidNameException;
|
import ghidra.util.InvalidNameException;
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
class RichObjectCountDataType extends DataTypeImpl {
|
class RichObjectCountDataType extends DataTypeImpl {
|
||||||
|
|
||||||
|
@ -47,22 +46,11 @@ class RichObjectCountDataType extends DataTypeImpl {
|
||||||
return clone(dtm);
|
return clone(dtm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setName(String name) throws InvalidNameException {
|
public void setName(String name) throws InvalidNameException {
|
||||||
// ignored
|
// ignored
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMnemonic(Settings settings) {
|
public String getMnemonic(Settings settings) {
|
||||||
return "xorddw";
|
return "xorddw";
|
||||||
|
|
|
@ -146,8 +146,7 @@ public abstract class AbstractDataType implements DataType {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
public void setNameAndCategory(CategoryPath path, String name) throws InvalidNameException {
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
// default is immutable
|
// default is immutable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +259,7 @@ public abstract class AbstractDataType implements DataType {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
public void setCategoryPath(CategoryPath path) {
|
||||||
// not-applicable
|
// not-applicable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ import ghidra.docking.settings.SettingsDefinition;
|
||||||
import ghidra.program.database.data.DataTypeUtilities;
|
import ghidra.program.database.data.DataTypeUtilities;
|
||||||
import ghidra.program.model.mem.MemBuffer;
|
import ghidra.program.model.mem.MemBuffer;
|
||||||
import ghidra.util.InvalidNameException;
|
import ghidra.util.InvalidNameException;
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic implementation of the Array interface.
|
* Basic implementation of the Array interface.
|
||||||
|
@ -305,17 +304,6 @@ public class ArrayDataType extends DataTypeImpl implements Array {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
// unsupported - ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
// unsupported - ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CategoryPath getCategoryPath() {
|
public CategoryPath getCategoryPath() {
|
||||||
DataType dt = getDataType();
|
DataType dt = getDataType();
|
||||||
|
|
|
@ -19,9 +19,7 @@ import ghidra.app.plugin.core.datamgr.archive.BuiltInSourceArchive;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.docking.settings.SettingsDefinition;
|
import ghidra.docking.settings.SettingsDefinition;
|
||||||
import ghidra.program.model.lang.DecompilerLanguage;
|
import ghidra.program.model.lang.DecompilerLanguage;
|
||||||
import ghidra.util.InvalidNameException;
|
|
||||||
import ghidra.util.UniversalID;
|
import ghidra.util.UniversalID;
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE: ALL DATATYPE CLASSES MUST END IN "DataType". If not,
|
* NOTE: ALL DATATYPE CLASSES MUST END IN "DataType". If not,
|
||||||
|
@ -92,27 +90,6 @@ public abstract class BuiltIn extends DataTypeImpl implements BuiltInDataType {
|
||||||
return getClass() == dt.getClass();
|
return getClass() == dt.getClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeSizeChanged(DataType dt) {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final void setName(String name) throws InvalidNameException {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void addParent(DataType dt) {
|
public final void addParent(DataType dt) {
|
||||||
// Default implementation does nothing.
|
// Default implementation does nothing.
|
||||||
|
@ -123,35 +100,6 @@ public abstract class BuiltIn extends DataTypeImpl implements BuiltInDataType {
|
||||||
// Default implementation does nothing.
|
// Default implementation does nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeNameChanged(DataType dt, String oldName) {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeReplaced(DataType oldDt, DataType newDt) {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeDeleted(DataType dt) {
|
|
||||||
// Default implementation does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
// /* (non-Javadoc)
|
|
||||||
// * @see ghidra.program.model.data.BuiltInDataType#clone(ghidra.program.model.data.DataTypeManager)
|
|
||||||
// */
|
|
||||||
// public BuiltInDataType clone(DataTypeManager dataManager) {
|
|
||||||
// BuiltIn dt = (BuiltIn)copy(false);
|
|
||||||
// dt.dataMgr = dataManager;
|
|
||||||
// return dt;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean dependsOn(DataType dt) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UniversalID getUniversalID() {
|
public UniversalID getUniversalID() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -19,8 +19,6 @@ import ghidra.docking.settings.Settings;
|
||||||
import ghidra.program.model.mem.MemBuffer;
|
import ghidra.program.model.mem.MemBuffer;
|
||||||
import ghidra.program.model.mem.MemoryAccessException;
|
import ghidra.program.model.mem.MemoryAccessException;
|
||||||
import ghidra.program.model.scalar.Scalar;
|
import ghidra.program.model.scalar.Scalar;
|
||||||
import ghidra.util.InvalidNameException;
|
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an implementation of a byte that has not been defined yet as a
|
* Provides an implementation of a byte that has not been defined yet as a
|
||||||
|
@ -35,37 +33,21 @@ public class DefaultDataType extends DataTypeImpl {
|
||||||
super(CategoryPath.ROOT, "undefined", null);
|
super(CategoryPath.ROOT, "undefined", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @see ghidra.program.model.data.DataType#getMnemonic(Settings)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getMnemonic(Settings settings) {
|
public String getMnemonic(Settings settings) {
|
||||||
return "??";
|
return "??";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @see ghidra.program.model.data.DataType#getLength()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @see ghidra.program.model.data.DataType#getDescription()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return "Undefined Byte";
|
return "Undefined Byte";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @see ghidra.program.model.data.DataType#getRepresentation(MemBuffer, Settings, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getRepresentation(MemBuffer buf, Settings settings, int length) {
|
public String getRepresentation(MemBuffer buf, Settings settings, int length) {
|
||||||
try {
|
try {
|
||||||
|
@ -112,83 +94,16 @@ public class DefaultDataType extends DataTypeImpl {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#dataTypeSizeChanged(ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void dataTypeSizeChanged(DataType dt) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#isEquivalent(ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEquivalent(DataType dt) {
|
public boolean isEquivalent(DataType dt) {
|
||||||
return dt == this;
|
return dt == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#setCategoryPath(ghidra.program.model.data.CategoryPath)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#setName(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setName(String name) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#setNameAndCategory(ghidra.program.model.data.CategoryPath, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#dataTypeDeleted(ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void dataTypeDeleted(DataType dt) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#dataTypeNameChanged(ghidra.program.model.data.DataType, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void dataTypeNameChanged(DataType dt, String oldName) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#dataTypeReplaced(ghidra.program.model.data.DataType, ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void dataTypeReplaced(DataType oldDt, DataType newDt) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#dependsOn(ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean dependsOn(DataType dt) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#addParent(ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void addParent(DataType dt) {
|
public void addParent(DataType dt) {
|
||||||
// this datatype is STATIC, don't hold on to parents
|
// this datatype is STATIC, don't hold on to parents
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#removeParent(ghidra.program.model.data.DataType)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeParent(DataType dt) {
|
public void removeParent(DataType dt) {
|
||||||
// this datatype is STATIC, don't hold on to parents
|
// this datatype is STATIC, don't hold on to parents
|
||||||
|
|
|
@ -17,7 +17,6 @@ package ghidra.program.model.data;
|
||||||
|
|
||||||
import ghidra.util.InvalidNameException;
|
import ghidra.util.InvalidNameException;
|
||||||
import ghidra.util.UniversalID;
|
import ghidra.util.UniversalID;
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base implementation for a generic data type.
|
* Base implementation for a generic data type.
|
||||||
|
@ -42,9 +41,7 @@ public abstract class GenericDataType extends DataTypeImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
public void setNameAndCategory(CategoryPath path, String name) throws InvalidNameException {
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
|
|
||||||
doSetName(name);
|
doSetName(name);
|
||||||
doSetCategoryPath(path);
|
doSetCategoryPath(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,7 @@ package ghidra.program.model.data;
|
||||||
import ghidra.app.plugin.core.datamgr.archive.BuiltInSourceArchive;
|
import ghidra.app.plugin.core.datamgr.archive.BuiltInSourceArchive;
|
||||||
import ghidra.docking.settings.Settings;
|
import ghidra.docking.settings.Settings;
|
||||||
import ghidra.program.model.mem.MemBuffer;
|
import ghidra.program.model.mem.MemBuffer;
|
||||||
import ghidra.util.InvalidNameException;
|
|
||||||
import ghidra.util.classfinder.ClassSearcher;
|
import ghidra.util.classfinder.ClassSearcher;
|
||||||
import ghidra.util.exception.DuplicateNameException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an implementation of a data type that stands-in for a missing Built-In data type.
|
* Provides an implementation of a data type that stands-in for a missing Built-In data type.
|
||||||
|
@ -37,6 +35,7 @@ public class MissingBuiltInDataType extends DataTypeImpl implements Dynamic {
|
||||||
* @param path category path
|
* @param path category path
|
||||||
* @param missingBuiltInName name of missing built-in datatype for which this will standin for.
|
* @param missingBuiltInName name of missing built-in datatype for which this will standin for.
|
||||||
* @param missingBuiltInClassPath classpath of missing built-in datatype for which this will standin for.
|
* @param missingBuiltInClassPath classpath of missing built-in datatype for which this will standin for.
|
||||||
|
* @param dtm datatype manager
|
||||||
*/
|
*/
|
||||||
public MissingBuiltInDataType(CategoryPath path, String missingBuiltInName,
|
public MissingBuiltInDataType(CategoryPath path, String missingBuiltInName,
|
||||||
String missingBuiltInClassPath, DataTypeManager dtm) {
|
String missingBuiltInClassPath, DataTypeManager dtm) {
|
||||||
|
@ -54,30 +53,24 @@ public class MissingBuiltInDataType extends DataTypeImpl implements Dynamic {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns name of missing built-in datatype for which this type is standing-in for
|
* {@return name of missing built-in datatype for which this type is standing-in for}
|
||||||
*/
|
*/
|
||||||
public String getMissingBuiltInName() {
|
public String getMissingBuiltInName() {
|
||||||
return missingBuiltInName;
|
return missingBuiltInName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns classpath of missing built-in datatype for which this type is standing-in for
|
* {@return classpath of missing built-in datatype for which this type is standing-in for}
|
||||||
*/
|
*/
|
||||||
public String getMissingBuiltInClassPath() {
|
public String getMissingBuiltInClassPath() {
|
||||||
return missingBuiltInClassPath;
|
return missingBuiltInClassPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ghidra.program.model.data.DataType#getMnemonic(ghidra.program.model.data.Settings)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getMnemonic(Settings settings) {
|
public String getMnemonic(Settings settings) {
|
||||||
return getName();
|
return getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ghidra.program.model.data.DataType#getLength()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -88,33 +81,21 @@ public class MissingBuiltInDataType extends DataTypeImpl implements Dynamic {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.Dynamic#getLength(ghidra.program.model.mem.MemBuffer, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getLength(MemBuffer buf, int maxLength) {
|
public int getLength(MemBuffer buf, int maxLength) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ghidra.program.model.data.DataType#getDescription()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return "Missing Built-In Data Type: " + missingBuiltInClassPath;
|
return "Missing Built-In Data Type: " + missingBuiltInClassPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ghidra.program.model.data.DataType#getRepresentation(ghidra.program.model.mem.MemBuffer, ghidra.program.model.lang.ProcessorContext, ghidra.program.model.data.Settings, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getRepresentation(MemBuffer buf, Settings settings, int length) {
|
public String getRepresentation(MemBuffer buf, Settings settings, int length) {
|
||||||
return missingBuiltInClassPath;
|
return missingBuiltInClassPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see ghidra.program.model.data.DataType#getValue(ghidra.program.model.mem.MemBuffer, ghidra.program.model.lang.ProcessorContext, ghidra.program.model.data.Settings, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object getValue(MemBuffer buf, Settings settings, int length) {
|
public Object getValue(MemBuffer buf, Settings settings, int length) {
|
||||||
return missingBuiltInClassPath;
|
return missingBuiltInClassPath;
|
||||||
|
@ -129,35 +110,11 @@ public class MissingBuiltInDataType extends DataTypeImpl implements Dynamic {
|
||||||
dtm);
|
dtm);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.DataType#copy(ghidra.program.model.data.DataTypeManager)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public final DataType copy(DataTypeManager dtm) {
|
public final DataType copy(DataTypeManager dtm) {
|
||||||
return clone(dtm);
|
return clone(dtm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeDeleted(DataType dt) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeNameChanged(DataType dt, String oldName) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeReplaced(DataType oldDt, DataType newDt) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dataTypeSizeChanged(DataType dt) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean dependsOn(DataType dt) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEquivalent(DataType dt) {
|
public boolean isEquivalent(DataType dt) {
|
||||||
if (dt == null) {
|
if (dt == null) {
|
||||||
|
@ -169,21 +126,8 @@ public class MissingBuiltInDataType extends DataTypeImpl implements Dynamic {
|
||||||
if (!(dt instanceof MissingBuiltInDataType)) {
|
if (!(dt instanceof MissingBuiltInDataType)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return missingBuiltInClassPath.equals(
|
return missingBuiltInClassPath
|
||||||
((MissingBuiltInDataType) dt).missingBuiltInClassPath);
|
.equals(((MissingBuiltInDataType) dt).missingBuiltInClassPath);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setCategoryPath(CategoryPath path) throws DuplicateNameException {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setName(String name) throws InvalidNameException {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setNameAndCategory(CategoryPath path, String name)
|
|
||||||
throws InvalidNameException, DuplicateNameException {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -191,9 +135,6 @@ public class MissingBuiltInDataType extends DataTypeImpl implements Dynamic {
|
||||||
return NO_SOURCE_SYNC_TIME;
|
return NO_SOURCE_SYNC_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ghidra.program.model.data.BuiltInDataType#getCTypeDeclaration(ghidra.program.model.data.DataOrganization)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getCTypeDeclaration(DataOrganization dataOrganization) {
|
public String getCTypeDeclaration(DataOrganization dataOrganization) {
|
||||||
return null; // missing type
|
return null; // missing type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue