mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Fix: 132 typos
Signed-off-by: RoboSchmied <github@roboschmie.de>
This commit is contained in:
parent
211e15bef5
commit
d7cc532fe3
58 changed files with 122 additions and 122 deletions
|
@ -98,7 +98,7 @@ public class SleighDebugLogger {
|
|||
append("\nNOTE: bitrange's number leftmost/most-significant bit as 0 (zero).\n");
|
||||
append(" This bit numbering agrees with the context field specification\n");
|
||||
append(" but differs from token field specification. The bit correspondence\n");
|
||||
append(" for token fields depends upon the specific token size/endianess and\n");
|
||||
append(" for token fields depends upon the specific token size/endianness and\n");
|
||||
append(" current byte-offset of pattern matcher.\n\n");
|
||||
|
||||
int contextSize = contextCache.getContextSize();
|
||||
|
|
|
@ -1017,7 +1017,7 @@ public class SleighCompile extends SleighBase {
|
|||
public void setEndian(int end) {
|
||||
entry("setEndian", end);
|
||||
target_endian = end;
|
||||
predefinedSymbols(); // Set up symbols now that we know endianess
|
||||
predefinedSymbols(); // Set up symbols now that we know endianness
|
||||
}
|
||||
|
||||
public void setAlignment(int val) {
|
||||
|
|
|
@ -88,7 +88,7 @@ public class MemoryMapDB implements Memory, ManagerDB, LiveMemoryListener {
|
|||
* @param handle the open database handle.
|
||||
* @param addrMap the address map.
|
||||
* @param openMode the open mode for the program.
|
||||
* @param isBigEndian endianess flag
|
||||
* @param isBigEndian endianness flag
|
||||
* @param lock the program synchronization lock
|
||||
* @param monitor Task monitor for upgrading
|
||||
* @throws IOException if a database io error occurs.
|
||||
|
|
|
@ -75,7 +75,7 @@ public class DataOrganizationImpl implements DataOrganization {
|
|||
private int doubleSize = DEFAULT_DOUBLE_SIZE;
|
||||
private int longDoubleSize = DEFAULT_LONG_DOUBLE_SIZE;
|
||||
|
||||
// Endianess explicitly set and not supported by saveXml/restore
|
||||
// Endianness explicitly set and not supported by saveXml/restore
|
||||
private boolean bigEndian = false;
|
||||
|
||||
private BitFieldPackingImpl bitFieldPacking = new BitFieldPackingImpl();
|
||||
|
@ -99,7 +99,7 @@ public class DataOrganizationImpl implements DataOrganization {
|
|||
* Creates a new default DataOrganization. This has a mapping which defines the alignment
|
||||
* of a data type based on its size. The map defines pairs for data types that are
|
||||
* 1, 2, 4, and 8 bytes in length.
|
||||
* @param language optional language used to initialize defaults (pointer size, endianess, etc.)
|
||||
* @param language optional language used to initialize defaults (pointer size, endianness, etc.)
|
||||
* (may be null)
|
||||
* @return a new default DataOrganization.
|
||||
*/
|
||||
|
@ -112,7 +112,7 @@ public class DataOrganizationImpl implements DataOrganization {
|
|||
if (language != null) {
|
||||
// NOTE: Ensure that saveXml always saves pointer size
|
||||
dataOrganization.setPointerSize(language.getDefaultSpace().getPointerSize());
|
||||
// NOTE: Endianess is not handled by saveXml/restore
|
||||
// NOTE: Endianness is not handled by saveXml/restore
|
||||
dataOrganization.setBigEndian(language.isBigEndian());
|
||||
}
|
||||
return dataOrganization;
|
||||
|
@ -195,7 +195,7 @@ public class DataOrganizationImpl implements DataOrganization {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set data endianess
|
||||
* Set data endianness
|
||||
* @param bigEndian true if big-endian, false if little-endian
|
||||
*/
|
||||
public void setBigEndian(boolean bigEndian) {
|
||||
|
@ -803,7 +803,7 @@ public class DataOrganizationImpl implements DataOrganization {
|
|||
public void encode(Encoder encoder) throws IOException {
|
||||
encoder.openElement(ELEM_DATA_ORGANIZATION);
|
||||
|
||||
// NOTE: endianess intentionally omitted from output
|
||||
// NOTE: endianness intentionally omitted from output
|
||||
|
||||
if (absoluteMaxAlignment != NO_MAXIMUM_ALIGNMENT) {
|
||||
encoder.openElement(ELEM_ABSOLUTE_MAX_ALIGNMENT);
|
||||
|
@ -905,13 +905,13 @@ public class DataOrganizationImpl implements DataOrganization {
|
|||
* Restore settings from an XML stream. This expects to see parser positioned on the
|
||||
* <data_organization> start tag. The XML is designed to override existing language-specific
|
||||
* default settings which are pre-populated with {@link #getDefaultOrganization(Language)}. This
|
||||
* will will ensure that the endianess setting is properly established since it is not included
|
||||
* will will ensure that the endianness setting is properly established since it is not included
|
||||
* in the XML.
|
||||
* @param parser is the XML stream
|
||||
*/
|
||||
public void restoreXml(XmlPullParser parser) {
|
||||
|
||||
// NOTE: endianess intentionally omitted from XML.
|
||||
// NOTE: endianness intentionally omitted from XML.
|
||||
|
||||
parser.start();
|
||||
while (parser.peek().isStart()) {
|
||||
|
|
|
@ -21,7 +21,7 @@ import ghidra.program.model.lang.Endian;
|
|||
import ghidra.program.model.mem.MemBuffer;
|
||||
|
||||
/**
|
||||
* SettingsDefinition for endianess
|
||||
* SettingsDefinition for endianness
|
||||
*/
|
||||
public class EndianSettingsDefinition implements EnumSettingsDefinition {
|
||||
|
||||
|
@ -41,11 +41,11 @@ public class EndianSettingsDefinition implements EnumSettingsDefinition {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the endianess settings. First looks in settings, then defaultSettings
|
||||
* Returns the endianness settings. First looks in settings, then defaultSettings
|
||||
* and finally returns a default value if the first two have no value for this definition.
|
||||
* @param settings the instance settings to search for the value
|
||||
* @param buf the data context
|
||||
* @return a boolean value for the endianess setting
|
||||
* @return a boolean value for the endianness setting
|
||||
*/
|
||||
public boolean isBigEndian(Settings settings, MemBuffer buf) {
|
||||
int val = getChoice(settings);
|
||||
|
@ -55,7 +55,7 @@ public class EndianSettingsDefinition implements EnumSettingsDefinition {
|
|||
return val == BIG;
|
||||
}
|
||||
|
||||
public Endian getEndianess(Settings settings, Endian defaultValue) {
|
||||
public Endian getEndianness(Settings settings, Endian defaultValue) {
|
||||
int val = getChoice(settings);
|
||||
switch (val) {
|
||||
default:
|
||||
|
@ -115,7 +115,7 @@ public class EndianSettingsDefinition implements EnumSettingsDefinition {
|
|||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Selects the endianess of the data";
|
||||
return "Selects the endianness of the data";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -324,7 +324,7 @@ public class StringDataInstance {
|
|||
this.showTranslation = TRANSLATION.isShowTranslated(settings);
|
||||
this.translatedValue = getTranslatedValue(settings, buf);
|
||||
this.renderSetting = RENDER.getEnumValue(settings);
|
||||
this.endianSetting = ENDIAN.getEndianess(settings, null);
|
||||
this.endianSetting = ENDIAN.getEndianness(settings, null);
|
||||
|
||||
this.length = length;
|
||||
}
|
||||
|
|
|
@ -511,7 +511,7 @@ public interface Structure extends Composite {
|
|||
/**
|
||||
* Compute the normalized bit offset of a bitfield relative to the start of a structure.
|
||||
*
|
||||
* NOTE: This implementation currently relies only on endianess to dictate bit allocation
|
||||
* NOTE: This implementation currently relies only on endianness to dictate bit allocation
|
||||
* ordering. If future support is added for alternate bitfield packing, this implementation
|
||||
* will require modification.
|
||||
*
|
||||
|
|
|
@ -1097,7 +1097,7 @@ public class StructureDataType extends CompositeDataTypeImpl implements Structur
|
|||
* Create copy of structure for target dtm (source archive information is discarded).
|
||||
* <p>
|
||||
* WARNING! copying non-packed structures which contain bitfields can produce invalid results when
|
||||
* switching endianess due to the differences in packing order.
|
||||
* switching endianness due to the differences in packing order.
|
||||
*
|
||||
* @param dtm target data type manager
|
||||
* @return cloned structure
|
||||
|
@ -1114,7 +1114,7 @@ public class StructureDataType extends CompositeDataTypeImpl implements Structur
|
|||
/**
|
||||
* Create cloned structure for target dtm preserving source archive information. WARNING!
|
||||
* cloning non-packed structures which contain bitfields can produce invalid results when
|
||||
* switching endianess due to the differences in packing order.
|
||||
* switching endianness due to the differences in packing order.
|
||||
*
|
||||
* @param dtm target data type manager
|
||||
* @return cloned structure
|
||||
|
|
|
@ -20,7 +20,7 @@ package ghidra.program.model.data;
|
|||
* <p>
|
||||
* NOTE: The use of bitfields within all unions assumes a default packing where bit allocation
|
||||
* always starts with byte-0 of the union. Bit allocation order is dictated by data organization
|
||||
* endianess (byte-0 msb allocated first for big-endian, while byte-0 lsb allocated first for little-endian).
|
||||
* endianness (byte-0 msb allocated first for big-endian, while byte-0 lsb allocated first for little-endian).
|
||||
*/
|
||||
public interface Union extends Composite {
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@ public enum Endian {
|
|||
this.shortName = shortName;
|
||||
}
|
||||
|
||||
public static Endian toEndian(String endianess) {
|
||||
if (endianess != null) {
|
||||
if ((Endian.BIG.toString().equalsIgnoreCase(endianess)) ||
|
||||
(Endian.BIG.toShortString().equalsIgnoreCase(endianess))) {
|
||||
public static Endian toEndian(String endianness) {
|
||||
if (endianness != null) {
|
||||
if ((Endian.BIG.toString().equalsIgnoreCase(endianness)) ||
|
||||
(Endian.BIG.toShortString().equalsIgnoreCase(endianness))) {
|
||||
return Endian.BIG;
|
||||
}
|
||||
else if ((Endian.LITTLE.toString().equalsIgnoreCase(endianess)) ||
|
||||
(Endian.LITTLE.toShortString().equalsIgnoreCase(endianess))) {
|
||||
else if ((Endian.LITTLE.toString().equalsIgnoreCase(endianness)) ||
|
||||
(Endian.LITTLE.toShortString().equalsIgnoreCase(endianness))) {
|
||||
return Endian.LITTLE;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -58,14 +58,14 @@ public interface LanguageService {
|
|||
* Returns all known language descriptions which satisfy the criteria identify by the
|
||||
* non-null parameters. A null value implies a don't-care wildcard value.
|
||||
* @param processor the processor for which to get a language
|
||||
* @param endianess big or little
|
||||
* @param endianness big or little
|
||||
* @param size processor address space size (in bits)
|
||||
* @param variant the processor version (usually 'default')
|
||||
* @return the language descriptions that fit the parameters
|
||||
* @deprecated use {@link #getLanguageDescriptions(Processor)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
List<LanguageDescription> getLanguageDescriptions(Processor processor, Endian endianess,
|
||||
List<LanguageDescription> getLanguageDescriptions(Processor processor, Endian endianness,
|
||||
Integer size, String variant);
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,8 +36,8 @@ public class SleighLanguageDescription extends BasicLanguageDescription {
|
|||
* @param id the name of the language
|
||||
* @param description language description text
|
||||
* @param processor processor name/family
|
||||
* @param endian data endianess
|
||||
* @param instructionEndian instruction endianess
|
||||
* @param endian data endianness
|
||||
* @param instructionEndian instruction endianness
|
||||
* @param size processor size
|
||||
* @param variant processor variant name
|
||||
* @param version the major version of the language.
|
||||
|
|
|
@ -927,7 +927,7 @@ public class VariableStorage implements Comparable<VariableStorage> {
|
|||
}
|
||||
if (oldReg != null && !(oldReg instanceof UnknownRegister)) {
|
||||
Register newReg = translator.getNewRegister(oldReg);
|
||||
if (newReg != null) { // assume reg endianess unchanged
|
||||
if (newReg != null) { // assume reg endianness unchanged
|
||||
// NOTE: could produce bad results if not careful with mapping
|
||||
int origByteShift = (int) offset - oldReg.getOffset();
|
||||
offset = newReg.getOffset() + origByteShift;
|
||||
|
|
|
@ -126,9 +126,9 @@ public interface MemBuffer {
|
|||
public boolean isBigEndian();
|
||||
|
||||
/**
|
||||
* returns the short at the given offset, taking into account the endianess.
|
||||
* returns the short at the given offset, taking into account the endianness.
|
||||
* @param offset the offset from the membuffers origin (the address that it is set at)
|
||||
* @return the short at the given offset, taking into account the endianess.
|
||||
* @return the short at the given offset, taking into account the endianness.
|
||||
* @throws MemoryAccessException if a 2-byte short value cannot be read at the specified offset
|
||||
*/
|
||||
public short getShort(int offset) throws MemoryAccessException;
|
||||
|
@ -136,7 +136,7 @@ public interface MemBuffer {
|
|||
/**
|
||||
* Returns the unsigned short at the given offset, taking into account the endian-ness.
|
||||
* @param offset the offset from the membuffers origin (the address that it is set at)
|
||||
* @return the unsigned short at the given offset, as a {@code int}, taking into account the endianess.
|
||||
* @return the unsigned short at the given offset, as a {@code int}, taking into account the endianness.
|
||||
* @throws MemoryAccessException if a 2-byte short value cannot be read at the specified offset
|
||||
*/
|
||||
default public int getUnsignedShort(int offset) throws MemoryAccessException {
|
||||
|
@ -144,17 +144,17 @@ public interface MemBuffer {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the int at the given offset, taking into account the endianess.
|
||||
* returns the int at the given offset, taking into account the endianness.
|
||||
* @param offset the offset from the membuffers origin (the address that it is set at)
|
||||
* @return the int at the given offset, taking into account the endianess.
|
||||
* @return the int at the given offset, taking into account the endianness.
|
||||
* @throws MemoryAccessException if a 4-byte integer value cannot be read at the specified offset
|
||||
*/
|
||||
public int getInt(int offset) throws MemoryAccessException;
|
||||
|
||||
/**
|
||||
* Returns the unsigned int at the given offset, taking into account the endianess.
|
||||
* Returns the unsigned int at the given offset, taking into account the endianness.
|
||||
* @param offset the offset from the membuffers origin (the address that it is set at)
|
||||
* @return the unsigned int at the given offset, as a {@code long}, taking into account the endianess.
|
||||
* @return the unsigned int at the given offset, as a {@code long}, taking into account the endianness.
|
||||
* @throws MemoryAccessException if a 4-byte integer value cannot be read at the specified offset
|
||||
*/
|
||||
default public long getUnsignedInt(int offset) throws MemoryAccessException {
|
||||
|
@ -162,19 +162,19 @@ public interface MemBuffer {
|
|||
}
|
||||
|
||||
/**
|
||||
* returns the long at the given offset, taking into account the endianess.
|
||||
* returns the long at the given offset, taking into account the endianness.
|
||||
* @param offset the offset from the membuffers origin (the address that it is set at)
|
||||
* @return the long at the given offset, taking into account the endianess.
|
||||
* @return the long at the given offset, taking into account the endianness.
|
||||
* @throws MemoryAccessException if a 8-byte long value cannot be read at the specified offset
|
||||
*/
|
||||
public long getLong(int offset) throws MemoryAccessException;
|
||||
|
||||
/**
|
||||
* returns the value at the given offset, taking into account the endianess.
|
||||
* returns the value at the given offset, taking into account the endianness.
|
||||
* @param offset the offset from the membuffers origin (the address that it is set at)
|
||||
* @param size the number of bytes to include in the value
|
||||
* @param signed true if value should be treated as a signed twos-compliment value.
|
||||
* @return the value at the given offset, taking into account the endianess.
|
||||
* @return the value at the given offset, taking into account the endianness.
|
||||
* @throws MemoryAccessException if the request size value cannot be read at the specified offset
|
||||
*/
|
||||
public BigInteger getBigInteger(int offset, int size, boolean signed)
|
||||
|
|
|
@ -206,7 +206,7 @@ public class AddressEvaluator {
|
|||
}
|
||||
|
||||
/*
|
||||
* Make sure we account for endianess of the program.
|
||||
* Make sure we account for endianness of the program.
|
||||
* Computing the number of bits to shift the current byte value
|
||||
* is different for Little vs. Big Endian. Need to multiply by
|
||||
* 8 to shift in 1-byte increments.
|
||||
|
|
|
@ -86,7 +86,7 @@ public class DefaultLanguageService implements LanguageService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<LanguageDescription> getLanguageDescriptions(Processor processor, Endian endianess,
|
||||
public List<LanguageDescription> getLanguageDescriptions(Processor processor, Endian endianness,
|
||||
Integer size, String variant) {
|
||||
List<LanguageDescription> languageDescriptions = new ArrayList<>();
|
||||
for (LanguageInfo info : languageInfos) {
|
||||
|
@ -94,7 +94,7 @@ public class DefaultLanguageService implements LanguageService {
|
|||
if (processor != null && processor != description.getProcessor()) {
|
||||
continue;
|
||||
}
|
||||
if (endianess != null && endianess != description.getEndian()) {
|
||||
if (endianness != null && endianness != description.getEndian()) {
|
||||
continue;
|
||||
}
|
||||
if (size != null && size.intValue() != description.getSize()) {
|
||||
|
@ -129,7 +129,7 @@ public class DefaultLanguageService implements LanguageService {
|
|||
}
|
||||
|
||||
public List<LanguageDescription> getExternalLanguageDescriptions(String externalProcessorName,
|
||||
String externalTool, Endian endianess, Integer size) {
|
||||
String externalTool, Endian endianness, Integer size) {
|
||||
|
||||
List<LanguageDescription> languageDescriptions = new ArrayList<>();
|
||||
for (LanguageInfo info : languageInfos) {
|
||||
|
@ -140,7 +140,7 @@ public class DefaultLanguageService implements LanguageService {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (endianess != null && endianess != description.getEndian()) {
|
||||
if (endianness != null && endianness != description.getEndian()) {
|
||||
continue;
|
||||
}
|
||||
if (size != null && size.intValue() != description.getSize()) {
|
||||
|
|
|
@ -60,7 +60,7 @@ public class StructureDBTest extends AbstractGenericTest {
|
|||
DataOrganizationImpl dataOrg = (DataOrganizationImpl) dataMgr.getDataOrganization();
|
||||
dataOrg.setBigEndian(true);
|
||||
|
||||
// re-resolve with modified endianess
|
||||
// re-resolve with modified endianness
|
||||
struct = (StructureDB) dataMgr.resolve(structClone, null);
|
||||
}
|
||||
|
||||
|
@ -1312,7 +1312,7 @@ public class StructureDBTest extends AbstractGenericTest {
|
|||
public void testReplaceWith2() throws InvalidDataTypeException {
|
||||
|
||||
// NOTE: non-packed bitfields should remain unchanged when
|
||||
// transitioning endianess even though it makes little sense.
|
||||
// transitioning endianness even though it makes little sense.
|
||||
// Unaligned structures are not intended to be portable!
|
||||
|
||||
TypeDef td = new TypedefDataType("Foo", IntegerDataType.dataType);
|
||||
|
|
|
@ -58,7 +58,7 @@ public class UnionDBTest extends AbstractGenericTest {
|
|||
DataOrganizationImpl dataOrg = (DataOrganizationImpl) dataMgr.getDataOrganization();
|
||||
dataOrg.setBigEndian(true);
|
||||
|
||||
// re-resolve with modified endianess
|
||||
// re-resolve with modified endianness
|
||||
union = (UnionDB) dataMgr.resolve(unionClone, null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue