mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/GP-2-dragonmacher-spelling-fixes'
This commit is contained in:
commit
2ef4f26120
16 changed files with 312 additions and 301 deletions
|
@ -68,8 +68,8 @@ abstract class CompositeDBAdapter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets an adapter for working with the composite data type database table.
|
||||
* The composite table is used to store structures and unions. The adapter is based
|
||||
* Gets an adapter for working with the composite data type database table.
|
||||
* The composite table is used to store structures and unions. The adapter is based
|
||||
* on the version of the database associated with the specified database handle and the openMode.
|
||||
* @param handle handle to the database to be accessed.
|
||||
* @param openMode the mode this adapter is to be opened for (CREATE, UPDATE, READ_ONLY, UPGRADE).
|
||||
|
@ -187,10 +187,10 @@ abstract class CompositeDBAdapter {
|
|||
* @param sourceArchiveID the ID for the source archive where this data type originated.
|
||||
* @param sourceDataTypeID the ID of the associated data type in the source archive.
|
||||
* @param lastChangeTime the time this data type was last changed.
|
||||
* @param packValue {@link CompositeInternal#NO_PACKING}, {@link CompositeInternal#DEFAULT_PACKING}
|
||||
* @param packValue {@link CompositeInternal#NO_PACKING}, {@link CompositeInternal#DEFAULT_PACKING}
|
||||
* or the explicit pack value currently in use by this data type (positive value).
|
||||
* @param minAlignment {@link CompositeInternal#DEFAULT_ALIGNMENT}, {@link CompositeInternal#MACHINE_ALIGNMENT}
|
||||
* or the minimum alignment value currently in use by this data type (positive value).
|
||||
* @param minAlignment {@link CompositeInternal#DEFAULT_ALIGNMENT}, {@link CompositeInternal#MACHINE_ALIGNMENT}
|
||||
* or the minimum alignment value currently in use by this data type (positive value).
|
||||
* @return the database record for this data type.
|
||||
* @throws IOException if the database can't be accessed.
|
||||
*/
|
||||
|
@ -216,7 +216,7 @@ abstract class CompositeDBAdapter {
|
|||
/**
|
||||
* Updates the composite data type table with the provided record.
|
||||
* @param record the new record
|
||||
* @param setLastChangeTime true means change the last change time in the record to the
|
||||
* @param setLastChangeTime true means change the last change time in the record to the
|
||||
* current time before putting the record in the database.
|
||||
* @throws IOException if the database can't be accessed.
|
||||
*/
|
||||
|
@ -240,7 +240,7 @@ abstract class CompositeDBAdapter {
|
|||
/**
|
||||
* Gets all the composite data types that are contained in the category that has the indicated ID.
|
||||
* @param categoryID the category whose composite data types are wanted.
|
||||
* @return an array of IDs as LongField values within Field array for the
|
||||
* @return an array of IDs as LongField values within Field array for the
|
||||
* composite data types in the category.
|
||||
* @throws IOException if the database can't be accessed.
|
||||
*/
|
||||
|
@ -256,7 +256,7 @@ abstract class CompositeDBAdapter {
|
|||
abstract Field[] getRecordIdsForSourceArchive(long archiveID) throws IOException;
|
||||
|
||||
/**
|
||||
* Get composite record whoose sourceID and datatypeID match the specified Universal IDs.
|
||||
* Get composite record whose sourceID and datatypeID match the specified Universal IDs.
|
||||
* @param sourceID universal source archive ID
|
||||
* @param datatypeID universal datatype ID
|
||||
* @return composite record found or null
|
||||
|
|
|
@ -41,7 +41,7 @@ abstract class EnumDBAdapter {
|
|||
static final int ENUM_LAST_CHANGE_TIME_COL = EnumDBAdapterV1.V1_ENUM_LAST_CHANGE_TIME_COL;
|
||||
|
||||
/**
|
||||
* Gets an adapter for working with the enumeration data type database table. The adapter is based
|
||||
* Gets an adapter for working with the enumeration data type database table. The adapter is based
|
||||
* on the version of the database associated with the specified database handle and the openMode.
|
||||
* @param handle handle to the database to be accessed.
|
||||
* @param openMode the mode this adapter is to be opened for (CREATE, UPDATE, READ_ONLY, UPGRADE).
|
||||
|
@ -159,16 +159,17 @@ abstract class EnumDBAdapter {
|
|||
/**
|
||||
* Updates the enumeration data type table with the provided record.
|
||||
* @param record the new record
|
||||
* @param setLastChangedTime true means change the last change time in the record to the
|
||||
* @param setLastChangeTime true means change the last change time in the record to the
|
||||
* current time before putting the record in the database.
|
||||
* @throws IOException if the database can't be accessed.
|
||||
*/
|
||||
abstract void updateRecord(DBRecord record, boolean setLastChangeTime) throws IOException;
|
||||
|
||||
/**
|
||||
* Remove the record for the given enumeration ID, and remove all of its
|
||||
* associated value records.
|
||||
* Remove the record for the given enumeration ID, and remove all of its associated value
|
||||
* records.
|
||||
* @param enumID ID of enumerated data type to delete
|
||||
* @return true if successful
|
||||
* @throws IOException if there was a problem accessing the database
|
||||
*/
|
||||
abstract boolean removeRecord(long enumID) throws IOException;
|
||||
|
@ -198,7 +199,7 @@ abstract class EnumDBAdapter {
|
|||
abstract Field[] getRecordIdsForSourceArchive(long archiveID) throws IOException;
|
||||
|
||||
/**
|
||||
* Get enum record whoose sourceID and datatypeID match the specified Universal IDs.
|
||||
* Get enum record whose sourceID and datatypeID match the specified Universal IDs.
|
||||
* @param sourceID universal source archive ID
|
||||
* @param datatypeID universal datatype ID
|
||||
* @return enum record found or null
|
||||
|
|
|
@ -56,7 +56,7 @@ abstract class FunctionDefinitionDBAdapter {
|
|||
static final int GENERIC_CALLING_CONVENTION_FLAG_SHIFT = 1;
|
||||
|
||||
/**
|
||||
* Gets an adapter for working with the function definition data type database table. The adapter is based
|
||||
* Gets an adapter for working with the function definition data type database table. The adapter is based
|
||||
* on the version of the database associated with the specified database handle and the openMode.
|
||||
* @param handle handle to the database to be accessed.
|
||||
* @param openMode the mode this adapter is to be opened for (CREATE, UPDATE, READ_ONLY, UPGRADE).
|
||||
|
@ -187,7 +187,7 @@ abstract class FunctionDefinitionDBAdapter {
|
|||
/**
|
||||
* Updates the function definition data type table with the provided record.
|
||||
* @param record the new record
|
||||
* @param setLastChangedTime true means change the last change time in the record to the
|
||||
* @param setLastChangeTime true means change the last change time in the record to the
|
||||
* current time before putting the record in the database.
|
||||
* @throws IOException if the database can't be accessed.
|
||||
*/
|
||||
|
@ -218,7 +218,7 @@ abstract class FunctionDefinitionDBAdapter {
|
|||
abstract Field[] getRecordIdsForSourceArchive(long archiveID) throws IOException;
|
||||
|
||||
/**
|
||||
* Get function definition record whoose sourceID and datatypeID match the specified Universal IDs.
|
||||
* Get function definition record whose sourceID and datatypeID match the specified Universal IDs.
|
||||
* @param sourceID universal source archive ID
|
||||
* @param datatypeID universal datatype ID
|
||||
* @return function definition record found or null
|
||||
|
|
|
@ -43,7 +43,7 @@ abstract class TypedefDBAdapter {
|
|||
TypedefDBAdapterV1.V1_TYPEDEF_LAST_CHANGE_TIME_COL;
|
||||
|
||||
/**
|
||||
* Gets an adapter for working with the Typedef data type database table. The adapter is based
|
||||
* Gets an adapter for working with the Typedef data type database table. The adapter is based
|
||||
* on the version of the database associated with the specified database handle and the openMode.
|
||||
* @param handle handle to the database to be accessed.
|
||||
* @param openMode the mode this adapter is to be opened for (CREATE, UPDATE, READ_ONLY, UPGRADE).
|
||||
|
@ -156,7 +156,7 @@ abstract class TypedefDBAdapter {
|
|||
/**
|
||||
* Updates the type definition data type table with the provided record.
|
||||
* @param record the new record
|
||||
* @param setLastChangedTime true means change the last change time in the record to the
|
||||
* @param setLastChangeTime true means change the last change time in the record to the
|
||||
* current time before putting the record in the database.
|
||||
* @throws IOException if the database can't be accessed.
|
||||
*/
|
||||
|
@ -187,7 +187,7 @@ abstract class TypedefDBAdapter {
|
|||
abstract Field[] getRecordIdsForSourceArchive(long archiveID) throws IOException;
|
||||
|
||||
/**
|
||||
* Get typedef record whoose sourceID and datatypeID match the specified Universal IDs.
|
||||
* Get typedef record whose sourceID and datatypeID match the specified Universal IDs.
|
||||
* @param sourceID universal source archive ID
|
||||
* @param datatypeID universal datatype ID
|
||||
* @return typedef record found or 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,13 +15,13 @@
|
|||
*/
|
||||
package ghidra.program.database.oldfunction;
|
||||
|
||||
import db.DBHandle;
|
||||
import ghidra.program.database.map.AddressMap;
|
||||
import ghidra.program.database.util.SharedRangeMapDB;
|
||||
import ghidra.program.model.address.AddressSet;
|
||||
import ghidra.program.model.address.AddressSetView;
|
||||
import ghidra.util.datastruct.IndexRange;
|
||||
import ghidra.util.datastruct.IndexRangeIterator;
|
||||
import db.DBHandle;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,7 +51,8 @@ class OldFunctionMapDB {
|
|||
|
||||
/**
|
||||
* Get the address set which makes up a function.
|
||||
* @param functionKey
|
||||
* @param functionKey the function key
|
||||
* @return the addresses
|
||||
*/
|
||||
synchronized AddressSetView getBody(long functionKey) {
|
||||
AddressSet body = new AddressSet();
|
||||
|
@ -81,7 +81,7 @@ class OldFunctionMapDB {
|
|||
// }
|
||||
//
|
||||
// /**
|
||||
// * Get all function keys whoose body contains the specified address.
|
||||
// * Get all function keys whose body contains the specified address.
|
||||
// * @param addr
|
||||
// * @return a LongField function key iterator.
|
||||
// */
|
||||
|
@ -89,9 +89,9 @@ class OldFunctionMapDB {
|
|||
// long index = addrMap.getKey(addr, false);
|
||||
// return rangeMap.getValueIterator(index, index);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Get all function keys whoose body overlaps the specified address set.
|
||||
// * Get all function keys whose body overlaps the specified address set.
|
||||
// * @param set
|
||||
// * @return a LongField function key iterator.
|
||||
// */
|
||||
|
|
|
@ -29,7 +29,7 @@ public interface CompositeInternal extends Composite {
|
|||
static final String DEFAULT_PACKING_NAME = "";
|
||||
|
||||
/**
|
||||
* The stored packing value which corresponds to a composite that will automatically pack
|
||||
* The stored packing value which corresponds to a composite that will automatically pack
|
||||
* based upon the alignment requirements of its components. A positive pack value will
|
||||
* also pack in a similar fashion but will use the pack value as a maximum alignment
|
||||
* for each component.
|
||||
|
@ -38,7 +38,7 @@ public interface CompositeInternal extends Composite {
|
|||
public final static int DEFAULT_PACKING = 0;
|
||||
|
||||
/**
|
||||
* The stored packing value which corresponds to a composite whoose packing has been disabled.
|
||||
* The stored packing value which corresponds to a composite whose packing has been disabled.
|
||||
* In the case of structures this will permit explicit component placement by
|
||||
* offset within the structure and undefined filler components will be used.
|
||||
* This is the initial state of all newly instantiated structures.
|
||||
|
@ -47,32 +47,32 @@ public interface CompositeInternal extends Composite {
|
|||
public final static int NO_PACKING = -1;
|
||||
|
||||
/**
|
||||
* The stored minimum alignment value which indicates the default alignment
|
||||
* The stored minimum alignment value which indicates the default alignment
|
||||
* should be used based upon the packing and component alignment requirements.
|
||||
* See {@link #getStoredMinimumAlignment}.
|
||||
*/
|
||||
public final static int DEFAULT_ALIGNMENT = 0;
|
||||
|
||||
/**
|
||||
* The stored minimum alignment value which indicates the machine alignment
|
||||
* should be used as the minimum alignment (as defined by the current
|
||||
* The stored minimum alignment value which indicates the machine alignment
|
||||
* should be used as the minimum alignment (as defined by the current
|
||||
* {@link DataOrganization#getMachineAlignment()}).
|
||||
* See {@link #getStoredMinimumAlignment()}.
|
||||
*/
|
||||
public final static int MACHINE_ALIGNMENT = -1;
|
||||
|
||||
/**
|
||||
* Gets the current packing value (typically a power of 2). Other special values
|
||||
* which may be returned include {@value #DEFAULT_PACKING} and {@value #NO_PACKING}.
|
||||
* Gets the current packing value (typically a power of 2). Other special values
|
||||
* which may be returned include {@value #DEFAULT_PACKING} and {@value #NO_PACKING}.
|
||||
* @return the current positive packing value, {@value #DEFAULT_PACKING} or {@value #NO_PACKING}.
|
||||
*/
|
||||
public int getStoredPackingValue();
|
||||
|
||||
/**
|
||||
* Sets the current packing behavior (positive value, usually a power of 2). If a positive
|
||||
* Sets the current packing behavior (positive value, usually a power of 2). If a positive
|
||||
* value is specified the use of packing will be enabled if it was previously disabled
|
||||
* (see {@link #setPackingEnabled(boolean)}. A positive value will set the maximum
|
||||
* alignment for this composite and each component within a structure
|
||||
* alignment for this composite and each component within a structure
|
||||
* (e.g., a value of 1 will eliminate any padding).
|
||||
* <br>
|
||||
* Special packing values which may be specified include:
|
||||
|
@ -87,9 +87,9 @@ public interface CompositeInternal extends Composite {
|
|||
// public void setStoredPackingValue(int packingValue);
|
||||
|
||||
/**
|
||||
* Get the minimum alignment setting for this Composite which contributes
|
||||
* Get the minimum alignment setting for this Composite which contributes
|
||||
* to the actual computed alignment value (see {@link #getAlignment()}.
|
||||
* @return the minimum alignment setting for this Composite or a reserved value to indicate
|
||||
* @return the minimum alignment setting for this Composite or a reserved value to indicate
|
||||
* either {@link #DEFAULT_ALIGNMENT} or {@link #MACHINE_ALIGNMENT}.
|
||||
*/
|
||||
public int getStoredMinimumAlignment();
|
||||
|
|
|
@ -69,14 +69,14 @@ public interface DataTypeManager {
|
|||
* Returns a unique name not currently used by any other dataType or category
|
||||
* with the same baseName
|
||||
*
|
||||
* @param path the path of the name
|
||||
* @param path the path of the name
|
||||
* @param baseName the base name to be made unique
|
||||
* @return a unique name starting with baseName
|
||||
*/
|
||||
public String getUniqueName(CategoryPath path, String baseName);
|
||||
|
||||
/**
|
||||
* Returns a dataType that is "in" (ie suitable implementation) this
|
||||
* Returns a dataType that is "in" (ie suitable implementation) this
|
||||
* Manager, creating a new one if necessary. Also the returned dataType
|
||||
* will be in a category in this dataTypeManager that is equivalent to the
|
||||
* category of the passed in dataType.
|
||||
|
@ -98,11 +98,11 @@ public interface DataTypeManager {
|
|||
public DataType addDataType(DataType dataType, DataTypeConflictHandler handler);
|
||||
|
||||
/**
|
||||
* Sequentially adds a collection of datatypes to this data manager.
|
||||
* Sequentially adds a collection of datatypes to this data manager.
|
||||
* This method provides the added benefit of equivalence caching
|
||||
* for improved performance.
|
||||
* <br>
|
||||
* WARNING: This is an experimental method whoose use may cause the GUI and
|
||||
* WARNING: This is an experimental method whose use may cause the GUI and
|
||||
* task monitor to become unresponsive due to extended hold times on the manager lock.
|
||||
* @param dataTypes collection of datatypes
|
||||
* @param handler conflict handler
|
||||
|
@ -165,7 +165,7 @@ public interface DataTypeManager {
|
|||
* @param updateCategoryPath if true, the replacementDt will have its categoryPath changed
|
||||
* to the exitingDt's path.
|
||||
* @return the resolved replacement dataType.
|
||||
* @throws DataTypeDependencyException if the replacement datatype depends on
|
||||
* @throws DataTypeDependencyException if the replacement datatype depends on
|
||||
* the existing dataType;
|
||||
*/
|
||||
public DataType replaceDataType(DataType existingDt, DataType replacementDt,
|
||||
|
@ -179,7 +179,7 @@ public interface DataTypeManager {
|
|||
* name of a category in the same category as the datatype. For example, if you call
|
||||
* getDataType("/a/b/c"), and "b/c" is the name of your datatype, it will find it unless
|
||||
* there is also a category "b" under category "a". A better solution is to use
|
||||
* the {@link #getDataType(DataTypePath)} method because the DataTypePath keeps the
|
||||
* the {@link #getDataType(DataTypePath)} method because the DataTypePath keeps the
|
||||
* category and datatype name separate.
|
||||
*
|
||||
* @param dataTypePath path
|
||||
|
@ -204,10 +204,10 @@ public interface DataTypeManager {
|
|||
public DataType getDataType(DataTypePath dataTypePath);
|
||||
|
||||
/**
|
||||
* Returns the dataTypeId for the given dataType. If the dataType is not
|
||||
* Returns the dataTypeId for the given dataType. If the dataType is not
|
||||
* currently in the dataTypeManger, it will be added
|
||||
*
|
||||
* @param dt the data type
|
||||
*
|
||||
* @param dt the data type
|
||||
* @return the ID of the resolved type
|
||||
*/
|
||||
public long getResolvedID(DataType dt);
|
||||
|
@ -222,15 +222,15 @@ public interface DataTypeManager {
|
|||
public long getID(DataType dt);
|
||||
|
||||
/**
|
||||
* Returns the dataType associated with the given dataTypeId or null if the dataTypeId is
|
||||
* Returns the dataType associated with the given dataTypeId or null if the dataTypeId is
|
||||
* not valid
|
||||
*
|
||||
* @param dataTypeID the ID
|
||||
* @param dataTypeID the ID
|
||||
* @return the type
|
||||
*/
|
||||
public DataType getDataType(long dataTypeID);
|
||||
|
||||
/**
|
||||
/**
|
||||
* Returns the Category with the given id
|
||||
*
|
||||
* @param categoryID id of the desired category
|
||||
|
@ -249,7 +249,7 @@ public interface DataTypeManager {
|
|||
/**
|
||||
* Notification when data type is changed.
|
||||
* @param dataType data type that is changed
|
||||
* @param isAutoChange true if change was an automatic change in response to
|
||||
* @param isAutoChange true if change was an automatic change in response to
|
||||
* another datatype's change (e.g., size, alignment).
|
||||
*/
|
||||
public void dataTypeChanged(DataType dataType, boolean isAutoChange);
|
||||
|
@ -291,7 +291,7 @@ public interface DataTypeManager {
|
|||
/**
|
||||
* Return true if the given dataType exists in this data type manager
|
||||
*
|
||||
* @param dataType the type
|
||||
* @param dataType the type
|
||||
* @return true if the type is in this manager
|
||||
*/
|
||||
public boolean contains(DataType dataType);
|
||||
|
@ -367,12 +367,12 @@ public interface DataTypeManager {
|
|||
|
||||
/**
|
||||
* Returns a pointer of the given size to the given datatype.
|
||||
* Note: It is preferred to use default sized pointers when possible (i.e., size=-1,
|
||||
* Note: It is preferred to use default sized pointers when possible (i.e., size=-1,
|
||||
* see {@link #getPointer(DataType)}) instead of explicitly specifying the size value.
|
||||
*
|
||||
* @param datatype the pointed to data type
|
||||
* @param size the size of the pointer to be created or -1 for a default sized pointer
|
||||
* @return the pointer
|
||||
* @return the pointer
|
||||
*/
|
||||
public Pointer getPointer(DataType datatype, int size);
|
||||
|
||||
|
@ -476,7 +476,7 @@ public interface DataTypeManager {
|
|||
public void associateDataTypeWithArchive(DataType datatype, SourceArchive archive);
|
||||
|
||||
/**
|
||||
* If the indicated data type is associated with a source archive, this will remove the
|
||||
* If the indicated data type is associated with a source archive, this will remove the
|
||||
* association and the data type will become local to this data type manager.
|
||||
* @param datatype the data type to be disassociated from a source archive.
|
||||
*/
|
||||
|
@ -501,8 +501,8 @@ public interface DataTypeManager {
|
|||
public boolean updateSourceArchiveName(UniversalID sourceID, String name);
|
||||
|
||||
/**
|
||||
* Get the data organization associated with this data type manager. Note that the
|
||||
* DataOrganization settings may not be changed dynamically.
|
||||
* Get the data organization associated with this data type manager. Note that the
|
||||
* DataOrganization settings may not be changed dynamically.
|
||||
* @return data organization (will never be null)
|
||||
*/
|
||||
public DataOrganization getDataOrganization();
|
||||
|
@ -523,14 +523,14 @@ public interface DataTypeManager {
|
|||
|
||||
/**
|
||||
* Returns or creates a persisted version of the given source archive
|
||||
* @param sourceArchive the archive
|
||||
* @param sourceArchive the archive
|
||||
* @return the archive
|
||||
*/
|
||||
public SourceArchive resolveSourceArchive(SourceArchive sourceArchive);
|
||||
|
||||
/**
|
||||
* Returns the data types within this data type manager that contain the specified data type.
|
||||
* @param dataType the data type
|
||||
* Returns the data types within this data type manager that contain the specified data type.
|
||||
* @param dataType the data type
|
||||
* @return a set of data types that contain the specified data type.
|
||||
*/
|
||||
public Set<DataType> getDataTypesContaining(DataType dataType);
|
||||
|
|
|
@ -194,7 +194,7 @@ public class VariableUtilities {
|
|||
|
||||
/**
|
||||
* Perform variable storage checks using the specified datatype.
|
||||
* @param storage variable storage whoose size must match the specified data type size
|
||||
* @param storage variable storage whose size must match the specified data type size
|
||||
* @param dataType a datatype checked using {@link #checkDataType(DataType, boolean, int, Program)}
|
||||
* @param allowSizeMismatch if true size mismatch will be ignore
|
||||
* @throws InvalidInputException
|
||||
|
@ -258,7 +258,7 @@ public class VariableUtilities {
|
|||
* <ul>
|
||||
* <li>Function definition datatype</li>
|
||||
* <li>An unsized/zero-element array</li>
|
||||
* </ul>
|
||||
* </ul>
|
||||
* @param dataType datatype to be checked
|
||||
* @param voidOK true if checking return datatype and void is allow, else false.
|
||||
* @param defaultSize Undefined datatype size to be used if specified datatype is null. A value less than 1
|
||||
|
@ -312,7 +312,7 @@ public class VariableUtilities {
|
|||
}
|
||||
|
||||
if (dataType.getLength() <= 0) {
|
||||
// Unexpected condition - only dynamic types are expected to have negative length and
|
||||
// Unexpected condition - only dynamic types are expected to have negative length and
|
||||
// none should report 0 has a length.
|
||||
throw new IllegalArgumentException("Unsupported data type length (" +
|
||||
dataType.getLength() + "): " + dataType.getName());
|
||||
|
@ -326,7 +326,7 @@ public class VariableUtilities {
|
|||
* <ul>
|
||||
* <li>Function definition datatype</li>
|
||||
* <li>An unsized/zero-element array</li>
|
||||
* </ul>
|
||||
* </ul>
|
||||
* @param dataType datatype to be checked
|
||||
* @param voidOK true if checking return datatype and void is allow, else false.
|
||||
* @param defaultSize Undefined datatype size to be used if specified datatype is null. A value less than 1
|
||||
|
@ -346,7 +346,7 @@ public class VariableUtilities {
|
|||
* <ul>
|
||||
* <li>Function definition datatype</li>
|
||||
* <li>An unsized/zero-element array</li>
|
||||
* </ul>
|
||||
* </ul>
|
||||
* @param dataType datatype to be checked. If null is specified the DEFAULT datatype will be
|
||||
* returned.
|
||||
* @param voidOK true if checking return datatype and void is allow, else false.
|
||||
|
@ -474,7 +474,7 @@ public class VariableUtilities {
|
|||
" bytes: " + curStorage.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
vnAddr = newReg.getAddress();
|
||||
if (bigEndian) {
|
||||
vnAddr = vnAddr.add(newReg.getMinimumByteSize() - size);
|
||||
|
@ -746,7 +746,7 @@ public class VariableUtilities {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create an empty placeholder class structure whose category is derived from
|
||||
* Create an empty placeholder class structure whose category is derived from
|
||||
* the function's class namespace. NOTE: The structure will not be added to the data
|
||||
* type manager.
|
||||
* @param classNamespace class namespace
|
||||
|
@ -768,14 +768,14 @@ public class VariableUtilities {
|
|||
|
||||
/**
|
||||
* Find the structure data type which corresponds to the specified class namespace
|
||||
* within the specified data type manager.
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* within the specified data type manager.
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* the match criteria can be fuzzy and relies primarily on the class name.
|
||||
* While a new empty structure may be returned, it will not be added to the program's data type
|
||||
* manager.
|
||||
* @param classNamespace class namespace
|
||||
* @param dataTypeManager data type manager which should be searched and whose
|
||||
* data organization should be used.
|
||||
* @param dataTypeManager data type manager which should be searched and whose
|
||||
* data organization should be used.
|
||||
* @return new or existing structure whose name matches the specified class namespace
|
||||
*/
|
||||
public static Structure findOrCreateClassStruct(GhidraClass classNamespace,
|
||||
|
@ -789,8 +789,8 @@ public class VariableUtilities {
|
|||
|
||||
/**
|
||||
* Find the structure data type which corresponds to the specified function's class namespace
|
||||
* within the function's program. One will be instantiated if not found.
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* within the function's program. One will be instantiated if not found.
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* the match criteria can be fuzzy and relies primarily on the class name.
|
||||
* @param function function's whose class namespace is the basis for the structure
|
||||
* @return new or existing structure whose name matches the function's class namespace or
|
||||
|
@ -807,8 +807,8 @@ public class VariableUtilities {
|
|||
|
||||
/**
|
||||
* Find the structure data type which corresponds to the specified class namespace
|
||||
* within the specified data type manager. .
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* within the specified data type manager. .
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* the match criteria can be fuzzy and relies primarily on the class name.
|
||||
* @param classNamespace class namespace
|
||||
* @param dataTypeManager data type manager which should be searched.
|
||||
|
@ -823,8 +823,8 @@ public class VariableUtilities {
|
|||
|
||||
/**
|
||||
* Find the structure data type which corresponds to the specified function's class namespace
|
||||
* within the function's program.
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* within the function's program.
|
||||
* The preferred structure will utilize a namespace-based category path, however,
|
||||
* the match criteria can be fuzzy and relies primarily on the class name.
|
||||
* @param func the function.
|
||||
* @return existing structure whose name matches the specified function's class namespace
|
||||
|
|
|
@ -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.
|
||||
|
@ -19,18 +18,20 @@ package ghidra.program.model.symbol;
|
|||
import ghidra.program.model.address.Address;
|
||||
|
||||
/**
|
||||
* <code>OffsetReference</code> is a memory reference whoose "to" address is
|
||||
* <code>OffsetReference</code> is a memory reference whose "to" address is
|
||||
* computed from a base address plus an offset.
|
||||
*/
|
||||
public interface OffsetReference extends Reference {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the offset.
|
||||
* @return the offset
|
||||
*/
|
||||
public long getOffset();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the base address.
|
||||
* @return the address
|
||||
*/
|
||||
public Address getBaseAddress();
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
@ -17,18 +16,20 @@
|
|||
package ghidra.program.model.symbol;
|
||||
|
||||
/**
|
||||
* <code>ShiftedReference</code> is a memory reference whoose "to" address is
|
||||
* <code>ShiftedReference</code> is a memory reference whose "to" address is
|
||||
* computed from a base value left shifted by a shift amount.
|
||||
*/
|
||||
public interface ShiftedReference extends Reference {
|
||||
|
||||
/**
|
||||
* Returns the left shift amount.
|
||||
* @return the shift
|
||||
*/
|
||||
public int getShift();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the base value.
|
||||
* @return the value
|
||||
*/
|
||||
public long getValue();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue