mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-2974: Fixing warnings
This commit is contained in:
@@ -127,7 +127,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
symbolTable.getSymbols(getInitializedMemory(), SymbolType.LABEL, true);
|
||||
|
||||
while (dataSymbols.hasNext()) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Symbol symbol = dataSymbols.next();
|
||||
if (!symbol.getName().contains(RTTI_BASE_COMPLETE_OBJECT_LOADER_LABEL)) {
|
||||
continue;
|
||||
@@ -193,7 +193,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
symbolTable.getSymbols(getInitializedMemory(), SymbolType.LABEL, true);
|
||||
|
||||
while (dataSymbols.hasNext()) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Symbol symbol = dataSymbols.next();
|
||||
if (!symbol.getName().contains(RTTI_BASE_CLASS_DESCRIPTOR_LABEL)) {
|
||||
continue;
|
||||
@@ -259,7 +259,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
|
||||
for (int i = 0; i < numBaseClasses; i++) {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Address baseClassDescriptorAddress = getReferencedAddress(address.add(i * 4));
|
||||
|
||||
@@ -308,7 +308,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
|
||||
Iterator<Symbol> baseClassDescriptorIterator = baseClassDescriptors.iterator();
|
||||
while (baseClassDescriptorIterator.hasNext()) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Symbol symbol = baseClassDescriptorIterator.next();
|
||||
Address classHierarchyDescriptorAddress = createClassHierarchyDescriptor(
|
||||
symbol.getAddress().add(24), symbol.getParentNamespace());
|
||||
@@ -322,7 +322,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
|
||||
Iterator<Symbol> completeObjectLocatorIterator = completeObjectLocators.iterator();
|
||||
while (completeObjectLocatorIterator.hasNext()) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Symbol symbol = completeObjectLocatorIterator.next();
|
||||
Address classHierarchyDescriptorAddress = createClassHierarchyDescriptor(
|
||||
symbol.getAddress().add(16), symbol.getParentNamespace());
|
||||
@@ -421,7 +421,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
|
||||
while (classHierarchyDescriptorIterator.hasNext()) {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Address classHierarchyDescriptorAddress = classHierarchyDescriptorIterator.next();
|
||||
Symbol classHierarchyDescriptorSymbol =
|
||||
@@ -520,7 +520,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
|
||||
Iterator<Symbol> iterator = completeObjectLocatorSymbols.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Symbol completeObjectLocatorSymbol = iterator.next();
|
||||
|
||||
Address completeObjectLocatorAddress = completeObjectLocatorSymbol.getAddress();
|
||||
@@ -594,7 +594,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
|
||||
SymbolIterator symbols = symbolTable.getSymbolsAsIterator(address);
|
||||
for (Symbol sym : symbols) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
if (sym.getName().contains(name) && sym.getParentNamespace().equals(namespace)) {
|
||||
return sym;
|
||||
}
|
||||
@@ -643,7 +643,7 @@ public class FixUpRttiAnalysisScript extends GhidraScript {
|
||||
MemoryBlock[] blocks = currentProgram.getMemory().getBlocks();
|
||||
|
||||
for (MemoryBlock block : blocks) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
if (block.isInitialized()) {
|
||||
dataAddresses.add(block.getStart(), block.getEnd());
|
||||
|
||||
@@ -146,7 +146,7 @@ public abstract class AbstractCreateDataBackgroundCmd<T extends AbstractCreateDa
|
||||
|
||||
try {
|
||||
monitor = taskMonitor;
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
model = createModel(program);
|
||||
model.validate();
|
||||
@@ -228,14 +228,14 @@ public abstract class AbstractCreateDataBackgroundCmd<T extends AbstractCreateDa
|
||||
dt = new ArrayDataType(dt, count, dt.getLength(), program.getDataTypeManager());
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Is the data type already applied at the address?
|
||||
if (matchingDataExists(dt, program, address)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Create data at the address using the datatype.
|
||||
DataUtilities.createData(program, address, dt, dt.getLength(), getClearDataMode());
|
||||
|
||||
@@ -129,7 +129,7 @@ public class CreateTypeDescriptorBackgroundCmd
|
||||
@Override
|
||||
protected boolean createMarkup() throws CancelledException, InvalidInputException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Program program = model.getProgram();
|
||||
String demangledName = model.getDemangledTypeDescriptor();
|
||||
@@ -142,7 +142,7 @@ public class CreateTypeDescriptorBackgroundCmd
|
||||
EHDataTypeUtilities.createPlateCommentIfNeeded(program, prefix, RTTI_0_NAME, null,
|
||||
getDataAddress(), applyOptions);
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Label
|
||||
Namespace classNamespace = model.getDescriptorAsNamespace();
|
||||
|
||||
@@ -97,7 +97,7 @@ public class CreateEHCatchHandlerMapBackgroundCmd
|
||||
Program program = model.getProgram();
|
||||
|
||||
for (int catchHandlerOrdinal = 0; catchHandlerOrdinal < count; catchHandlerOrdinal++) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Address compAddress;
|
||||
Address typeDescriptorAddress;
|
||||
try {
|
||||
@@ -161,7 +161,7 @@ public class CreateEHCatchHandlerMapBackgroundCmd
|
||||
boolean result = true;
|
||||
EHCatchHandlerModel catchHandlerModel = createModel(program);
|
||||
for (int catchHandlerOrdinal = 0; catchHandlerOrdinal < count; catchHandlerOrdinal++) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Address compAddress;
|
||||
Address refAddress;
|
||||
try {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class CreateEHESTypeListBackgroundCmd
|
||||
return true; // No catch handler info to create.
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
EHCatchHandlerModel catchHandlerModel;
|
||||
try {
|
||||
@@ -118,7 +118,7 @@ public class CreateEHESTypeListBackgroundCmd
|
||||
return false;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateEHCatchHandlerMapBackgroundCmd cmd =
|
||||
new CreateEHCatchHandlerMapBackgroundCmd(catchHandlerModel, applyOptions);
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CreateEHFuncInfoBackgroundCmd
|
||||
|
||||
private boolean createUnwindMapEntries() throws CancelledException {
|
||||
monitor.setMessage("Creating UnwindMap");
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Address compAddress;
|
||||
Address unwindMapAddress;
|
||||
@@ -129,7 +129,7 @@ public class CreateEHFuncInfoBackgroundCmd
|
||||
|
||||
private boolean createTryBlockMapEntries() throws CancelledException {
|
||||
monitor.setMessage("Creating TryBlockMap");
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Address compAddress;
|
||||
Address tryBlockMapAddress;
|
||||
@@ -170,7 +170,7 @@ public class CreateEHFuncInfoBackgroundCmd
|
||||
|
||||
private boolean createIPToStateMapEntries() throws CancelledException {
|
||||
monitor.setMessage("Creating IPToStateMap");
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Address compAddress;
|
||||
Address ipToStateMapAddress;
|
||||
@@ -211,7 +211,7 @@ public class CreateEHFuncInfoBackgroundCmd
|
||||
|
||||
private boolean createESTypeListEntries() throws CancelledException {
|
||||
monitor.setMessage("Creating ESTypeList");
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Address compAddress;
|
||||
Address esTypeListAddress;
|
||||
|
||||
@@ -89,7 +89,7 @@ public class CreateEHTryBlockMapBackgroundCmd
|
||||
Program program = model.getProgram();
|
||||
|
||||
for (int tryBlockEntryOrdinal = 0; tryBlockEntryOrdinal < count; tryBlockEntryOrdinal++) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Address compAddress;
|
||||
Address catchHandlerMapAddress;
|
||||
int catchHandlerCount;
|
||||
@@ -124,7 +124,7 @@ public class CreateEHTryBlockMapBackgroundCmd
|
||||
continue;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateEHCatchHandlerMapBackgroundCmd cmd =
|
||||
new CreateEHCatchHandlerMapBackgroundCmd(catchHandlerModel, applyOptions);
|
||||
|
||||
@@ -89,7 +89,7 @@ public class CreateEHUnwindMapBackgroundCmd extends AbstractCreateDataBackground
|
||||
Program program = model.getProgram();
|
||||
|
||||
for (int unwindEntryOrdinal = 0; unwindEntryOrdinal < count; unwindEntryOrdinal++) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Address compAddress;
|
||||
Address actionAddress;
|
||||
try {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class CreateRtti1BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
|
||||
private boolean createRtti0() throws CancelledException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateTypeDescriptorBackgroundCmd cmd =
|
||||
new CreateTypeDescriptorBackgroundCmd(model.getRtti0Model(), applyOptions);
|
||||
@@ -85,7 +85,7 @@ public class CreateRtti1BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
|
||||
private boolean createRtti3() throws CancelledException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateRtti3BackgroundCmd cmd =
|
||||
new CreateRtti3BackgroundCmd(model.getRtti3Model(), applyOptions);
|
||||
@@ -95,7 +95,7 @@ public class CreateRtti1BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
@Override
|
||||
protected boolean createMarkup() throws CancelledException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Program program = model.getProgram();
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
@@ -104,7 +104,7 @@ public class CreateRtti1BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
return true;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
String suffix = "";
|
||||
try {
|
||||
|
||||
@@ -98,7 +98,7 @@ public class CreateRtti2BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
private boolean createRtti1(int rtti1Index)
|
||||
throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateRtti1BackgroundCmd cmd =
|
||||
new CreateRtti1BackgroundCmd(model.getRtti1Model(rtti1Index), applyOptions);
|
||||
@@ -108,7 +108,7 @@ public class CreateRtti2BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
@Override
|
||||
protected boolean createMarkup() throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Program program = model.getProgram();
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
@@ -117,7 +117,7 @@ public class CreateRtti2BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
return true;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Label
|
||||
boolean shouldCreateComment = true;
|
||||
|
||||
@@ -83,7 +83,7 @@ public class CreateRtti3BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
|
||||
private boolean createRtti2() throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateRtti2BackgroundCmd cmd =
|
||||
new CreateRtti2BackgroundCmd(model.getRtti2Model(), applyOptions);
|
||||
@@ -93,7 +93,7 @@ public class CreateRtti3BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
@Override
|
||||
protected boolean createMarkup() throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Program program = model.getProgram();
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
@@ -102,7 +102,7 @@ public class CreateRtti3BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
return true;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Label
|
||||
boolean shouldCreateComment = true;
|
||||
|
||||
@@ -102,7 +102,7 @@ public class CreateRtti4BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
@Override
|
||||
protected boolean createAssociatedData() throws CancelledException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
boolean createRtti0Success;
|
||||
try {
|
||||
@@ -129,7 +129,7 @@ public class CreateRtti4BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
|
||||
private boolean createRtti0() throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateTypeDescriptorBackgroundCmd cmd =
|
||||
new CreateTypeDescriptorBackgroundCmd(model.getRtti0Model(), applyOptions);
|
||||
@@ -138,7 +138,7 @@ public class CreateRtti4BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
|
||||
private boolean createRtti3() throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
CreateRtti3BackgroundCmd cmd =
|
||||
new CreateRtti3BackgroundCmd(model.getRtti3Model(), applyOptions);
|
||||
@@ -169,7 +169,7 @@ public class CreateRtti4BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
// did the search, now process the results
|
||||
boolean didSome = false;
|
||||
for (Address rtti4Address : goodRtti4Locations) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
VfTableModel vfTableModel = foundVFtables.get(rtti4Address);
|
||||
if (vfTableModel == null) {
|
||||
@@ -239,7 +239,7 @@ public class CreateRtti4BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
@Override
|
||||
protected boolean createMarkup() throws CancelledException, InvalidDataTypeException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
Program program = model.getProgram();
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
@@ -248,7 +248,7 @@ public class CreateRtti4BackgroundCmd extends AbstractCreateDataBackgroundCmd<Rt
|
||||
return true;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Label
|
||||
boolean shouldCreateComment = true;
|
||||
|
||||
@@ -78,7 +78,7 @@ public class CreateVfTableBackgroundCmd extends AbstractCreateDataBackgroundCmd<
|
||||
@Override
|
||||
protected boolean createAssociatedData() throws CancelledException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
boolean createTerminatorSuccess;
|
||||
try {
|
||||
@@ -115,7 +115,7 @@ public class CreateVfTableBackgroundCmd extends AbstractCreateDataBackgroundCmd<
|
||||
PointerDataType.dataType, -1, getClearDataMode());
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
if (rtti0Model != null) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
String demangledTypeDescriptor = rtti0Model.getDemangledTypeDescriptor();
|
||||
String prefixString = ((demangledTypeDescriptor != null)
|
||||
? (demangledTypeDescriptor + Namespace.DELIMITER)
|
||||
@@ -165,7 +165,7 @@ public class CreateVfTableBackgroundCmd extends AbstractCreateDataBackgroundCmd<
|
||||
Address vfTableAddress = getDataAddress();
|
||||
Program program = model.getProgram();
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
|
||||
@@ -192,7 +192,7 @@ public class CreateVfTableBackgroundCmd extends AbstractCreateDataBackgroundCmd<
|
||||
if (applyOptions.shouldCreateFunction()) {
|
||||
int elementCount = model.getElementCount();
|
||||
for (int tableElementIndex = 0; tableElementIndex < elementCount; tableElementIndex++) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
Address vfPointer = model.getVirtualFunctionPointer(tableElementIndex);
|
||||
if (vfPointer != null) {
|
||||
EHDataTypeUtilities.createFunctionIfNeeded(program, vfPointer);
|
||||
@@ -208,7 +208,7 @@ public class CreateVfTableBackgroundCmd extends AbstractCreateDataBackgroundCmd<
|
||||
Program program = model.getProgram();
|
||||
Address metaAddress = getMetaAddress(program);
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
TypeDescriptorModel rtti0Model = model.getRtti0Model();
|
||||
|
||||
@@ -216,7 +216,7 @@ public class CreateVfTableBackgroundCmd extends AbstractCreateDataBackgroundCmd<
|
||||
return true;
|
||||
}
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
// Label
|
||||
boolean shouldCreateComment = true;
|
||||
|
||||
@@ -161,7 +161,7 @@ public class RttiAnalyzer extends AbstractAnalyzer {
|
||||
ArrayList<Address> rtti0Locations = new ArrayList<>();
|
||||
int count = 0;
|
||||
for (Address rtti0Address : possibleRtti0Addresses) {
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
monitor.setProgress(count++);
|
||||
|
||||
// Validate
|
||||
@@ -228,7 +228,7 @@ public class RttiAnalyzer extends AbstractAnalyzer {
|
||||
List<Address> rtti0Locations, DataValidationOptions validationOptions,
|
||||
TaskMonitor monitor) throws CancelledException {
|
||||
|
||||
monitor.checkCanceled();
|
||||
monitor.checkCancelled();
|
||||
|
||||
List<Address> addresses =
|
||||
getRefsToRtti0(program, rtti4Blocks, rtti0Locations, validationOptions, monitor);
|
||||
|
||||
Reference in New Issue
Block a user